public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Can you help with gcc build GCC_NO_EXECUTABLES problem?
       [not found] <438DF953.5050902@intrusic.com>
@ 2005-12-01 11:25 ` Kai Ruottu
  2005-12-01 12:20   ` Kai Ruottu
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Ruottu @ 2005-12-01 11:25 UTC (permalink / raw)
  To: Jonathan Beit-Aharon; +Cc: gcc-help

Jonathan Beit-Aharon wrote:
> Hi,
> I am trying to build gcc 3.4.2 on Linux, and am running into *exactly* 
> the same problem (also with library libstdc++v3).
> Since Tupshin Harper's note is dated October 27, 2004 I'm hoping someone 
> found a solution to share.
>
>    Subject: help building x86_64->i686 cross-compiler
> 
>    I'm running a debian amd64 (pure, not biarch/multiarch), and I'm
>    trying to build gcc that is able to compile regular x86 binaries (as
>    in):
>    checking host system type... i686-pc-linux-gnu
>    checking build system type... x86_64-unknown-linux-gnu
> 
>    but it fails with the following:
>    checking for main in -lm... configure: error: Link tests are not
>    allowed after GCC_NO_EXECUTABLES.

Which kind of wireframe model you would require being made for this?

Ok, you must understand that an x86_64 system is 'bi-arch', the GCC
on it should be capable to produce both 64-bit and 32-bit executables.
If the existing GCC cannot do this, neither the new GCC can do that !

So before starting to build the bi-arch GCC (as the default), you should
make sure that both 64-bit and 32-bit executables can be produced on
your system with the existing GCC. That you have the '*/lib64' and the
'*/lib' directories filled with the proper libraries is one of the
prerequisites.

If you want your new GCC to be a "64-bit-only" special GCC, just use
the '--disable-multilib' option during the GCC compile, then no 32-bit
'libiberty' and 'libstdc++-v3' will be tried to be made...

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

* Re: Can you help with gcc build GCC_NO_EXECUTABLES problem?
  2005-12-01 11:25 ` Can you help with gcc build GCC_NO_EXECUTABLES problem? Kai Ruottu
@ 2005-12-01 12:20   ` Kai Ruottu
  2005-12-01 14:37     ` Jonathan Beit-Aharon
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Ruottu @ 2005-12-01 12:20 UTC (permalink / raw)
  To: Jonathan Beit-Aharon; +Cc: gcc-help

Kai Ruottu wrote:

> Jonathan Beit-Aharon wrote:
> 
>> Hi,
>> I am trying to build gcc 3.4.2 on Linux, and am running into *exactly* 
>> the same problem (also with library libstdc++v3).
>>
>>    Subject: help building x86_64->i686 cross-compiler
>>
>>    I'm running a debian amd64 (pure, not biarch/multiarch), and I'm
>>    trying to build gcc that is able to compile regular x86 binaries (as
>>    in):
>>    checking host system type... i686-pc-linux-gnu
>>    checking build system type... x86_64-unknown-linux-gnu
>>
>>    but it fails with the following:
>>    checking for main in -lm... configure: error: Link tests are not
>>    allowed after GCC_NO_EXECUTABLES.

  Sorry, I'm starting to be converted being just as "one-eyed" as the
majority, expecting everyone to build only native-GCCs :-(

  If producing a cross-GCC, one of course MUST have the target headers
and libraries below the chosen $(tooldir) or '$prefix/$target',
preinstalled BEFORE starting to build the GCC !!!

  If the '$target' is the Debian/i386 (with for i686 optimized libs
etc.), then the target C library should be from that. If the $target
is Red Hat Linux 9, then the C library should be taken from that. And
so on, it is not at all sure that the 32-bit Linux/x86's are totally
binary-compatible...

  How and where one puts the target C library, is up to the GCC builder,
no accepted 'standard' for this... My habit is to put the (Linux) target
C library below a (common) $sysroot, almost in 1:1 arrangement with the
natively installed glibc, each $target having its own 'host-$target'
subdir there, like '/opt/host-i586-suse-linux-10.0' for the
SuSE 10.0/i386 target, the $sysroot being the '/opt'...

  Unpacking the $target RPMS or '.deb' packages below the
'$sysroot/host-$target' and fixing some things is everything one needs
to do with the pre-made glibc for the $target. Then one needs to add two
(or more if adding X11 etc. libs) symlinks into the $(tooldir) for the
cross-GCC :

        include -> $sysroot/host-$target/usr/include
        lib -> $sysroot/host-$target/usr/lib

and make a work-around for the eternal 'sys-include' bug there :

        sys-include -> include

because the GCC build really tries to find the target headers from the
'$(tooldir)/sys-include' despite of whatever the GCC manuals will tell
about this and whatever the de-facto standards for cross-GCCs are...

So maybe the main problem here is not understanding that a GCC has no
C library, so it must be taken from somewhere and be preinstalled before
starting to build GCC. Just as is the case with the binutils, neither
they belong to GCC...

Currently there is some kind of new bolshevism idea which states that
people shouldn't use any 'original' libraries for a Linux target, but
one should replace them with self-built glibc, termcap, ncurses, X11,
Gnome, KDE etc. libraries... If one really feels this idea about
starting everything from absolute scratch as one's own, then there
are people who will support that idea. The things below then come from
my Scandinavian 'social democracy', "evolutionary socialism", which
states that bettering the world can be based on what we already have,
no "starting everything from scratch" is needed...

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

* Re: Can you help with gcc build GCC_NO_EXECUTABLES problem?
  2005-12-01 12:20   ` Kai Ruottu
