Update flags for external GCC.
- The -L WORLDTMP/usr/lib is not needed as GCC is already adding in -L =/usr/lib internally with --sysroot. It does not do this for header include paths though, thus passing -isystem =/usr/include is still needed. For the forced libc++ usage: - Use -isystem rather than -I for libc++ headers. - Use -std=c++11 rather than gnu++11. - Use -nostdinc++ to ensure GCC's headers don't leak in. Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
1b337a349d
commit
1b89301d3b
@ -432,8 +432,11 @@ TARGET_ABI= gnueabi
|
||||
.endif
|
||||
.endif
|
||||
.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
|
||||
XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
|
||||
XCXXFLAGS+= -I${WORLDTMP}/usr/include/c++/v1 -std=gnu++11 -L${WORLDTMP}/../lib/libc++
|
||||
# GCC requires -isystem when using a cross-compiler.
|
||||
XCFLAGS+= -isystem ${WORLDTMP}/usr/include
|
||||
# Force using libc++ for external GCC.
|
||||
XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
|
||||
-nostdinc++ -L${WORLDTMP}/../lib/libc++
|
||||
# XXX: DEPFLAGS is a workaround for not properly passing CXXFLAGS to sub-makes
|
||||
# due to CXX="${XCXX} ${XCXXFLAGS}". bsd.dep.mk does use CXXFLAGS when
|
||||
# building C++ files so this can come out if passing CXXFLAGS down is fixed.
|
||||
|
Loading…
Reference in New Issue
Block a user