public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcc Build 64/32 bit link error
@ 2014-02-20  2:50 Thomas
  2014-02-20  6:42 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas @ 2014-02-20  2:50 UTC (permalink / raw)
  To: gcc-help

Hi, 

I am building gcc 4.8.1 in a Red Hat 6.4 64 bit machine. I am building gnat
first and it is build as 32 bit i686 architecture. I used
gnat-gpl-2013-i686-pc-linux-gnu-bin for gnat and it created a 32 bit gcc in
the directory, I set the path to that so, gcc is now gcc 4.7.4 from
/gnat/bin/gcc. When I checked that is 32 bit gcc. 

I used this configuration

./gcc-4.8.1/configure --disable-multilib --disable-bootstrap
--disable-install-libiberty --with-system-zlib --enable-clocale=gnu
--enable-shared --enable-lto --enable-threads=posix --enable-__cxa_atexit
--enable-languages=c,c++,fortran,java,ada --prefix=/usr/local/ CFLAGS="-pipe
-march=native -mtune=native -g -O2" CXXFLAGS="-pipe -march=native
-mtune=native -g -O2"


I was able to build the compiler with this configuration and arch is x86_64. 

when I tried to compile a file with -m32 option it didn't work and got the
error message crtbegin.o: could not read symbols: File in wrong format.
Collect2: kd returned 1 exit status

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

* Re: Gcc Build 64/32 bit link error
  2014-02-20  2:50 Gcc Build 64/32 bit link error Thomas
@ 2014-02-20  6:42 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2014-02-20  6:42 UTC (permalink / raw)
  To: Thomas; +Cc: gcc-help

On 19 February 2014 22:14, Thomas <nkt747@yahoo.com> wrote:
> Hi,
>
> I am building gcc 4.8.1 in a Red Hat 6.4 64 bit machine. I am building gnat
> first and it is build as 32 bit i686 architecture. I used
> gnat-gpl-2013-i686-pc-linux-gnu-bin for gnat and it created a 32 bit gcc in
> the directory, I set the path to that so, gcc is now gcc 4.7.4 from
> /gnat/bin/gcc. When I checked that is 32 bit gcc.
>
> I used this configuration
>
> ./gcc-4.8.1/configure --disable-multilib --disable-bootstrap
> --disable-install-libiberty --with-system-zlib --enable-clocale=gnu
> --enable-shared --enable-lto --enable-threads=posix --enable-__cxa_atexit
> --enable-languages=c,c++,fortran,java,ada --prefix=/usr/local/ CFLAGS="-pipe
> -march=native -mtune=native -g -O2" CXXFLAGS="-pipe -march=native
> -mtune=native -g -O2"
>
>
> I was able to build the compiler with this configuration and arch is x86_64.
>
> when I tried to compile a file with -m32 option it didn't work and got the
> error message crtbegin.o: could not read symbols: File in wrong format.
> Collect2: kd returned 1 exit status
>

On x86_64, the --disable-multilib option means build a compiler
without 32-bit support.

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

end of thread, other threads:[~2014-02-20  6:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20  2:50 Gcc Build 64/32 bit link error Thomas
2014-02-20  6:42 ` Jonathan Wakely

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