[PATCH] LDFLAGS configuration
Rob Landley
rob at landley.net
Wed Jun 7 21:50:25 UTC 2006
On Wednesday 07 June 2006 12:08 pm, Shaun Jackman wrote:
> On 6/6/06, Rob Landley <rob at landley.net> wrote:
> > Does supplying it as an environment variable work?
> >
> > LDFLAGS="-Wl,--verbose -Wl,-n -Wl,-O1 -Wl,-t" make
> >
> > There are such things as wrapper scripts...
>
> Yes, using an environment variable would work, although it's not
> recommended. See below for comments from the make's manual.
And cdrecord goes out of its way to complain about using /dev/hdc as the name
of the device to record to. Screw 'em both.
You can set these things either in environment variables or on the command
line. "LDFLAGS=blah make" or "make LDFLAGS=blah" should both work. Moving
some of it into CONFIG is about as non-flexible as having to edit the
makefile to change the default values.
> I'd much
> prefer, and it seems far more congruous, to set LDFLAGS in the same
> place one sets CFLAGS.
I'd prefer if they were both set on the command line, either before or after
the invocation of Make. (I keep meaning to test if
"make CROSS_COMPILE=prefix-" works for us the way it does for the Linux
kernel. I'd have to look up the precedence order of make variable
assignments, and I need to go get dinner before doing much more on the
computer. Getting punchy...)
> It seems pretty arbitrary that CFLAGS can be
> set in the configuration process, but LDFLAGS cannot.
Removing CFLAGS from the configuration process and updating the README to give
examples of how to do it right would make an equal amount of sense, but I
haven't wanted to touch the existing setup without a little more warning.
Right now menuconfig is used both to select features and to define the build
environment, and those two things really shouldn't be tied together like
that. (I don't think so anyway. Do you disagree?)
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list