public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] CFLAGS, etc. used for the build system in bfd/doc/
@ 2005-02-13 16:55 Maciej W. Rozycki
  2005-02-14 10:11 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2005-02-13 16:55 UTC (permalink / raw)
  To: binutils

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
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] CFLAGS, etc. used for the build system in bfd/doc/
  2005-02-13 16:55 [PATCH] CFLAGS, etc. used for the build system in bfd/doc/ Maciej W. Rozycki
@ 2005-02-14 10:11 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2005-02-14 10:11 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: binutils

"Maciej W. Rozycki" <macro@linux-mips.org> writes:

> 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?

Yes.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-13 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-13 16:55 [PATCH] CFLAGS, etc. used for the build system in bfd/doc/ Maciej W. Rozycki
2005-02-14 10:11 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).