Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Dec 2010 04:58:07 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216113 - head/gnu/usr.bin/cc
Message-ID:  <201012020458.oB24w7IY079939@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.

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
 



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