This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Static build of binutils 2.16.1


On 3/27/06, Pierre Wieser <pierre.wieser@gadz.org> wrote:
> >
> > Yes it (make LDFLAGS="-all-static") works only  with make configure-host
> > I tried to crosscompile after configure if i give make
> > LDFLAGS="-all-static" i get the following error. I tried give a
> > ac_cv_search_strerror=none required , then i got asprintf error. So
> > can you suggest a solution for that
> >
> > nik@deb:/dev/shm/binbuild$ ~/binutils-2.16/configure
>
> As Daniel stated, disparition of '-static' flag is a libtool issue (for some not
> obvious compatibility reasons).
>
> However, use of LDFLAGS=-all-static fires the now well-known error messages :
>
> checking for library containing strerror... configure: error: Link
> tests are not                                               allowed
> after GCC_NO_EXECUTABLES.
> make: *** [configure-libiberty] Error 1
>
> This is because libiberty/configure tries to gather compiler informations by
> compiling a program with the same LDFLAGS variable we previously pass on the
> command line.
> As gcc doesn't understand '-all-static' parm, configure believe that we are
> doing some sort of crosscompiling, and set gcc_no_link=yes.
>
> Perhaps, a work-around could be to create a new variable LTLDFLAGS which would
> handle parameters dedicated to (and silently eaten by) libtool, and to add this
> variable to the definition of LINK. Setting this LTLDFLAGS to "-all-static" when
> LDFLAGS contains '-static' is a dirty libtool hack, but it should work..
>
> Note that I have also tried to use LDFLAGS_FOR_BUILD or LDFLAGS_FOR_TARGET
> without any best result.
>
> Also Niklaus, I don't understand what you mean by 'configure-host'. Is it a
> special procedure ?
>
You can do it faster by make configure-host.
it builds all the things necessary.

Somehow i don't understand clearly what configure-host does but it
seems to work.
bash$binutils/configure --target= --prefix.
.....
...

bash$ make configure-host
....
...
..

bash$ make LDFLAGS="-all-static"

seems to work. try it out and let me know
 I picked it from google as far as i remember tldp.
Maybe daniel or somone needs to tell us how to fix it and do it right.

> Regards
> Pierre
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]