https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206484

            Bug ID: 206484
           Summary: powerpc (non-64) -r294201: /usr/src/Makefile.inc1 can
                    try -target on gcc 4.2.1's cpp command lines but it is
                    rejected by cpp
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: ppc
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: mar...@dsl-only.net

[powerpc (non-64) context, so gcc 4.2.1, not clang]

When attempting to buildworld using WITHOUT_GCC_BOOTRAP= for 11.0-CURRENT
-r294201 (a rebuild of what was already running but with debug files turned on)
I got:

--- key_prot.h ---
RPCGEN_CPP=cpp\ -target\ powerpc-unknown-freebsd11.0\
--sysroot=/usr/obj/gcc421/powerpc.powerpc/usr/src/tmp\
-B/usr/obj/gcc421/powerpc.powerpc/usr/src/tmp/usr/bin rpcgen -C -h -DWANT_NFS3
/usr/src/inc
lude/rpcsvc/key_prot.x -o key_prot.h
cpp: powerpc-unknown-freebsd11.0: No such file or directory
cpp: warning: '-x c' after last input file has no effect
cpp: unrecognized option '-target'
cpp: No input files specified
--- includes_subdir_gnu ---
--- includes_subdir_libregex ---
--- includes_subdir_include ---
*** [key_prot.h] Error code 1

make[4]: stopped in /usr/src/include/rpcsvc
--- includes_subdir_lib ---
--- includes_subdir_libelf ---
--- includes_subdir_include ---
1 error


This results from 4.2.1 gcc's cpp not accepting -target and the following in
/usr/src/Makefile.inc1 :
(XCC, XCXX, and XCPP were initially undefined)

XCOMPILERS=     CC CXX CPP
.for COMPILER in ${XCOMPILERS}
.if defined(CROSS_COMPILER_PREFIX)
X${COMPILER}?=  ${CROSS_COMPILER_PREFIX}${${COMPILER}}
.else
X${COMPILER}?=  ${${COMPILER}}
.endif
.endfor
. . .
CROSSENV+=      CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \
                DEPFLAGS="${DEPFLAGS}" \
                CPP="${XCPP} ${XCFLAGS}" \
. . .
.if ${XCC:N${CCACHE_BIN}:M/*}
. . .
.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
. . .
.else
TARGET_ABI?=    unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XCFLAGS+=       -target ${TARGET_TRIPLE}
.endif
. . .
.else
. . .
.endif # ${XCC:M/*}

The assumption in the CROSSENV+= that ${XCFLAGS} is always valid in its content
for use with ${XCPP} is false, unfortunately. Other XCFLAGS material from
src.conf or make.conf could create similar problems.

Using WITH_GCC_BOOTSTRAP= instead for the buildworld avoids this issue so long
as my src.conf and make.conf do not set XCFLAGS to something that creates
another problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to