public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to install 32 bit gcc on 64 bit RHEL5.1
@ 2008-08-12  9:00 Yuan, Sai (NSN - CN/Cheng Du)
  2008-08-12  9:07 ` Andrew Haley
  0 siblings, 1 reply; 5+ messages in thread
From: Yuan, Sai (NSN - CN/Cheng Du) @ 2008-08-12  9:00 UTC (permalink / raw)
  To: gcc-help

Hello!

I am suffering from this issue for a long time. Could you please give me any good idea?

When I tried to install a 32bit gcc on 64 bit Linux, I got this error:

[root@aries gcc-4.1.2]#./configure --prefix=/opt/gcc/linux/gcc-4.1.2 --host=x86_64-redhat-linux --cache-file=/dev/null --target=i386-redhat-linux

...

[root@aries gcc-4.1.2]# make

...

rm -f mm_malloc.h
cat ../.././gcc/config/i386/pmm_malloc.h > mm_malloc.h
if [ -f `echo /opt/gcc/linux/gcc-4.1.2/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/sys-include | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`/limits.h ] ; then \
          cat ../.././gcc/limitx.h ../.././gcc/glimits.h ../.././gcc/limity.h > tmp-xlimits.h; \
        else \
          cat ../.././gcc/glimits.h > tmp-xlimits.h; \
        fi
mv tmp-xlimits.h xlimits.h
if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
for file in .. ../.././gcc/ginclude/float.h ../.././gcc/ginclude/iso646.h ../.././gcc/ginclude/stdarg.h ../.././gcc/ginclude/stdbool.h ../.././gcc/ginclude/stddef.h ../.././gcc/ginclude/varargs.h ../.././gcc/config/i386/mmintrin.h ../.././gcc/config/i386/mm3dnow.h ../.././gcc/config/i386/xmmintrin.h ../.././gcc/config/i386/emmintrin.h ../.././gcc/config/i386/pmmintrin.h mm_malloc.h; do \
          if [ X$file != X.. ]; then \
            realfile=`echo $file | sed -e 's|.*/\([^/]*\)$|\1|'`; \
            echo timestamp > include/$realfile; \
            rm -f include/$realfile; \
            cp $file include; \
            chmod a+r include/$realfile; \
          fi; \
        done
rm -f include/limits.h
cp xlimits.h include/limits.h
cp ../.././gcc/unwind-generic.h include/unwind.h
chmod a+r include/limits.h
rm -f include/README
cp ../.././gcc/../fixincludes/README-fixinc include/README
chmod a+r include/README
echo timestamp > stmp-int-hdrs
make[2]: *** No rule to make target `/opt/gcc/linux/gcc-4.1.2/bin/i386-redhat-linux-as', needed by `stamp-as'.  Stop.
make[2]: Leaving directory `/tmp/gcc-4.1.2/host-x86_64-redhat-linux/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/tmp/gcc-4.1.2'
make: *** [all] Error 2
[root@aries gcc-4.1.2]#



It caused me to doubt whether it can install 32 bit gcc on 64 bit Linux. Btw, the version i want to install is 32bit gcc 4.1.2.
Could you please help me?

Thanks in advance!
Sai


 


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

* Re: How to install 32 bit gcc on 64 bit RHEL5.1
  2008-08-12  9:00 How to install 32 bit gcc on 64 bit RHEL5.1 Yuan, Sai (NSN - CN/Cheng Du)
@ 2008-08-12  9:07 ` Andrew Haley
  2008-08-12  9:38   ` Yuan, Sai (NSN - CN/Cheng Du)
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2008-08-12  9:07 UTC (permalink / raw)
  To: Yuan, Sai (NSN - CN/Cheng Du); +Cc: gcc-help

Yuan, Sai (NSN - CN/Cheng Du) wrote:

> It caused me to doubt whether it can install 32 bit gcc on 64 bit Linux. Btw, the version i want to install is 32bit gcc 4.1.2.
> Could you please help me?

It's complaining that you haven't installed a 32-bit cross assembler.
I guess that's right, is it?  You didn't build cross-binutils for i386?

Why are you doing such a strange thing?  gcc will already generate 32-bit
code with "gcc -m32".

Andrew.

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

* RE: How to install 32 bit gcc on 64 bit RHEL5.1
  2008-08-12  9:07 ` Andrew Haley
@ 2008-08-12  9:38   ` Yuan, Sai (NSN - CN/Cheng Du)
  2008-08-12 12:01     ` Andrew Haley
  0 siblings, 1 reply; 5+ messages in thread
