This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, build] Fix PR 37137
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Oct 2008 09:53:36 +0200
- Subject: Re: [PATCH, build] Fix PR 37137
- References: <18670.37080.3760.968524@foo.home>
Adam Nemet wrote:
> The problem in the bug is that currently CFLAGS_FOR_TARGET is used to build
> host libraries (e.g., all-stage1-libiberty) which are built with the
> pre-installed host compiler.
I think the problem is that those host libraries should be built with
CFLAGS, not LIBCFLAGS. LIBCFLAGS is a legacy that should be superseded
by CFLAGS_FOR_TARGET, and it should be useless to use it in libiberty.
In other words, does the attached patch work?
Paolo
2008-10-10 Paolo Bonzini <bonzini@gnu.org>
* libiberty/Makefile.in (LIBCFLAGS): Remove. Replace throughout
with CFLAGS.
(FLAGS_TO_PASS): Remove LIBCFLAGS.
Index: libiberty/Makefile.in
===================================================================
--- libiberty/Makefile.in (revisione 134435)
+++ libiberty/Makefile.in (copia locale)
@@ -55,7 +55,6 @@ AR_FLAGS = rc
CC = @CC@
CFLAGS = @CFLAGS@
-LIBCFLAGS = $(CFLAGS)
RANLIB = @RANLIB@
MAKEINFO = @MAKEINFO@
PERL = @PERL@
@@ -80,7 +79,6 @@ FLAGS_TO_PASS = \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"DESTDIR=$(DESTDIR)" \
- "LIBCFLAGS=$(LIBCFLAGS)" \
"EXTRA_OFILES=$(EXTRA_OFILES)" \
"HDEFINES=$(HDEFINES)" \
"INSTALL=$(INSTALL)" \
@@ -111,7 +109,7 @@ installcheck: installcheck-subdir
INCDIR=$(srcdir)/$(MULTISRCTOP)../include
-COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
+COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
# Just to make sure we don't use a built-in rule with VPATH
.c.o:
@@ -350,9 +348,9 @@ install: install_to_$(INSTALL_DEST) inst
# This is tricky. Even though CC in the Makefile contains
# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
-# default multilib, so we have to take LIBCFLAGS into account as well,
+# default multilib, so we have to take CFLAGS into account as well,
# since it will be passed the multilib flags.
-MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory`
+MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
install_to_libdir: all
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n