From owner-svn-src-all@freebsd.org Wed Nov 25 19:45:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5925DA37833; Wed, 25 Nov 2015 19:45:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E97061F7B; Wed, 25 Nov 2015 19:45:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJj2S2004182; Wed, 25 Nov 2015 19:45:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJj2fR004181; Wed, 25 Nov 2015 19:45:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251945.tAPJj2fR004181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291324 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:45:03 -0000 Author: bdrewery Date: Wed Nov 25 19:45:01 2015 New Revision: 291324 URL: https://svnweb.freebsd.org/changeset/base/291324 Log: META MODE: Fix MACHINE=host builds. We need to not use -nostdinc since it breaks building of clang itself. Use -isystem rather than -I/usr/include and -nostdinc which gets us using the stage include directory before searching the real host headers. This allows removing more of the -I hacks to get host headers since the headers are no longer excluded. The -B seemed unneeded. This fixes building of secure/lib/libcrypto which was looking at the /usr/include/openssl/asn1.h header rather than the staged one. This fixes building of clang which wants to find its own internal headers in the STAGEDIR/usr/lib/clang/* path. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.init.mk Modified: head/share/mk/local.init.mk ============================================================================== --- head/share/mk/local.init.mk Wed Nov 25 19:44:58 2015 (r291323) +++ head/share/mk/local.init.mk Wed Nov 25 19:45:01 2015 (r291324) @@ -9,21 +9,20 @@ .endif .endif +# XXX: This should be combined with external compiler support in Makefile.inc1 +# and local.meta.sys.mk (CROSS_TARGET_FLAGS) .if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host" CFLAGS_LAST+= --sysroot=${SYSROOT} CXXFLAGS_LAST+= --sysroot=${SYSROOT} LDADD+= --sysroot=${SYSROOT} .elif ${MK_STAGING} == "yes" -CFLAGS+= -nostdinc -CFLAGS+= -I${STAGE_INCLUDEDIR} +CFLAGS+= -isystem ${STAGE_INCLUDEDIR} +# XXX: May be needed for GCC to build with libc++ rather than libstdc++. See Makefile.inc1 +#CXXFLAGS+= -std=gnu++11 +#LDADD+= -L${STAGE_LIBDIR}/libc++ +#CXXFLAGS+= -I${STAGE_INCLUDEDIR}/usr/include/c++/v1 LDADD+= -L${STAGE_LIBDIR} .endif -.if ${MACHINE} == "host" -# we cheat? -LDADD+= -B/usr/lib -CFLAGS_LAST+= -I/usr/include -CXXFLAGS_LAST+= -I/usr/include -.endif .if ${MACHINE} == "host" .if ${.MAKE.DEPENDFILE:E} != "host"