From: Yuan, Sai (NSN - CN/Cheng Du) @ 2008-08-12  9:38 UTC (permalink / raw)
  To: ext Andrew Haley; +Cc: gcc-help

Oh! I didn't install a 32-bit cross assembler. Where can i get this stuff?
I didn't use "-m32" because it also compile in Clearcase environment. It's not easy for me to add this flag.

Thanks very much
Sai



-----Original Message-----
From: ext Andrew Haley [mailto:aph@redhat.com]
Sent: Tue 8/12/2008 5:00 PM
To: Yuan, Sai (NSN - CN/Cheng Du)
Cc: gcc-help@gcc.gnu.org
Subject: Re: How to install 32 bit gcc on 64 bit RHEL5.1
 
Yuan, Sai (NSN - CN/Cheng Du) wrote:

> It caused me to doubt whether it can install 32 bit gcc on 64 bit Linux. Btw, the version i want to install is 32bit gcc 4.1.2.
> Could you please help me?

It's complaining that you haven't installed a 32-bit cross assembler.
I guess that's right, is it?  You didn't build cross-binutils for i386?

Why are you doing such a strange thing?  gcc will already generate 32-bit
code with "gcc -m32".

Andrew.


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

* Re: How to install 32 bit gcc on 64 bit RHEL5.1
  2008-08-12  9:38   ` Yuan, Sai (NSN - CN/Cheng Du)
@ 2008-08-12 12:01     ` Andrew Haley
  2008-08-12 13:12       ` Vardhan, Sundara (GE Infra, Energy)
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2008-08-12 12:01 UTC (permalink / raw)
  To: Yuan, Sai (NSN - CN/Cheng Du); +Cc: gcc-help

Please don't top-post.

Yuan, Sai (NSN - CN/Cheng Du) wrote:
> Oh! I didn't install a 32-bit cross assembler. Where can i get this stuff?

It's all part of GNU Binutils.

> I didn't use "-m32" because it also compile in Clearcase environment. It's not easy for me to add this flag.

You have got to be joking!  Are you telling me that Clearcase is so
unspeakably awful that you cannot control any compiler flags?

Are you telling me that you cannot use a shell script to exec gcc
with the -m32 flag?

Andrew.


> -----Original Message-----
> From: ext Andrew Haley [mailto:aph@redhat.com]
> Sent: Tue 8/12/2008 5:00 PM
> To: Yuan, Sai (NSN - CN/Cheng Du)
> Cc: gcc-help@gcc.gnu.org
> Subject: Re: How to install 32 bit gcc on 64 bit RHEL5.1
>  
> Yuan, Sai (NSN - CN/Cheng Du) wrote:
> 
>> It caused me to doubt whether it can install 32 bit gcc on 64 bit Linux. Btw, the version i want to install is 32bit gcc 4.1.2.
>> Could you please help me?
> 
> It's complaining that you haven't installed a 32-bit cross assembler.
> I guess that's right, is it?  You didn't build cross-binutils for i386?
> 
> Why are you doing such a strange thing?  gcc will already generate 32-bit
> code with "gcc -m32".
> 
> Andrew.
> 
> 

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

* RE: How to install 32 bit gcc on 64 bit RHEL5.1
  2008-08-12 12:01     ` Andrew Haley
@ 2008-08-12 13:12       ` Vardhan, Sundara (GE Infra, Energy)
  0 siblings, 0 replies; 5+ messages in thread
From: Vardhan, Sundara (GE Infra, Energy) @ 2008-08-12 13:12 UTC (permalink / raw)
  To: Yuan, Sai (NSN - CN/Cheng Du); +Cc: gcc-help

Hi 

To my knowledge I do not think we can create a 32-bit gcc on a 64-bit OS. What I did was to compile and create a 64-bit gcc and then use -m32 flag to make it compile in 32-bit. Did this on RHEL5.1 and the gcc version is 4.1.2.

With Regards

Vardhan

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

end of thread, other threads:[~2008-08-12 12:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-12  9:00 How to install 32 bit gcc on 64 bit RHEL5.1 Yuan, Sai (NSN - CN/Cheng Du)
2008-08-12  9:07 ` Andrew Haley
2008-08-12  9:38   ` Yuan, Sai (NSN - CN/Cheng Du)
2008-08-12 12:01     ` Andrew Haley
2008-08-12 13:12       ` Vardhan, Sundara (GE Infra, Energy)

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