From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21066 invoked by alias); 13 Feb 2005 04:09:34 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 21015 invoked from network); 13 Feb 2005 04:09:25 -0000 Received: from unknown (HELO pollux.ds.pg.gda.pl) (153.19.208.7) by sourceware.org with SMTP; 13 Feb 2005 04:09:25 -0000 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 07AC0E1CBC for ; Sun, 13 Feb 2005 05:09:24 +0100 (CET) Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08304-02 for ; Sun, 13 Feb 2005 05:09:23 +0100 (CET) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id C8E96E1CB6 for ; Sun, 13 Feb 2005 05:09:23 +0100 (CET) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.13.1/8.13.1) with ESMTP id j1D49KET031845 for ; Sun, 13 Feb 2005 05:09:24 +0100 Date: Sun, 13 Feb 2005 16:55:00 -0000 From: "Maciej W. Rozycki" To: binutils@sources.redhat.com Subject: [PATCH] CFLAGS, etc. used for the build system in bfd/doc/ Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Status: Clean X-SW-Source: 2005-02/txt/msg00281.txt.bz2 Hello, There is a problem with building "chew" in bfd/doc/ when cross-compiling. The rule used correctly invokes $(CC_FOR_BUILD), but it uses $(CFLAGS), $(LOADLIBES) and $(LDFLAGS) which specify flags for the host system and not the build one. This is incorrect and even leads to a failure when a flag is used that's not recognized by the build compiler (such as "-march="). Here's an obvious fix. I've removed $(LOADLIBES) altogether -- anything needed can be supplied in $(LDFLAGS_FOR_BUILD). 2005-02-13 Maciej W. Rozycki * Makefile.am: Use CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD for building chew. * Makefile.in: Regenerate. OK to apply? binutils-2.15.94-20050203-chew-for_build.patch diff -up --recursive --new-file binutils-2.15.94-20050203.macro/bfd/doc/Makefile.am binutils-2.15.94-20050203/bfd/doc/Makefile.am --- binutils-2.15.94-20050203.macro/bfd/doc/Makefile.am 2004-12-21 05:25:10.000000000 +0000 +++ binutils-2.15.94-20050203/bfd/doc/Makefile.am 2005-02-06 03:09:49.000000000 +0000 @@ -55,10 +55,10 @@ info_TEXINFOS = bfd.texinfo MKDOC = chew$(EXEEXT_FOR_BUILD) $(MKDOC): chew.o - $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS) + $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) chew.o: chew.c - $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c + $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c protos: libbfd.h libcoff.h bfd.h