This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

[RFA] makedoc target should use LDFLAGS_FOR_BUILD


All,

When doing some independent changes I found that the makedoc target in
newlib/doc is using LDFLAGS when linking.

This is incorrect as makedoc is built using the build compiler
(CC_FOR_BUILD), and LDFLAGS contains the target linker flags.

The attached patch corrects the Makefile to use LDFLAGS_FOR_BUILD for
the makedoc target.

newlib/ChangeLog:
2012-06-27  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

	* doc/Makefile.am (makedoc): Use LDFLAGS_FOR_BUILD not LDFLAGS.
	* doc/Makefile.in: Regenerate.

OK?

Thanks,

Matt
--
Matthew Gretton-Dann
Principal Engineer, PD Software - Tools, ARM Ltd
diff --git a/newlib/doc/Makefile.am b/newlib/doc/Makefile.am
index 5bf1359..c863007 100644
--- a/newlib/doc/Makefile.am
+++ b/newlib/doc/Makefile.am
@@ -12,7 +12,7 @@ MKDOC = makedoc$(EXEEXT_FOR_BUILD)
 # -Os, which CC_FOR_BUILD may not recognize.
 
 $(MKDOC): makedoc.o
-	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS) -o $(MKDOC) makedoc.o
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $(MKDOC) makedoc.o
 
 makedoc.o: makedoc.c
 	$(CC_FOR_BUILD) -g $(CFLAGS_FOR_BUILD) -c $(srcdir)/makedoc.c
diff --git a/newlib/doc/Makefile.in b/newlib/doc/Makefile.in
index 6237835..b9e3ad3 100644
--- a/newlib/doc/Makefile.in
+++ b/newlib/doc/Makefile.in
@@ -324,7 +324,7 @@ uninstall-am:
 # -Os, which CC_FOR_BUILD may not recognize.
 
 $(MKDOC): makedoc.o
-	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS) -o $(MKDOC) makedoc.o
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $(MKDOC) makedoc.o
 
 makedoc.o: makedoc.c
 	$(CC_FOR_BUILD) -g $(CFLAGS_FOR_BUILD) -c $(srcdir)/makedoc.c

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