From 64d40c9f8c1b4d9a3355f6fa6fcace1dd40c9f3d Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 25 Mar 2016 19:12:38 +0000 Subject: Build libcompat (lib32) with a --sysroot pointing into its stage directory. This overrides the cross-compiler's default sysroot to use the WORLD32's sysroot for building the lib32 libraries. Previously the cross-compiler would default the sysroot to the 64bit WORLDTMP and -B/-L/-isystem flags were used to build using the lib32 files. This leads to multiple issues discussed later. Some extra headers are now needed to be staged since the 64bit WORLDTMP is not referenced at all for headers. The 64bit WORLDTMP is still used via PATH for build tools. Overriding the default target/arch is retained in the CC/CXX overrides. This allows reverting the LDSCRIPT rewriting in installworld from r296921 and r235122, thus allowing read-only objdirs to work for installing again. This removes the need for _LDSCRIPTROOT. This allows progressing the change to always use --sysroot for the build rather than only relying on the cross-compiler's default sysroot. The work for that is in D3970 and needed to resolve WITHOUT_CROSS_COMPILER not using a --sysroot [1]. PR: 196193 [1] Sponsored by: EMC / Isilon Storage Division --- Makefile.inc1 | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 077789f..135d9bf 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -360,7 +360,6 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ # world stage WMAKEENV= ${CROSSENV} \ - _LDSCRIPTROOT= \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} -- cgit v1.1 From db936da363a52fe99a03cc894e0b81316494c4c8 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 25 Mar 2016 19:12:41 +0000 Subject: 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 --- Makefile.inc1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 135d9bf..fddb06e 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -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. -- cgit v1.1 From 49b21be11002903a343d6a9a9022c6bb47e02eae Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 25 Mar 2016 22:36:13 +0000 Subject: WITHOUT_CROSS_COMPILER: Fix this to use external compiler logic. Without this the default toolchain in /usr/bin/ would not use WORLDTMP via --sysroot, and would lack --target if cross-building. PR: 196193 Related: D3970 Sponsored by: EMC / Isilon Storage Division --- Makefile.inc1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index fddb06e..2e39d6c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -413,7 +413,8 @@ CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ SIZE="${XSIZE}" -.if ${XCC:N${CCACHE_BIN}:M/*} +# External compiler needs sysroot and target flags. +.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no" .if defined(CROSS_BINUTILS_PREFIX) # In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a # directory, but the compiler will look in the right place for it's @@ -454,7 +455,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} XCFLAGS+= ${BFLAGS} XCXXFLAGS+= ${BFLAGS} .endif -.endif # ${XCC:M/*} +.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ ${TARGET_ARCH} == "powerpc64") -- cgit v1.1 From 60235e3ecec5ff23ae23e75f0cbb079b759e61bd Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 25 Mar 2016 22:36:23 +0000 Subject: External compiler: Remove redundant flags from CXXFLAGS. The use of XCXXFLAGS is to assign it to CXX in CROSSENV. XCFLAGS is also assigned here so there is no need to have --syroot and -B flags again. Sponsored by: EMC / Isilon Storage Division --- Makefile.inc1 | 2 -- 1 file changed, 2 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 2e39d6c..34ba23a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -448,12 +448,10 @@ TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} -XCXXFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} .else .if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${CROSS_BINUTILS_PREFIX} XCFLAGS+= ${BFLAGS} -XCXXFLAGS+= ${BFLAGS} .endif .endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" -- cgit v1.1 From 4eeae99e561113a2846b3b5e960db0a9b76f9251 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 25 Mar 2016 22:36:26 +0000 Subject: CROSS_BINUTILS_PREFIX: Reduce redundant logic. Sponsored by: EMC / Isilon Storage Division --- Makefile.inc1 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 34ba23a..a01286a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -413,16 +413,16 @@ CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ SIZE="${XSIZE}" -# External compiler needs sysroot and target flags. -.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no" -.if defined(CROSS_BINUTILS_PREFIX) +.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) # In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a -# directory, but the compiler will look in the right place for it's +# directory, but the compiler will look in the right place for its # tools so we don't need to tell it where to look. -.if exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${CROSS_BINUTILS_PREFIX} .endif -.else + +# External compiler needs sysroot and target flags. +.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no" +.if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${WORLDTMP}/usr/bin .endif .if ${TARGET} == "arm" @@ -447,13 +447,13 @@ TARGET_ABI?= unknown TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XCFLAGS+= -target ${TARGET_TRIPLE} .endif -XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} +XCFLAGS+= --sysroot=${WORLDTMP} .else -.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) -BFLAGS+= -B${CROSS_BINUTILS_PREFIX} +.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" + +.if !empty(BFLAGS) XCFLAGS+= ${BFLAGS} .endif -.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ ${TARGET_ARCH} == "powerpc64") -- cgit v1.1 From 0f40e82d352beb9d2a8fbbe09cc2a74ecbcbd042 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 25 Mar 2016 22:36:32 +0000 Subject: WITHOUT_TOOLCHAIN: Fix includes not being staged in WORLDTMP. This has been the case since r264930 and r274662. Sponsored by: EMC / Isilon Storage Division --- Makefile.inc1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index a01286a..71006bc 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -623,9 +623,9 @@ _includes: # Special handling for SUBDIR_OVERRIDE in buildworld as they most likely need # headers from default SUBDIR. Do SUBDIR_OVERRIDE includes last. ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ - includes + MK_INCLUDES=yes includes .if !empty(SUBDIR_OVERRIDE) && make(buildworld) - ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes + ${_+_}cd ${.CURDIR}; ${WMAKE} MK_INCLUDES=yes SHARED=symlinks includes .endif _libraries: @echo -- cgit v1.1 From b2e15b6a2fd49d74a89bbae601cc3af84e934d0f Mon Sep 17 00:00:00 2001 From: emaste Date: Mon, 28 Mar 2016 19:51:45 +0000 Subject: simplify compile-time default keyboard map generation In r296926 the -P option was added to kbdcontrol, which enables this change for a simplified compile-time default keymap build process. PR: 193865 Reviewed by: Oliver Pinter Tested by: Oliver Pinter MFC After: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5708 --- Makefile.inc1 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 71006bc..ae90197 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1361,6 +1361,11 @@ _crunch= usr.sbin/crunch _awk= usr.bin/awk .endif +# r296926 -P keymap search path +.if ${BOOTSTRAPPING} < 1100103 +_kbdcontrol= usr.sbin/kbdcontrol +.endif + _yacc= lib/liby \ usr.bin/yacc @@ -1425,6 +1430,7 @@ bootstrap-tools: .PHONY ${_awk} \ ${_cat} \ ${_dd} \ + ${_kbdcontrol} \ usr.bin/lorder \ ${_libopenbsd} \ ${_makewhatis} \ -- cgit v1.1 From 59f4cb814dffd0fdde3c6d489c893c2cb67f3fc2 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Wed, 30 Mar 2016 23:50:23 +0000 Subject: Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. Reviewed by: emaste, hselasky (partial), brooks (brief) Discussed on: arch@ Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5742 --- Makefile.inc1 | 74 ++++++++++++----------------------------------------------- 1 file changed, 15 insertions(+), 59 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index ae90197..acf739c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -7,10 +7,9 @@ # -DDB_FROM_SRC use the user/group databases in src/etc instead of # the system database when installing. # -DNO_SHARE do not go into share subdir -# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ} +# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ} # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel -# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel # -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel # -DNO_PORTSUPDATE do not update ports in ${MAKE} update # -DNO_ROOT install without using root privilege @@ -145,16 +144,6 @@ CLEANDIR= clean cleandepend CLEANDIR= cleandir .endif -# FAST_DEPEND can skip depend tree-walks. -.if ${MK_FAST_DEPEND} == "yes" -NO_DEPEND= t -NO_KERNELDEPEND=t -.endif -# Ensure shell checks later have a value. -.if defined(NO_DEPEND) -NO_DEPEND= t -.endif - LOCAL_TOOL_DIRS?= PACKAGEDIR?= ${DESTDIR}/${DISTDIR} @@ -406,7 +395,6 @@ X${BINUTIL}?= ${${BINUTIL}} .endif .endfor CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ - DEPFLAGS="${DEPFLAGS}" \ CPP="${XCPP} ${XCFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ OBJDUMP=${XOBJDUMP} OBJCOPY="${XOBJCOPY}" \ @@ -438,10 +426,6 @@ 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. -DEPFLAGS+= -I${WORLDTMP}/usr/include/c++/v1 .else TARGET_ABI?= unknown TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 @@ -635,16 +619,10 @@ _libraries: ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no \ MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} libraries -_depend: - @echo - @echo "--------------------------------------------------------------" - @echo ">>> stage 4.3: make dependencies" - @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${WMAKE} depend everything: @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 4.4: building everything" + @echo ">>> stage 4.3: building everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; _PARALLEL_SUBDIR_OK=1 ${WMAKE} all @@ -655,9 +633,6 @@ WMAKE_TGTS+= _bootstrap-tools .endif WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools WMAKE_TGTS+= _includes _libraries -.if !defined(NO_DEPEND) -WMAKE_TGTS+= _depend -.endif WMAKE_TGTS+= everything .if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= build${libcompat} @@ -700,7 +675,7 @@ buildenv: .PHONY @cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \ || true -TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild${libcompat}} +TOOLCHAIN_TGTS= ${WMAKE_TGTS:Neverything:Nbuild${libcompat}} toolchain: ${TOOLCHAIN_TGTS} kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} @@ -997,7 +972,6 @@ distrib-dirs distribution: .MAKE .PHONY .if defined(KERNFAST) NO_KERNELCLEAN= t NO_KERNELCONFIG= t -NO_KERNELDEPEND= t NO_KERNELOBJ= t # Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah .if !defined(KERNCONF) && ${KERNFAST} != "1" @@ -1079,16 +1053,9 @@ buildkernel: .MAKE .PHONY @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools -.if !defined(NO_KERNELDEPEND) - @echo - @echo "--------------------------------------------------------------" - @echo ">>> stage 3.1: making dependencies" - @echo "--------------------------------------------------------------" - ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ -.endif @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 3.2: building everything" + @echo ">>> stage 3.1: building everything" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ @echo "--------------------------------------------------------------" @@ -1287,11 +1254,10 @@ legacy: false .endif .for _tool in tools/build ${_elftoolchain_libs} - ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \ - if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor @@ -1447,10 +1413,9 @@ bootstrap-tools: .PHONY ${_vtfontcvt} \ usr.bin/localedef ${_bt}-${_tool}: .PHONY .MAKE - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install @@ -1496,10 +1461,9 @@ build-tools: build-tools_${_tool} .for _tool in \ ${_gcc_tools} build-tools_${_tool}: .PHONY - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ + ${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all build-tools: build-tools_${_tool} .endfor @@ -1580,10 +1544,9 @@ cross-tools: .MAKE .PHONY ${_btxld} \ ${_crunchide} \ ${_usb_tools} - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor @@ -1612,10 +1575,9 @@ NXBMAKE= ${NXBENV} ${MAKE} \ native-xtools: .PHONY .if ${MK_GCC_BOOTSTRAP} != "no" mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin - ${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \ cd ${.CURDIR}/${_gperf}; \ ${NXBMAKE} DIRPRFX=${_gperf}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ depend; fi; \ ${NXBMAKE} DIRPRFX=${_gperf}/ all; \ ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install .endif @@ -1687,10 +1649,9 @@ native-xtools: .PHONY usr.bin/xz \ usr.bin/yacc \ usr.sbin/chown - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${NXBMAKE} DIRPRFX=${_tool}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ depend; fi; \ ${NXBMAKE} DIRPRFX=${_tool}/ all; \ ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install .endfor @@ -1926,10 +1887,9 @@ gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) - ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ cd ${.CURDIR}/${_lib}; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; fi; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ @@ -1940,10 +1900,9 @@ ${_lib}__PL: .PHONY .MAKE .for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs} ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) - ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \ cd ${.CURDIR}/${_lib}; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; fi; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install .endif @@ -1953,10 +1912,9 @@ ${_lib}__L: .PHONY .MAKE # static PAM library, and dynamic PAM library before dynamic PAM # modules. lib/libpam__L: .PHONY .MAKE - ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> lib/libpam (obj,all,install)"; \ cd ${.CURDIR}/lib/libpam; \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ depend; fi; \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \ -D_NO_LIBPAM_SO_YET all; \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \ @@ -2251,10 +2209,9 @@ _xb-bootstrap-tools: .PHONY .for _tool in \ ${_clang_tblgen} \ ${_gperf} - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ depend; fi; \ ${CDMAKE} DIRPRFX=${_tool}/ all; \ ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install .endfor @@ -2271,10 +2228,9 @@ _xb-cross-tools: .PHONY ${_clang_libs} \ ${_clang} \ ${_cc} - ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \ + ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ obj; \ - if [ -z "${NO_DEPEND}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ depend; fi; \ ${CDMAKE} DIRPRFX=${_tool}/ all .endfor -- cgit v1.1 From 4dad3c9162748d9f5b5b40d872d26437f0618fee Mon Sep 17 00:00:00 2001 From: bdrewery Date: Wed, 30 Mar 2016 23:50:29 +0000 Subject: Fix the external GCC build after r297271 by setting -L /usr/lib. GCC does add /usr/lib to the library search path but it comes after /usr/local/lib which can find ports libraries such as libedit.so. The bad path comes in as /usr/local/lib/gcc/x86_64-portbld-freebsd11.0/5.3.0/../../../ which corresponds to /lib. This partially reverts r297271. Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division --- Makefile.inc1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index acf739c..7c027a8 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -421,8 +421,8 @@ TARGET_ABI= gnueabi .endif .endif .if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc -# GCC requires -isystem when using a cross-compiler. -XCFLAGS+= -isystem ${WORLDTMP}/usr/include +# GCC requires -isystem and -L when using a cross-compiler. +XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib # Force using libc++ for external GCC. XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ -L${WORLDTMP}/../lib/libc++ -- cgit v1.1