On Thu, 2 Dec 2010, Nathan Whitehorn wrote:

Author: nwhitehorn
Date: Thu Dec  2 04:58:07 2010
New Revision: 216113
URL: http://svn.freebsd.org/changeset/base/216113

Log:
 The driver-XXX.c files used for host CPU detection with -march=native
 should not be compiled in the cross-tools case (where -march=native makes
 no sense). This fixes cross-building x86 toolchains on non-x86 systems.

I think it's wrong.  And it seems people running into the case now
cross compiling i386 on amd64 not picking up driver-i386.c anymore and
thus missing host_detect_local_cpu.
It could be this is related to a fix I had started to do for the
cross-gcc port:
http://people.freebsd.org/~bz/20101202-01-ports-devel-cross-gcc-za.diff
(the port still dies later on, thus not submitted yet).
but given that it was fine before, yu are simply removing the extra
file from compilation in that case now as I understand.

Modified:
 head/gnu/usr.bin/cc/Makefile.fe

Modified: head/gnu/usr.bin/cc/Makefile.fe
==============================================================================
--- head/gnu/usr.bin/cc/Makefile.fe     Thu Dec  2 04:28:01 2010        
(r216112)
+++ head/gnu/usr.bin/cc/Makefile.fe     Thu Dec  2 04:58:07 2010        
(r216113)
@@ -19,7 +19,8 @@ CFLAGS+= ${DRIVER_DEFINES}

SRCS=   gcc.c opts-common.c options.c intl.c prefix.c version.c

-.if exists(${GCCDIR}/config/${GCC_CPU}/driver-${GCC_CPU}.c)
+.if ${TARGET_ARCH} == ${MACHINE_ARCH} && \
+   exists(${GCCDIR}/config/${GCC_CPU}/driver-${GCC_CPU}.c)
SRCS+=  driver-${GCC_CPU}.c
.endif



--
Bjoern A. Zeeb                              Welcome a new stage of life.
        <ks> Going to jail sucks -- <bz> All my daemons like it!
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to