From f5e5b653d99a2529310eca69b91a49aba02c62cd Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 26 Nov 2021 16:40:40 -0800 Subject: [PATCH] Fix link error on Mojave 1f58b4d869a47d2f95621512455d52eb7c3546d9 introduced a link error on my Mojave machine, because making the Boost include path the highest-priority one was forcing use of the system's libfdt.h. But the system's libfdt.h unfortunately lacks the 'extern "C"' linkage modifier, causing link errors when invoking FDT routines from C++ code. Fix by making the Boost include path the lowest-priority one. --- Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 9b1176c4..f2f82782 100644 --- a/Makefile.in +++ b/Makefile.in @@ -96,7 +96,7 @@ VPATH := $(addprefix $(src_dir)/, $(sprojs_enabled)) default-CFLAGS := -DPREFIX=\"$(prefix)\" -Wall -Wno-unused -Wno-nonportable-include-path -g -O2 -fPIC default-CXXFLAGS := $(default-CFLAGS) -std=c++11 -mcppbs-CPPFLAGS := @CPPFLAGS@ @BOOST_CPPFLAGS@ +mcppbs-CPPFLAGS := @CPPFLAGS@ mcppbs-CFLAGS := $(default-CFLAGS) @CFLAGS@ mcppbs-CXXFLAGS := $(default-CXXFLAGS) @CXXFLAGS@ @@ -111,7 +111,7 @@ all-cxx-flags := \ all-c-flags := \ $(mcppbs-CPPFLAGS) $(mcppbs-CFLAGS) $(CPPFLAGS) $(CFLAGS) -COMPILE := $(CXX) -MMD -MP $(all-cxx-flags) $(sprojs_include) +COMPILE := $(CXX) -MMD -MP $(all-cxx-flags) $(sprojs_include) @BOOST_CPPFLAGS@ COMPILE_C := $(CC) -MMD -MP $(all-c-flags) $(sprojs_include) # Linker