ports/devel/avr-gcc/files/patch-bug25672
Joerg Wunsch 60ba18f36c 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
2006-10-10 10:24:51 +00:00

13 lines
671 B
Text

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)