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: Static linking impossible on the host system


Christian, All,

On Thursday 13 September 2012 06:57:30 Christian Kujau wrote:
> when trying to build a powerpc crosscompiler on this openSUSE 12.1 
> (x86_64) system, "ct-ng build" fails with:
> 
>   [ERROR]  Static linking impossible on the host system 'x86_64-build_unknown-linux-gnu'

> This error has been posted before[0] - there it was suggested to 
> "disable CT_WANTS_STATIC_LINK". And it's true, disabling 
> CT_WANTS_STATIC_LINK helps. But I find it impossible to do so via
> "ct-ng menuconfig":

That's because this is a 'blind' options that is selected because other
options need it. For example:

config/cc/gcc.in.2:
  43  config CC_STATIC_LIBSTDCXX
  44      bool
  45      prompt "Link libstdc++ statically into the gcc binary"
  46      default y
  47      depends on CC_GCC_4_4_or_later
  48      select WANTS_STATIC_LINK

So, if you sleected to statically link libstdc++, CT_WANTS_STATIC_LINK
*will* be selected.

> IIUC, CT_WANTS_STATIC_LINK cannot be toggled directly but it is 
> selected via CT_STATIC_TOOLCHAIN.
[--SNIP--]
> As a workaround I always do this after "ct-ng menuconfig":
>  sed 's/^CT_WANTS_STATIC_LINK=y/# CT_WANTS_STATIC_LINK is not set/' -i .config

Editing the .config file by hand is *NOT* the solution. Better understand
*why* you can't link statically on openSuSE.

Please, see the code that does the failing test, run it by hand, note the
error you get, and try to see how the code could be changed so as to avoid
this error.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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]