This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[RFA] makedoc target should use LDFLAGS_FOR_BUILD
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Wed, 27 Jun 2012 11:12:37 +0100
- Subject: [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