public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] Fixup the static toolchain build problem
       [not found] <20140708122909.GC2031@nagra.com>
@ 2014-07-08 20:10 ` Yann E. MORIN
  2014-07-09 12:25   ` Filipp Andjelo
  2014-07-11  1:15   ` brock.zheng
  0 siblings, 2 replies; 4+ messages in thread
From: Yann E. MORIN @ 2014-07-08 20:10 UTC (permalink / raw)
  To: brock.zheng; +Cc: crosstool-NG ML

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fixup the static toolchain build problem
  2014-07-08 20:10 ` [PATCH] Fixup the static toolchain build problem Yann E. MORIN
@ 2014-07-09 12:25   ` Filipp Andjelo
  2014-07-11  1:15   ` brock.zheng
  1 sibling, 0 replies; 4+ messages in thread
From: Filipp Andjelo @ 2014-07-09 12:25 UTC (permalink / raw)
  To: crossgcc

Hi Yann,

On 08.07.2014 22:09, Yann E. MORIN wrote:
> 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
>>
Currently, this patch wouldn't help me. I looked at my system in detail 
and realized, that unfortunately I don't have static libraries for lots 
of dependencies and have to compile everything dynamically. When I 
switch off "static toolchain" I can build everything almost without a 
problem. Well - almost - because I had to patch ppl-0.10.2 (just like 
0.11.2 already done for std::ptrdiff_t)... in the end, there are at 
least two patches (another one for duma on mingw) and I'd like to 
contribute them, when I'm completely done with testing.

The question now regarding static toolchain is, if it's reasonable to 
pull some more static dependencies into the crosstool-ng, like flex, 
ncurses (for gdb) and probably some other?

However, thank you very much for your help and this important tool,
Filipp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fixup the static toolchain build problem
  2014-07-08 20:10 ` [PATCH] Fixup the static toolchain build problem Yann E. MORIN
  2014-07-09 12:25   ` Filipp Andjelo
@ 2014-07-11  1:15   ` brock.zheng
  2014-12-05 11:21     ` Bryan Hundven
  1 sibling, 1 reply; 4+ messages in thread
From: brock.zheng @ 2014-07-11  1:15 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crosstool-NG ML

[-- Attachment #1: Type: text/plain, Size: 3627 bytes --]

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)


[-- Attachment #2: 0001-binutils-Fixup-the-static-toolchain-build-problem.patch --]
[-- Type: text/x-diff, Size: 1477 bytes --]

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



[-- Attachment #3: Type: text/plain, Size: 71 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fixup the static toolchain build problem
  2014-07-11  1:15   ` brock.zheng
@ 2014-12-05 11:21     ` Bryan Hundven
  0 siblings, 0 replies; 4+ messages in thread
From: Bryan Hundven @ 2014-12-05 11:21 UTC (permalink / raw)
  To: brock.zheng; +Cc: crosstool-NG ML

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 3881 bytes --]

Brock,

On Thu, Jul 10, 2014 at 6:14 PM, brock.zheng <goodmenlinux@gmail.com> wrote:
> 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>
> Ö£ µt
>
> ±±¾©ÖпÆÌÚÔ½¿Æ¼¼·¢Õ¹ÓÐÏÞ¹«Ë¾
> ±±¾©Êк£µíÇø¶«±±ÍúÎ÷·8ºÅÖйشåÈí¼þÔ°21ºÅÂ¥ÆôÃ÷Ðdz½´óÏöþ²ãÁùÇø£¨Óʱࣺ100094£©
>
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq

Accepted!

Thanks,

-Bryan

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-05 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20140708122909.GC2031@nagra.com>
2014-07-08 20:10 ` [PATCH] Fixup the static toolchain build problem Yann E. MORIN
2014-07-09 12:25   ` Filipp Andjelo
2014-07-11  1:15   ` brock.zheng
2014-12-05 11:21     ` Bryan Hundven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).