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

See crosstool-NG for lots more information.


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: [PATCH] Fixup the static toolchain build problem


Hi, Yan

   The new patch is attathed. I remove the "-static" option,
because I have tested, and the result shows that the "-all-staic" is enough
to create the static toolchain. 

   If "-static" is places ahead of "-all-static", the later one will no take
the effect, and the static toolchain build will fail at binutils stage.

   Would you please have a review? 


On 2014-07-08 22:09:54, Yann E. MORIN wrote:
> Date: Tue, 8 Jul 2014 22:09:54 +0200
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> To: "brock.zheng" <goodmenzy@gmail.com>
> Cc: crosstool-NG ML <crossgcc@sourceware.org>
> Subject: Re: [PATCH] Fixup the static toolchain build problem
> User-Agent: Mutt/1.5.22 (2013-10-16)
> 
> Brock, All,
> 
> On 2014-07-08 20:29 +0800, brock.zheng spake thusly:
> >    When build binutils, libtool tried to translate -lfl to /usr/lib/libfl.so
> >    But when change to "LDFLAGS=-all-static -static", libtool works fine.
> >    -lfl will be translated to /usr/lib/libfl.a
> 
> Here are a few comments on your patch.
> 
> First you forgot to add your Signed-oof-by to the patch, so we can't use
> it. See:
>     http://crosstool-ng.org/git/crosstool-ng/tree/docs/7%20-%20Contributing%20to%20crosstool-NG.txt
> 
> Second, in a previous mail, you said:
> 
>     I have checked the libtool script, and found that the following option
>           -all-static
>           -static
>           -static-libtool-libs
>     is processed in a strange way. If any one of those three option appears
>     firstly in the cmdline, all others
>     will be neglected. Our LDFLAGS is ".... -static -all-static -o", so the
>     -static option takes the real effect,
>     and the -all-static has no useage actually! that is the cause of the
>     failure.
> 
> So, if only the first option is in effect, why do we still cary the
> -static ?
> 
> Otherwise, I'm not opposed to the idea. ;-)
> 
> Regards,
> Yann E. MORIN.
> 
> > ---
> >  scripts/build/binutils/binutils.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
> > index b6207be..cc57b5a 100644
> > --- a/scripts/build/binutils/binutils.sh
> > +++ b/scripts/build/binutils/binutils.sh
> > @@ -220,7 +220,7 @@ do_binutils_backend() {
> >          "${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
> >  
> >      if [ "${static_build}" = "y" ]; then
> > -        extra_make_flags+=("LDFLAGS=-static -all-static")
> > +        extra_make_flags+=("LDFLAGS=-all-static -static")
> >          CT_DoLog EXTRA "Prepare binutils for static build"
> >          CT_DoExecLog ALL make ${JOBSFLAGS} configure-host
> >      fi
> > -- 
> > 2.0.1
> > 
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> 
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
> 

-- 
Brock Zheng <yzheng@techyauld.com>
é ç

åääçèèçæååæéåå
åäåææåäåæèè8åäåæèäå21åæåææèååäåååïéçï100094ï

>From ba038d4ef1a4c0691a7cc695d1a48c1593417662 Mon Sep 17 00:00:00 2001
From: Brock Zheng <goodmenlinux@gmail.com>
Date: Fri, 11 Jul 2014 09:04:08 +0800
Subject: [PATCH] binutils: Fixup the static toolchain build problem

    When try to build the static toolchain, binutils failed.

    I have checked the libtool script, and found that the following option
          -all-static
          -static
          -static-libtool-libs

    are processed in a strange way. If any one of those three options
    appears firstly in the cmdline, all others will be neglected. Our
    LDFLAGS is ".... -static -all-static -o", so the -static option
    takes the real effect, and the -all-static has no useage actually!
    that is the cause of the failure.

Signed-off-by: Brock Zheng <goodmenlinux@gmail.com>
---
 scripts/build/binutils/binutils.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index b6207be..a0d9208 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -220,7 +220,7 @@ do_binutils_backend() {
         "${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
 
     if [ "${static_build}" = "y" ]; then
-        extra_make_flags+=("LDFLAGS=-static -all-static")
+        extra_make_flags+=("LDFLAGS=-all-static")
         CT_DoLog EXTRA "Prepare binutils for static build"
         CT_DoExecLog ALL make ${JOBSFLAGS} configure-host
     fi
-- 
2.0.1


--
For unsubscribe information see http://sourceware.org/lists.html#faq

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