public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/22073] --with-cpu=default32 for x86_64
       [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
@ 2005-10-24  1:48 ` pinskia at gcc dot gnu dot org
  2005-10-24  6:26 ` marek dot rouchal at infineon dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-24  1:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2005-10-24 01:48 -------
What you want is --with-cpu=default32 for x86_64 which does not exist yet.  It
does for powerpc64 though.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|WAITING                     |NEW
          Component|bootstrap                   |target
  GCC build triplet|x86_64-unknown-linux-gnu    |x86_64-*-linux-gnu
   GCC host triplet|x86_64-unknown-linux-gnu    |x86_64-*-linux-gnu
 GCC target triplet|x86_64-unknown-linux-gnu    |x86_64-*-linux-gnu
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-24 01:48:44
               date|                            |
            Summary|build a 32bit gcc-3.4.4 on  |--with-cpu=default32 for
                   |AMD64/Opteron Linux         |x86_64


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22073


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

* [Bug target/22073] --with-cpu=default32 for x86_64
       [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
  2005-10-24  1:48 ` [Bug target/22073] --with-cpu=default32 for x86_64 pinskia at gcc dot gnu dot org
@ 2005-10-24  6:26 ` marek dot rouchal at infineon dot com
  2009-07-02 11:46 ` marek dot rouchal at infineon dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: marek dot rouchal at infineon dot com @ 2005-10-24  6:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from marek dot rouchal at infineon dot com  2005-10-24 06:26 -------
Subject: RE:  --with-cpu=default32 for x86_64

> What you want is --with-cpu=default32 for x86_64 which does 
> not exist yet.  It does for powerpc64 though.

This is also correct. It would be sufficient for me, if the bootstrapped
compiler was all 32bit, but still would produce by default 64bit
binaries. The changed scope of the request is however fine as well.

-Marek


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22073


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

* [Bug target/22073] --with-cpu=default32 for x86_64
       [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
  2005-10-24  1:48 ` [Bug target/22073] --with-cpu=default32 for x86_64 pinskia at gcc dot gnu dot org
  2005-10-24  6:26 ` marek dot rouchal at infineon dot com
@ 2009-07-02 11:46 ` marek dot rouchal at infineon dot com
  2009-07-02 11:57 ` jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: marek dot rouchal at infineon dot com @ 2009-07-02 11:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from marek dot rouchal at infineon dot com  2009-07-02 11:46 -------
(In reply to comment #5)
> What you want is --with-cpu=default32 for x86_64 which does not exist yet.  It
> does for powerpc64 though.

I'd like to ping this request once again - it seems that there was no progress
on this.
The requirement actually is as follows:
When building gcc on x86_64 (amd64), currently the resulting gcc (and g++,
gfortran etc.) binaries are 64bit. This is unlike Solaris, where the binaries
are 32bit. On both platforms, gcc is able to produce 32bit and 64bit binaries
(thanks to the multilib support). For a network installation of gcc, with 32bit
(i686) and 64bit (x86_64) Linux hosts it would be preferable, if the gcc
binaries were 32bit - then gcc would run on both CPU types; and on the x86_64
systems, it would be able to build 64bit binaries with -m64.

So far I have not found a way to pass -m32 selectively through the gcc
bootstrap process such that the gcc (g++, gfortran, ...) binaries would be
32bit, while the multilib support would remain as is. Any hints are
appreciated.

Many thanks,

Marek


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22073


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

* [Bug target/22073] --with-cpu=default32 for x86_64
       [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2009-07-02 11:46 ` marek dot rouchal at infineon dot com
@ 2009-07-02 11:57 ` jsm28 at gcc dot gnu dot org
  2009-07-02 13:52 ` marek dot rouchal at infineon dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-07-02 11:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jsm28 at gcc dot gnu dot org  2009-07-02 11:57 -------
For a 32-bit-default compiler that can also build 64-bit code, configure
for i686-pc-linux-gnu with --enable-targets=all.  (Set CC="gcc -m32"
and CC_FOR_BUILD="gcc -m32" in your environment and configure
--enable-targets=all --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=i686-pc-linux-gnu.)  This is implemented in 4.3 and later.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22073


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

* [Bug target/22073] --with-cpu=default32 for x86_64
       [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2009-07-02 11:57 ` jsm28 at gcc dot gnu dot org
@ 2009-07-02 13:52 ` marek dot rouchal at infineon dot com
  2009-07-02 15:17 ` jsm28 at gcc dot gnu dot org
  2009-07-09 14:48 ` marek dot rouchal at infineon dot com
  6 siblings, 0 replies; 7+ messages in thread
From: marek dot rouchal at infineon dot com @ 2009-07-02 13:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from marek dot rouchal at infineon dot com  2009-07-02 13:52 -------
(In reply to comment #8)
> For a 32-bit-default compiler that can also build 64-bit code, configure
> for i686-pc-linux-gnu with --enable-targets=all.  (Set CC="gcc -m32"
> and CC_FOR_BUILD="gcc -m32" in your environment and configure
> --enable-targets=all --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
> --target=i686-pc-linux-gnu.)  This is implemented in 4.3 and later.

I tried this - and it does not work here. I even added STAGE1_CFLAGS="-m32 -g"
as suggested in an earlier comment. The build of gcc-4.3.2 bails out at this
point:

gmake[7]: Leaving directory
`/var/vob/relman/admin/vob/devenv/Gcc/linux40_64/gcc-4.3.2/gcc'
mkdir -p -- i686-pc-linux-gnu/libgcc
Checking multilib configuration for libgcc...
Configuring stage 1 in i686-pc-linux-gnu/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-ar... ar
checking for i686-pc-linux-gnu-lipo... lipo
checking for i686-pc-linux-gnu-nm...
/var/vob/relman/admin/vob/devenv/Gcc/linux40_64/gcc-4.3.2/./gcc/nm
checking for i686-pc-linux-gnu-ranlib... ranlib
checking for i686-pc-linux-gnu-strip... strip
checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc...
/var/vob/relman/admin/vob/devenv/Gcc/linux40_64/gcc-4.3.2/./gcc/xgcc
-B/var/vob/relman/admin/vob/devenv/Gcc/linux40_64/gcc-4.3.2/./gcc/
-B/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/bin/
-B/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/lib/ -isystem
/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/include -isystem
/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/sys-include
checking for suffix of object files... configure: error: cannot compute suffix
of object files: cannot compile
See `config.log' for more details.

The relevant portion of the gcc-4.3.2/i686-pc-linux-gnu/libgcc/config.log is:

configure:2398:
/var/vob/relman/admin/vob/devenv/Gcc/linux40_64/gcc-4.3.2/./gcc/xgcc
-B/var/vob/relman/admin/vob/devenv/Gcc/linux40_64/gcc-4.3.2/./gcc/
-B/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/bin/
-B/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/lib/ -isystem
/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/include -isystem
/opt/gcc_4.3.2/linux40_64/i686-pc-linux-gnu/sys-include -o conftest -g
-fkeep-inline-functions  -Wl,-rpath,/opt/gcc_4.3.2/linux40_64/ext/lib
conftest.c  >&5
/tmp/ccIIK43d.s: Assembler messages:
/tmp/ccIIK43d.s:19: Error: suffix or operands invalid for `push'
/tmp/ccIIK43d.s:21: Error: suffix or operands invalid for `push'
/tmp/ccIIK43d.s:25: Error: suffix or operands invalid for `push'
/tmp/ccIIK43d.s:30: Error: suffix or operands invalid for `pop'
/tmp/ccIIK43d.s:31: Error: suffix or operands invalid for `pop'

I assume that the -m32 option is not passed through correctly. I think that in
gcc-4.3.2/Makefile the HOST_EXPORTS macro does not contain the appropriate
CFLAGS. Or is this perhaps fixed in gcc-4.3.3?


-- 

marek dot rouchal at infineon dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
      Known to fail|                            |4.3.2
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22073


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

* [Bug target/22073] --with-cpu=default32 for x86_64
       [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2009-07-02 13:52 ` marek dot rouchal at infineon dot com
@ 2009-07-02 15:17 ` jsm28 at gcc dot gnu dot org
  2009-07-09 14:48 ` marek dot rouchal at infineon dot com
  6 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-07-02 15:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jsm28 at gcc dot gnu dot org  2009-07-02 15:17 -------
If you are building an i686-pc-linux-gnu compiler you should start by
building i686-pc-linux-gnu binutils (configured --enable-64-bit-bfd)
and installing them in the same prefix in which you are going to install
GCC (making sure to put the bin/ directory of that prefix on your PATH).


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22073


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

* [Bug target/22073] --with-cpu=default32 for x86_64
       [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2009-07-02 15:17 ` jsm28 at gcc dot gnu dot org
@ 2009-07-09 14:48 ` marek dot rouchal at infineon dot com
  6 siblings, 0 replies; 7+ messages in thread
From: marek dot rouchal at infineon dot com @ 2009-07-09 14:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from marek dot rouchal at infineon dot com  2009-07-09 14:48 -------
(In reply to comment #10)

Thank you very much! I can confirm now that with the given information I was
able to compile on a x86_64 Linux box a gcc-4.3.3 with all executables (gcc,
cc1, ...) built in 32bit, plus the libgcc_s.so and libstdc++.so in both 32 and
64bit. May I suggest to add a note on this to the INSTALL document, in the
section on x86_64? Here is a rough proposal for the text, please feel free to
edit:

On x86_64 gcc will bootstrap by default to 64bit binaries. You can force the
build of 32bit gcc binaries, such that the resulting gcc will also be
executable on 32bit CPUs; this requires i686-pc-linux-gnu binutils (configured
with --enable-64-bit-bfd) to be present in the path where gcc is going to be
installed. The gcc bootstrap process then has to be configured with:
CC="gcc -m32" CC_FOR_BUILD="gcc -m32" ./configure --enable-targets=all
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu


-- 

marek dot rouchal at infineon dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22073


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

end of thread, other threads:[~2009-07-09 14:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22073-3337@http.gcc.gnu.org/bugzilla/>
2005-10-24  1:48 ` [Bug target/22073] --with-cpu=default32 for x86_64 pinskia at gcc dot gnu dot org
2005-10-24  6:26 ` marek dot rouchal at infineon dot com
2009-07-02 11:46 ` marek dot rouchal at infineon dot com
2009-07-02 11:57 ` jsm28 at gcc dot gnu dot org
2009-07-02 13:52 ` marek dot rouchal at infineon dot com
2009-07-02 15:17 ` jsm28 at gcc dot gnu dot org
2009-07-09 14:48 ` marek dot rouchal at infineon dot com

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