* [PATCH] Use LDFLAGS instead of ALL_CFLAGS when linking.
@ 2005-10-29 7:30 Andreas Ericsson
2005-10-29 16:24 ` H. Peter Anvin
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Ericsson @ 2005-10-29 7:30 UTC (permalink / raw)
To: Git Mailing List
The patch says it all really. It lets users specify their own linking
options and unclutters the build-output somewhat.
index 5b0306d..f547d45 100644
--- a/Makefile
+++ b/Makefile
@@ -360,7 +360,7 @@ git-cherry-pick: git-revert
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
git-%$X: %.o $(LIB_FILE)
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+ $(CC) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)
$(SIMPLE_PROGRAMS) : $(LIB_FILE)
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Use LDFLAGS instead of ALL_CFLAGS when linking.
2005-10-29 7:30 [PATCH] Use LDFLAGS instead of ALL_CFLAGS when linking Andreas Ericsson
@ 2005-10-29 16:24 ` H. Peter Anvin
0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2005-10-29 16:24 UTC (permalink / raw)
To: Andreas Ericsson; +Cc: Git Mailing List
Andreas Ericsson wrote:
> The patch says it all really. It lets users specify their own linking
> options and unclutters the build-output somewhat.
>
> index 5b0306d..f547d45 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -360,7 +360,7 @@ git-cherry-pick: git-revert
> $(CC) -o $*.o -c $(ALL_CFLAGS) $<
>
> git-%$X: %.o $(LIB_FILE)
> - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
> + $(CC) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
>
Typically $(LDFLAGS) comes before $(LIBS). This is not insignificant,
since some people put library seach options into LDFLAGS.
-hpa
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-29 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-29 7:30 [PATCH] Use LDFLAGS instead of ALL_CFLAGS when linking Andreas Ericsson
2005-10-29 16:24 ` H. Peter Anvin
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 NNTP newsgroup(s).