Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2016 07:08:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 206484] 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
Message-ID:  <bug-206484-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206484

            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: markmi@dsl-only.net

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

When attempting to buildworld using WITHOUT_GCC_BOOTRAP=3D 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=3Dcpp\ -target\ powerpc-unknown-freebsd11.0\
--sysroot=3D/usr/obj/gcc421/powerpc.powerpc/usr/src/tmp\
-B/usr/obj/gcc421/powerpc.powerpc/usr/src/tmp/usr/bin rpcgen -C -h -DWANT_N=
FS3
/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=3D     CC CXX CPP
.for COMPILER in ${XCOMPILERS}
.if defined(CROSS_COMPILER_PREFIX)
X${COMPILER}?=3D  ${CROSS_COMPILER_PREFIX}${${COMPILER}}
.else
X${COMPILER}?=3D  ${${COMPILER}}
.endif
.endfor
. . .
CROSSENV+=3D      CC=3D"${XCC} ${XCFLAGS}" CXX=3D"${XCXX} ${XCFLAGS} ${XCXX=
FLAGS}" \
                DEPFLAGS=3D"${DEPFLAGS}" \
                CPP=3D"${XCPP} ${XCFLAGS}" \
. . .
.if ${XCC:N${CCACHE_BIN}:M/*}
. . .
.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} =3D=3D gcc
. . .
.else
TARGET_ABI?=3D    unknown
TARGET_TRIPLE?=3D ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XCFLAGS+=3D       -target ${TARGET_TRIPLE}
.endif
. . .
.else
. . .
.endif # ${XCC:M/*}

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

Using WITH_GCC_BOOTSTRAP=3D 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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206484-8>