Date: Sun, 14 Feb 2016 11:21:50 -0800 From: Mark Millard <markmi@dsl-only.net> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: /usr/src/Makefile.inc1 vs. buildworld finding include files: a problem for some contexts? Message-ID: <A82D5D96-E9CF-48EE-B689-20AD22E44D0D@dsl-only.net>
next in thread | raw e-mail | index | archive | help
Is buildworld supposed to use /usr/include's area for finding files by = default? (I'm not talking of ${WORLDTMP}/usr/include but of just = /usr/include.) It does use /usr/include's area for some contexts: self-hosted builds = without a special XCC full path (e.g., an implicit TARGET_ARCH=3Dpowerpc = on a powerpc host using gcc 4.2.1 without an explicit XCC assignment = that also directs it to gcc 4.2.1 via a full path). /usr/src/Makefile.inc1 has the following sort of logic: > .if ${XCC:N${CCACHE_BIN}:M/*} . . . > .if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} =3D=3D gcc > XCFLAGS+=3D -isystem ${WORLDTMP}/usr/include = -L${WORLDTMP}/usr/lib > XCXXFLAGS+=3D -I${WORLDTMP}/usr/include/c++/v1 -std=3Dgnu++11 = -L${WORLDTMP}/../lib/libc++ . . . > .else . . . > .endif > XCFLAGS+=3D --sysroot=3D${WORLDTMP} ${BFLAGS} > XCXXFLAGS+=3D --sysroot=3D${WORLDTMP} ${BFLAGS} > .else > .if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) > BFLAGS+=3D -B${CROSS_BINUTILS_PREFIX} > XCFLAGS+=3D ${BFLAGS} > XCXXFLAGS+=3D ${BFLAGS} > .endif > .endif # ${XCC:M/*} For contexts without the -isystem and/or --sysroot in XCFLAGS . . . Is it appropriate to submit bug reports for buildworld getting include = files from /usr/include instead of from ${WORLDTMP} or from /usr/src = areas? This tends to be noticed when something like the following. . . > # svnlite update -r295453 /usr/src > # env __MAKE_CONF=3D/root/src.configs/make.conf = SRC_ENV_CONF=3D/root/src.configs/src.conf.powerpc-gcc421.powerpc-host = MAKEOBJDIRPREFIX=3D/usr/obj/gcc421/powerpc.powerpc make -j 6 buildworld = buildkernel ends up with compile errors from using some older /usr/include header = files that are no longer sufficient to allow compilation. I recently had a couple of examples where the cc command in the script = output file for the failing compiles showed no -I , no -isystem , no = --sysroot , nothing that would have allowed it to even potentially avoid = /usr/include (old file) use. The Makefile*'s involved had no = CFLAGS+=3DSOMETHING_DIRECTING_INCLUDE_SEARCH . (Some types of header changes might not stop a build but might make the = build result wrong without much explicit notification. I'd prefer to = avoid such as well.) I expect that there are analogous points/questions for finding = libraries. =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A82D5D96-E9CF-48EE-B689-20AD22E44D0D>