Commit 38b347a9 authored by Jakub Klinkovský's avatar Jakub Klinkovský

Cleaner fix for bfd.h

parent 3bb3b32f
......@@ -79,8 +79,7 @@ endif()
# set Debug/Release options
set( CMAKE_CXX_FLAGS "-std=c++11 -pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable" )
# -DPACKAGE -DPACKAGE_VERSION are needed for bfd.h, see https://stackoverflow.com/a/11748919
set( CMAKE_CXX_FLAGS_DEBUG "-g -DPACKAGE -DPACKAGE_VERSION" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG" )
#set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" )
# pass -rdynamic only in Debug mode
......
......@@ -7,13 +7,19 @@
#include <stdio.h>
#include <stdlib.h>
#include <execinfo.h>
#include <bfd.h>
#include <dlfcn.h>
#include <link.h>
#include <linux/types.h>
#include <execinfo.h>
#include <cxxabi.h>
// THe PACKAGE and PACKAGE_VERSION macros are needed for bfd.h,
// see https://stackoverflow.com/a/11748919
#define PACKAGE
#define PACKAGE_VERSION
#include <bfd.h>
#undef PACKAGE
#undef PACKAGE_VERSION
//from: https://oroboro.com/printing-stack-traces-file-line/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment