From patchwork Mon Mar 7 11:35:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/4] Fix RPM compilation Date: Mon, 07 Mar 2011 01:35:21 -0000 From: Alexandre Lissy X-Patchwork-Id: 85729 Message-Id: <1299497724-3972-2-git-send-email-alissy@mandriva.com> To: gcc-patches@gcc.gnu.org Cc: Alexandre Lissy The GCC's options -pipe and -Wp,-D_FORTIFY_SOURCE=2 are passed by default by Mandriva's GCC RPM spec file, and end up in some parts of MELT CFLAGS. But they should not end up there. --- gcc/Makefile.in | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 3f1ffa0..f841776 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -5341,6 +5341,7 @@ MELT_RAW_CFLAGS= \ ## since the generated routines are no more huge (since the ## initialization code is split in several chunks).. Likewise, avoid ## passing -gtoggle and -g +## Also remove -pipe and -Wp,-D_FORTIFY_SOURCE=2 MELTHERE_CFLAGS= $(filter-out -g, $(filter-out -gtoggle, $(MELT_RAW_CFLAGS))) export MELTHERE_CFLAGS @@ -5430,7 +5431,10 @@ melt_make_source_dir=$(srcdir)/melt melt_make_module_dir=$(objdir) melt_make_move=$(SHELL) $(srcdir)/../move-if-change ## Don't use := definitions here! -melt_make_cc1flags= -I. $(MELTHERE_CFLAGS) -I $(melt_build_include_dir) +## CC1 forbids -pipe and -Wp,-D_FORTIFY_SOURCE=2 +comma= , +MELTHERE_CC1_CFLAGS=$(filter-out -pipe -Wp$(comma)-D_FORTIFY_SOURCE=2, $(MELTHERE_CFLAGS)) +melt_make_cc1flags= -I. $(MELTHERE_CC1_CFLAGS) -I $(melt_build_include_dir) melt_cflags= -I. $(MELTHERE_CFLAGS) -I $(melt_build_include_dir) export melt_cflags ## extra cflags are for compiling applicative MELT files, e.g. xtramelt*.c