This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] CFLAGS, etc. used for the build system in bfd/doc/


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  <macro@linux-mips.org>

	* 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
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]