From 3bb3b32f59284ef33e9335e2b1b6fcd63fc934a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkjak@fjfi.cvut.cz>
Date: Sun, 23 Sep 2018 18:16:37 +0200
Subject: [PATCH] Re-add the fix for bfd.h

---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ed064eb1d..01db361b08 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,7 +79,8 @@ endif()
 
 # set Debug/Release options
 set( CMAKE_CXX_FLAGS "-std=c++11 -pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable" )
-set( CMAKE_CXX_FLAGS_DEBUG "-g" )
+# -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_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
-- 
GitLab