From owner-svn-src-all@FreeBSD.ORG Thu Dec 2 04:58:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 843A4106566B; Thu, 2 Dec 2010 04:58:07 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 724168FC19; Thu, 2 Dec 2010 04:58:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB24w7PR079941; Thu, 2 Dec 2010 04:58:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB24w7IY079939; Thu, 2 Dec 2010 04:58:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201012020458.oB24w7IY079939@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 2 Dec 2010 04:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216113 - head/gnu/usr.bin/cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2010 04:58:07 -0000 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