building gcc 4.4.5 from source on Fedora 13

Jonathan Wakely jwakely.gcc@gmail.com
Tue Nov 30 19:27:00 GMT 2010


On 30 November 2010 19:04, Mr Dash Four wrote:
>
>>> Yes, it is true that I originally wanted to use GCC as a cross compiler
>>> and
>>> because it did not work I set myself to build it from source to correct
>>> that
>>> mistake. Later on it was established that GCC, supposedly, should already
>>> function as a cross compiler which later on transpired NOT to be the case
>>> as
>>>
>>
>> It patently *is* the case that GCC can function in that way, and it's
>> the default if you build from source.
>>
>
> Functioning GCC - yes. GCC functioning as a cross-compiler - NO!

*sigh* If you build from SRPM, no.

But if you build from source (not from an SRPM) following the
instructions at http://gcc.gnu.org/install/ then it works fine. I do
it several times a week. On Fedora.  Again, not from an SRPM using a
spec file.

Of course, to actually compile 32-bit software I need glibc-devel.i686
installed too.
But the GCC I build, FROM SOURCE, is a multilib compiler with 64-bit
and 32-bit libstdc++ installed.

> Not, unless one spends a few days writing in this mailing list until it
> becomes clear that a couple of additional *GCC* packages need to be
> installed for GCC to function as 'advertised', i.e. with the
> cross-compilation working.

You're talking about building RPMs from SRPMs using rpmbuild and a spec file.

I'm not.

>>> when I was installing the *Fedora-distributed* GCC RPM all the i686
>>> dependencies which enable GCC to function as a cross compiler were not
>>> picked up and subsequently not installed. If they were I won't be
>>> starting
>>> this thread in this mailing list.
>>>
>>
>> And Andrew and I have both said why the 32-bit "dependencies" are not
>> hard dependencies: because that way it's not possible to get a
>> 64-bit-only compiler.
>
> Right from the start Andrew have said that GCC, by default, when installed,
> is cross-compiling. That, clearly, is not the case as I already pointed out
> on numerous occasions. If you think that it is, then keep dreaming and best
> of luck!

I do it several times a week.

> Besides, I am not at all interested in getting '64-bit-only' compiler - that
> is not the purpose I started this thread. I am interested in getting a
> cross-compiler. To me the term 'cross-compiling' means to be able to compile
> binaries for more than one architecture (i686 and x86_64 in my case).

Right, but *other people* are interested in that.

The way it works now means they can have it their way and you can have
it your way, if you install some additional packages.

> They way things are at present, GCC, as installed by Fedora, does NOT
> cross-compile, despite what you, Andrew, John Doe or whoever else may claim.
> It may be a '64-bit-only' compiler, yes, but certainly isn't a
> cross-compiler.

Yes, because you need to install some i686 packages.

> Secondly, if I want to build GCC purely from source as a cross-compiler
> (yes, from source - without using additional binaries from the same package)
> using the gcc.spec file I can't - not without extensive editing and messing
> about with the said file and even then I would still need to install
> additional GCC binaries (binaries from the same group of packages I am
> trying to build, no less!) in order to make the whole thing work!
>
> If you, Andrew or anyone else think that's OK - well, keep deluding
> yourselves.

For the last time, I'm not talking about building with a spec file.



More information about the Gcc-help mailing list