Add -nostdinc++ when building libunwind
If the libcxx headers already have been installed, adding -I$LIBCXX/include to the include path breaks some C standard headers. The libcxx installation provides e.g. stdlib.h, which does an #include_next <stdlib.h>. If the include path includes both $LIBCXX/include and the libcxx headers installed to the target sysroot, the #include_next will pick up the same header from the next include directory. And due to include guards, the second inclusion of the libcxx version of the header does nothing at all, instead of doing yet another #include_next for picking up the real version of the header. By adding -nostdinc++, we avoid the possibly installed version of these headers. This fixes rebuilding libunwind after libcxx has been built and installed.
This commit is contained in:
1 parent
e56a519fdc
commit
c1f96ba002
1 file changed
+1
-1
+1
-1
@@ -55,7 +55,7 @@ for arch in $ARCHS; do
|
||||
-DLIBUNWIND_ENABLE_THREADS=TRUE \
|
||||
-DLIBUNWIND_ENABLE_SHARED=FALSE \
|
||||
-DLIBUNWIND_ENABLE_CROSS_UNWINDING=FALSE \
|
||||
-DCMAKE_CXX_FLAGS="-I$LIBCXX/include" \
|
||||
-DCMAKE_CXX_FLAGS="-nostdinc++ -I$LIBCXX/include" \
|
||||
..
|
||||
make -j$CORES
|
||||
make install
|
||||
|
||||
Reference in new issue
Block a user