OK, I bite. Implement the patch from PR ports/96407, to avoid the

-mcpu=foobar braindeadness.

There's a GCC bug open for this:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25672
so at least, the issue is being dealt with in its origin.

Submitted by:	Alex Mogilnikov <alx@intellectronika.ru>
PR:		ports/96407
This commit is contained in:
Joerg Wunsch 2006-10-10 10:24:51 +00:00
parent 2e18ce935c
commit 60ba18f36c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=175183
2 changed files with 14 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= gcc
PORTVERSION= 4.1.1
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GCC}
MASTER_SITES+= http://people.freebsd.org/~joerg/:local

View File

@ -0,0 +1,13 @@
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25672
--- Makefile.in.orig Thu Dec 15 19:02:02 2005
+++ Makefile.in Thu Apr 27 03:58:59 2006
@@ -329,7 +329,7 @@
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = -O2 $(filter-out -march=% -mcpu=%,$(CFLAGS)) $(SYSROOT_CFLAGS_FOR_TARGET)
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)