@ 2005-12-01 14:37     ` Jonathan Beit-Aharon
  2005-12-01 16:41       ` Kai Ruottu
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Beit-Aharon @ 2005-12-01 14:37 UTC (permalink / raw)
  To: karuottu; +Cc: gcc-help

Kai Ruottu wrote:

> Kai Ruottu wrote:
>
>> Jonathan Beit-Aharon wrote:
>>
>>> Hi,
>>> I am trying to build gcc 3.4.2 on Linux, and am running into 
>>> *exactly* the same problem (also with library libstdc++v3).
>>
Except my platform is Intel Celeron.

>>>
>>>    Subject: help building x86_64->i686 cross-compiler
>>>
>>>    I'm running a debian amd64 (pure, not biarch/multiarch), and I'm
>>>    trying to build gcc that is able to compile regular x86 binaries (as
>>>    in):
>>>    checking host system type... i686-pc-linux-gnu
>>>    checking build system type... x86_64-unknown-linux-gnu
>>>
>>>    but it fails with the following:
>>>    checking for main in -lm... configure: error: Link tests are not
>>>    allowed after GCC_NO_EXECUTABLES.
>>
>
> [snip]

I eventually found a broken cpp in /usr/local/bin, which was left over 
from some earlier failed install...   Somehow it was missed when that 
failure was uninstalled -- don't ask me how/why, because in the words of 
Oz, the Great and Powerful, "I don't know how it works" :-)

> Currently there is some kind of new bolshevism idea which states that
> people shouldn't use any 'original' libraries for a Linux target, but
> one should replace them with self-built glibc, termcap, ncurses, X11,
> Gnome, KDE etc. libraries... If one really feels this idea about
> starting everything from absolute scratch as one's own, then there
> are people who will support that idea. The things below then come from
> my Scandinavian 'social democracy', "evolutionary socialism", which
> states that bettering the world can be based on what we already have,
> no "starting everything from scratch" is needed...

Dear Kai Ruottu, first, thank you for your helpful response.  There is 
no need to apologize for your cooperativist outlook -- as far as I'm 
concerned cooperation is  the reason Open Software is successful.  The 
best cooperation is that which comes from free will and free 
association, but other cooperation, such as that which comes of economic 
necessity, e.g., by employees of a corporation working jointly in order 
to make a living, is not to be disparaged either.

Although I don't enjoy building systems "from scratch", occasionally we 
all have to upgrade (or even downgrade) some software in order to port 
applications between systems (in my case, FreeBSD 5.4 to Linux Fedora 3).

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

* Re: Can you help with gcc build GCC_NO_EXECUTABLES problem?
  2005-12-01 14:37     ` Jonathan Beit-Aharon
@ 2005-12-01 16:41       ` Kai Ruottu
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Ruottu @ 2005-12-01 16:41 UTC (permalink / raw)
  To: Jonathan Beit-Aharon; +Cc: gcc-help

Jonathan Beit-Aharon wrote:

> Although I don't enjoy building systems "from scratch", occasionally we 
> all have to upgrade (or even downgrade) some software in order to port 
> applications between systems (in my case, FreeBSD 5.4 to Linux Fedora 3).

  My point was in not being allowed to use any prebuilt FreeBSD 5.4 or
Fedora3 parts only because the sources for them do exist. Still the
"you have to" advices are related only using the prebuilt target parts
in crosstools, but when the new bolsheviks have followers enough, maybe
the next phase will be to advice people to remove the installed native
binutils, GCC, glibc etc. prebuilt native components before starting to 
build a native GCC... How they then can be built from absolute scratch,
will then be seen (maybe the advice will be to use some proprietary
'pure' cross-host, pure from anything which could have sources for it).

  Advices like the following (by Ian Lance Taylor in August) :

 >>>> Building a cross-compiler to Linux is a complex operation with many
 >>>> steps.  See http://kegel.com/crosstool/ for some helpful scripts.

can be see all the time, suggesting people to build their Red Hat, SuSE,
Fedora, Ubuntu etc. Linux-targeted toolchains from absolute scratch...

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

end of thread, other threads:[~2005-12-01 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <438DF953.5050902@intrusic.com>
2005-12-01 11:25 ` Can you help with gcc build GCC_NO_EXECUTABLES problem? Kai Ruottu
2005-12-01 12:20   ` Kai Ruottu
2005-12-01 14:37     ` Jonathan Beit-Aharon
2005-12-01 16:41       ` Kai Ruottu

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