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


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


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