[Bug 473] Chapter 5: Textutils, Findutils, Gawk, Patch, Sed, Textutils Configure Command

Bill's LFS Login lfsbill at wlmcs.com
Fri Jan 17 08:15:23 PST 2003


On Fri, 17 Jan 2003, Gerard Beekmans wrote:

> On January 17, 2003 04:52 am, Bill's LFS Login wrote:
> > To test this, I made a dir in /tmp and created the following.
>
> I just noticed something.
>
> > At the command line I then type
> >
> >      LDFLAGS="-static" ./configure && ./make && ./make install
> >
> > Results:
> >
> >     doing configure: LDFLAGS=-static
> >     make: LDFLAGS=
> >     make: doing install and LDFLAGS=
>
> Yes that's normal. The LDFLAGS variable only gets sent to the configure
> script. That's intentionally actually.
>
> What happens here is this:
>
> the configure script gets an LDFLAGS variable passed into it and the
configure
> script will append the -static value to whatever other LDFLAGS values it
> already has setup. Then the configure script writes the LDFLAGS variable and
> value into the Makefile files in the package. So when you run 'make' our
> environment variable LDFLAGS isn't set anymore, but the Makefile files have
> LDFLAGS variables now with a value of -static which has the desired end
> result: statically linked programs.
>
> If we were to run 'make LDFLAGS=-static' it would work also, but now we would
> overwrite whatever value LDFLAGS already had. For a chapter 5 system that's
> not a big deal, but in chapter 6 you need to be careful with that. It's
> better to let configure know about it, so it can append rather than overwrite
> the variable's values.

Yes, all agreed. But then what is causing the OP's problem? Do you think
maybe his scripts/Makefiles/config or package version is different?

Must be, don't you think?

-- 
Bill Maltby
lfsbill at wlmcs.com

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-book' in the subject header of the message



More information about the lfs-book mailing list