RE: Help required when building gcc-4.1.2 for i686 environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




-----Original Message-----
From: Tim Prince [mailto:n8tm@xxxxxxx] 
Sent: Friday, February 10, 2012 8:57 AM
To: Prashant Batra (prbatra)
Cc: tprince@xxxxxxxxxxxx; gcc-help@xxxxxxxxxxx
Subject: Re: Help required when building gcc-4.1.2 for i686 environment

On 2/9/2012 10:19 PM, Prashant Batra (prbatra) wrote:
>
>
> -----Original Message-----
> From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx]
On
> Behalf Of Tim Prince
> Sent: Friday, February 10, 2012 8:43 AM
> To: gcc-help@xxxxxxxxxxx
> Subject: Re: Help required when building gcc-4.1.2 for i686
environment
>
> On 2/9/2012 4:17 PM, Prashant Batra (prbatra) wrote:
>> Hello,
>>
>> I am trying to build a gcc/g++ tool-chain for i486 architechture on
an
>> x86_64 machine.
>> I downloaded gcc-4.1.2 and configured it with host as x86_64 and
> target
>> as i486 after installing the pre-requistes i.e gmp, mrpf, and mpc
>> libraries .
>>
>> ../gcc-4.1.2/configure --with-gmp=/auto/local//prbatra/gcc-install/
>> --with-mpfr=/auto/local//prbatra/gcc-install/
>> --prefix=/auto/local//prbatra/gcc-install/ --host=x86_64-gnu-linux
>> --target=i486-gnu-linux --enable-languages=c,c++,objc
>>
>> I also installed binutils with the same host and target for
> asssembler,
>> loaded etc
>>
>> /auto/local//prbatra/objdir/./gcc/xgcc
>> -B/auto/local//prbatra/objdir/./gcc/
>> -B/auto/local//prbatra/gcc-install//i486-gnu-linux/bin/
>> -B/auto/local//prbatra/gcc-install//i486-gnu-linux/lib/ -isystem
>> /auto/local//prbatra/gcc-install//i486-gnu-linux/include -isystem
>> /auto/local//prbatra/gcc-install//i486-gnu-linux/sys-include -O2  -O2
> -g
>> -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings
>> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
>> -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
>> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-4.1.2/gcc
>> -I../../gcc-4.1.2/gcc/. -I../../gcc-4.1.2/gcc/../include
>> -I../../gcc-4.1.2/gcc/../libcpp/include
>> -I/auto/local//prbatra/gcc-install//include
>> -I/auto/local//prbatra/gcc-install//include -fexceptions
>> -fvisibility=hidden -DHIDE_EXPORTS -c
../../gcc-4.1.2/gcc/unwind-dw2.c
>> -o libgcc/./unwind-dw2.o
>> In file included from ./gthr-default.h:1,
>>                    from ../../gcc-4.1.2/gcc/gthr.h:114,
>>                    from ../../gcc-4.1.2/gcc/unwind-dw2.c:42:
>> ../../gcc-4.1.2/gcc/gthr-posix.h:43:21: error: pthread.h: No such
file
>> or directory
>> ../../gcc-4.1.2/gcc/gthr-posix.h:44:20: error: unistd.h: No such file
> or
>> directory
>> In file included from ./gthr-default.h:1,
>>                    from ../../gcc-4.1.2/gcc/gthr.h:114,
>>                    from ../../gcc-4.1.2/gcc/unwind-dw2.c:42:
>> ../../gcc-4.1.2/gcc/gthr-posix.h:46: error: expected '=', ',', ';',
>> 'asm' or '__attribute__' before '__gthread_key_t'
>> ../../gcc-4.1.2/gcc/gthr-posix.h:47: error: expected '=', ',', ';',
>> 'asm' or '__attribute__' before '__gthread_once_t'
>> ../../gcc-4.1.2/gcc/gthr-posix.h:48: error: expected '=', ',', ';',
>> 'asm' or '__attribute__' before '__gthread_mutex_t'
>> ../../gcc-4.1.2/gcc/gthr-posix.h:49: error: expected '=', ',', ';',
>> 'asm' or '__attribute__' before '__gthread_recursive_mutex_t'
>>
>> Can someone help me with what I am missing?
>>
>
> Gcc 4.1 wasn't a particularly stable version, even if you could spell
> the pre-requisites correctly, making your exercise appear somewhat
> pointless.  You would require a complete 32-bit development system,
> including 32-bit libpthread, which apparently you neglected.
>
> [Prashant] Thanks Tim, So you are suggesting me to build it on a 32
bit
> system or, using a different version of gcc other that 4.1.2
> Or, is it that I can install libptthread-32 bit and other required
> libraries on 64 bit system and go ahead.
>

Not knowing the reason for your exercise, I'd decline to try to answer 
fully.  While it can be difficult to install the full 32-bit development

system components, doing so should be sufficient.
[Prashant] The installation is required to create a tool chain for
compiling something on a 64 bit host system for 32 bit system), 
without using the native tool-chain of the host machine. 
[Prashant] Now, I had put gmp, mpfr and mpc into the gcc tree, but I am
wondering that can gcc take binutils also from the source,
Or should I install it separately and tell gcc to use that.
-- 
Tim Prince



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux