Date: Fri, 25 Mar 2016 19:12:41 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297271 - head Message-ID: <201603251912.u2PJCfI7062462@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Fri Mar 25 19:12:41 2016 New Revision: 297271 URL: https://svnweb.freebsd.org/changeset/base/297271 Log: 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 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Mar 25 19:12:38 2016 (r297270) +++ head/Makefile.inc1 Fri Mar 25 19:12:41 2016 (r297271) @@ -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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603251912.u2PJCfI7062462>