From: Juergen Beisert <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] fbtest: Make its build-system aware of external CFLAGS and LDFLAGS
Date: Fri, 29 Jun 2012 16:37:01 +0200 [thread overview]
Message-ID: <201206291637.01565.jbe@pengutronix.de> (raw)
In-Reply-To: <20120629140230.GT10551@pengutronix.de>
Michael Olbrich wrote:
> [...]
> > +
> > + $(TARGET): $(OBJS)
> > +- $(CC) -o $(TARGET) $(filter $(OBJS), $^) $(LIBS)
> > ++ $(CC) -o $(TARGET) $(filter $(OBJS), $^) $(LIBS) $(LDFLAGS)
>
> $(CC) $(LDFLAGS) -o $(TARGET) $(filter $(OBJS), $^) $(LIBS)
>
> I think. I'm not sure it makes a difference here, but in general LDFLAGS
> should come first.
I took a look into the built-in rules of "make":
To convert a C-file into a binary the following built-in rule will be used:
$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
"LINK.c" is defined to:
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
Which results into the following line:
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@
So, you could be right. I will change it.
jbe
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2012-06-29 14:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 13:41 Juergen Beisert
2012-06-29 14:02 ` Michael Olbrich
2012-06-29 14:37 ` Juergen Beisert [this message]
2012-06-29 14:44 ` [ptxdist] [PATCHv2] " Juergen Beisert
2012-06-29 15:32 ` Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201206291637.01565.jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox