https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88535

--- Comment #5 from john henning <mailboxnotfound at yahoo dot com> ---
Thank you for the response.  

I wonder if the configure or make process should defend against the possibility
that the host compiler and the compiler that we are building today have
differing defaults for -m32 vs -m64.

Consider below, where the /usr/bin compiler is provided by the OS, and the 8.2
is from a build without bootstrap.   

   $ echo "int main(){}" > tmp.c
   $ /usr/bin/gcc tmp.c
   $ file a.out
   a.out:          ELF 64-bit MSB executable SPARCV9 Version 1, dynamically
linked, not stripped, no debugging information
   available
   $
   $ /export/GCC/gcc-8.2.0/bin/gcc tmp.c
   $ file a.out
   a.out:          ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+
Required, dynamically linked, not stripped, no debugging
   information available
   $

Notice the differing output when one is silent about -m32 / -m64.
(Note: Although the defaults differ, both the above are perfectly happy to
build the non-default version if you are explicit for -m32 or -m64).


Details for the system compiler:

   $ /usr/bin/gcc -v
   Using built-in specs.
   COLLECT_GCC=/usr/bin/gcc
   COLLECT_LTO_WRAPPER=/usr/gcc/7/lib/gcc/sparcv9-solaris2.11/7.3.0/lto-wrapper
   Target: sparcv9-solaris2.11
   Configured with: 
  
/builds/ulhg/workspace/Solaris_11u4/Userland/full-build/02b-build-sparc/components/gcc7/gcc-7.3.0/configure
   --prefix=/usr/gcc/7 --mandir=/usr/gcc/7/share/man --bindir=/usr/gcc/7/bin
--sbindir=/usr/gcc/7/sbin 
   --libdir=/usr/gcc/7/lib --infodir=/usr/gcc/7/share/info
--libexecdir=/usr/gcc/7/lib 
   --enable-languages=c,c++,fortran,objc --enable-shared
--enable-initfini-array --disable-rpath 
   --with-system-zlib --with-build-config=no --with-gmp-include=/usr/include
--with-mpfr-include=/usr/include 
   --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as
--with-as=/usr/gnu/bin/as
   --disable-bootstrap 'BOOT_CFLAGS=-g -O2' sparcv9-solaris2.11
   Thread model: posix
   gcc version 7.3.0 (GCC) 
   $ 

And for the 8.2 without bootstrap:

   $ /export/GCC/gcc-8.2.0/bin/gcc -v    
   Using built-in specs.
   COLLECT_GCC=/export/GCC/gcc-8.2.0/bin/gcc
  
COLLECT_LTO_WRAPPER=/export/GCC/gcc-8.2.0-try1/bin/../libexec/gcc/sparc-sun-solaris2.11/8.2.0/lto-wrapper
   Target: sparc-sun-solaris2.11
   Configured with: /export/home/johnh/gcc/build/gcc-8.2.0/configure
--enable-languages=c,c++,fortran 
   --enable-lto --without-system-zlib --with-included-gettext --disable-libvtv
--disable-bootstrap 
   --with-gnu-as --with-as=/usr/gnu/bin/as --with-gnu-ld
--with-ld=/usr/gnu/bin/ld 
   --with-pkgversion=johnh-14-Dec-2018 --prefix=/export/GCC/gcc-8.2.0
--with-local-prefix=/export/GCC
   Thread model: posix
   gcc version 8.2.0 (johnh-14-Dec-2018) 
   $

Reply via email to