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.
This commit is contained in:
Nathan Whitehorn 2010-12-02 04:58:07 +00:00
parent 704c91294b
commit 5a7bfc90a9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216113

View File

@ -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