[Bug bootstrap/38693] gcc 4.4.0 20090101 - gcc/config/i386/sol2-10.h uses "USE_GAS" which is undefined

rob1weld at aol dot com gcc-bugzilla@gcc.gnu.org
Fri Jan 2 13:47:00 GMT 2009



------- Comment #1 from rob1weld at aol dot com  2009-01-02 13:46 -------
Prior to changing "gcc/config/i386/sol2-10.h":

user@opensolaris:/usr/share/src/gcc_build# /usr/share/src/gcc_build/gcc/xgcc -v
-B/usr/share/src/gcc_build/gcc/ -B/usr/local/i386-pc-solaris2.11/bin/
-B/usr/local/i386-pc-solaris2.11/lib/ -isystem
/usr/local/i386-pc-solaris2.11/include -isystem
/usr/local/i386-pc-solaris2.11/sys-include  -m64 -c -g -O2 test_gcc_1.c
...
GNU C (GCC) version 4.4.0 20090101 (experimental) (i386-pc-solaris2.11)
        compiled by GNU C version 4.2.2, GMP version 4.2.1, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 0e3e878a55369e9ed157733a6752ae45
COLLECT_GCC_OPTIONS='-v' '-B/usr/share/src/gcc_build/gcc/'
'-B/usr/local/i386-pc-solaris2.11/bin/' '-B/usr/local/i386-pc-solaris2.11/lib/'
'-isystem' '/usr/local/i386-pc-solaris2.11/include' '-isystem'
'/usr/local/i386-pc-solaris2.11/sys-include' '-m64' '-c' '-g' '-O2'
'-mtune=generic'
 /usr/share/src/gcc_build/gcc/as -V -Qy -xarch=generic64 -s -o test_gcc_1.o
/var/tmp//cc2mayli.s
GNU assembler version 2.19 (i386-pc-solaris2.11) using BFD version (GNU
Binutils) 2.19
/usr/local/i386-pc-solaris2.11/bin/as: unrecognized option `-xarch=generic64'
user@opensolaris:/usr/share/src/gcc_build# 


After changing "gcc/config/i386/sol2-10.h":

user@opensolaris:/usr/share/src/gcc_build# /usr/share/src/gcc_build/gcc/xgcc -v
-B/usr/share/src/gcc_build/gcc/ -B/usr/local/i386-pc-solaris2.11/bin/
-B/usr/local/i386-pc-solaris2.11/lib/ -isystem
/usr/local/i386-pc-solaris2.11/include -isystem
/usr/local/i386-pc-solaris2.11/sys-include  -m64 -c -g -O2 test_gcc_1.c
...
GNU C (GCC) version 4.4.0 20090101 (experimental) (i386-pc-solaris2.11)
        compiled by GNU C version 4.2.2, GMP version 4.2.1, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 0e3e878a55369e9ed157733a6752ae45
COLLECT_GCC_OPTIONS='-v' '-B/usr/share/src/gcc_build/gcc/'
'-B/usr/local/i386-pc-solaris2.11/bin/' '-B/usr/local/i386-pc-solaris2.11/lib/'
'-isystem' '/usr/local/i386-pc-solaris2.11/include' '-isystem'
'/usr/local/i386-pc-solaris2.11/sys-include' '-m64' '-c' '-g' '-O2'
'-mtune=generic'
 /usr/share/src/gcc_build/gcc/as -V -Qy --64 -s -o test_gcc_1.o
/var/tmp//ccU3aynm.s
GNU assembler version 2.19 (i386-pc-solaris2.11) using BFD version (GNU
Binutils) 2.19
COMPILER_PATH=/usr/share/src/gcc_build/gcc/:/usr/local/i386-pc-solaris2.11/bin/:/usr/local/i386-pc-solaris2.11/lib/:/usr/ccs/bin/
LIBRARY_PATH=/lib/amd64/:/usr/lib/amd64/:/usr/share/src/gcc_build/gcc/:/usr/local/i386-pc-solaris2.11/bin/:/usr/local/i386-pc-solaris2.11/lib/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-B/usr/share/src/gcc_build/gcc/'
'-B/usr/local/i386-pc-solaris2.11/bin/' '-B/usr/local/i386-pc-solaris2.11/lib/'
'-isystem' '/usr/local/i386-pc-solaris2.11/include' '-isystem'
'/usr/local/i386-pc-solaris2.11/sys-include' '-m64' '-c' '-g' '-O2'
'-mtune=generic'
user@opensolaris:/usr/share/src/gcc_build#


If "USE_GAS" in "gcc/config/i386/sol2-10.h" was set in the root ./configure
on the basis of "--with-as=/usr/gnu/bin/as" and "--with-gnu-as" in a
combination of whether the platform was "sparc" or "i386" then we could
get past this block in the build. 


It is unclear (to me) if the original author intended that Sun's assembler
could be used instead of binutils' "as" (unlikely?) or if they were uncertain
of which commands are used by each version (unlikely?).

OpenSolaris' "as" (one of them) is called "fbe" (sunas) and accepts "-m32"
and "-m64". The man page (2008/04/23) also says that this "as" only will
accept "-xarch=" arguments for the Sparc Platform.

If I knew what the original author intended I could suggest a proper fix.
It would seem that either the root configure.ac needs to be modified to
set "USE_GAS" correctly _or_ line 27 (the "#ifndef USE_GAS") in the file 
"gcc/config/i386/sol2-10.h" could check if we are x86 or sparc .

Rob


-- 


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



More information about the Gcc-bugs mailing list