64-bit gcc-4.2.2 on SunOS 5.9 with gnu ld - incompatible crti.o
Poor Yorick
org.gnu.gcc.help@pooryorick.com
Sat Jun 7 19:00:00 GMT 2008
Has anyone successfully compiled 64-bit gcc-4.2.2 on SunOS 5.9, which uses
64-bit gnu ld, and can produce both 32 and 64-bit binaries? If so, any hints
would be greatly appreciated. I Attempted this using CFLAGS to inform the
build process of location of previously-built 32-bit libraries:
sh
/path/to/solaris64/bootstrap/src/gcc-4.2.2/gcc-4.2.2/configure
--with-mpfr=/path/to/sparc-32-solaris_nc/bootstrap
--with-gmp=/path/to/solaris64/bootstrap
--with-build-time-tools=/path/to/solaris64/bootstrap/bootstrap/bin
--with-gnu-as --with-gnu-ld
--with-as=/path/to/solaris64/bootstrap/bin/as
--with-ld=/path/to/solaris64/bootstrap/bin/ld
--enable-languages=c,c++,fortran --enable-languages=c,c++,fortran
--prefix=/path/to/solaris64/bootstrap/gcc-4.2.2
--host=sparc64-sun-solaris2.9
invoked make like so:
make LDFLAGS=-L/path/to/sparc-32-solaris_nc/lib
-L/path/to/sparc-32-solaris_nc/lib64
-L/path/to/sparc-32-solaris_nc/bootstrap/lib
-L/path/to/sparc-32-solaris_nc/bootstrap/lib64
-Wl,-R,/path/to/solaris64/bootstrap/lib
-Wl,-R,/path/to/solaris64/bootstrap/lib64
-L/path/to/solaris64/bootstrap/lib -L/path/to/solaris64/bootstrap/lib64
-Wl,-R,/usr/local/lib -Wl,-R,/usr/local/lib/sparcv9
BOOT_LDFLAGS=-Wl,-R,/path/to/solaris64/bootstrap/lib
-Wl,-R,/path/to/solaris64/bootstrap/lib64
-L/path/to/solaris64/bootstrap/lib -L/path/to/solaris64/bootstrap/lib64
-Wl,-R,/usr/local/lib -Wl,-R,/usr/local/lib/sparcv9
CFLAGS=-L/path/to/sparc-32-solaris_nc/bootstrap/gcc-4.2.2/lib/gcc/sparc-sun-solaris2.9/4.2.2
resulted in this error:
/path/to/sparc-64-solaris_nc/bootstrap/src/gcc-4.2.2/gcc
-4.2.2_build/./gcc/xgcc -B/path/to/sparc-64-solaris_nc/b
ootstrap/src/gcc-4.2.2/gcc-4.2.2_build/./gcc/ -B/path/to
/sparc-64-solaris_nc/bootstrap/gcc-4.2.2/sparc64-sun-solaris2.9/bin/
-B/grid/gro
/vol/gbl_statcomp_devel/sparc-64-solaris_nc/bootstrap/gcc-4.2.2/sparc64-sun-sola
ris2.9/lib/ -isystem /path/to/sparc-64-solaris_nc/bootst
rap/gcc-4.2.2/sparc64-sun-solaris2.9/include -isystem
/grid/gro/vol/gbl_statcomp
_devel/sparc-64-solaris_nc/bootstrap/gcc-4.2.2/sparc64-sun-solaris2.9/sys-includ
e -O2 -O2 -L/path/to/sparc-32-solaris_nc/bootstrap/gcc-
4.2.2/lib/gcc/sparc-sun-solaris2.9/4.2.2 -DIN_GCC -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -isystem ./incl ude -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared
-nodefaultlibs -Wl,--soname=libgcc_s.so.1
-Wl,--version-script=libgcc/./libgcc. map -o ./libgcc_s.so.1.tmp
libgcc/./_muldi3_s.o [SNIP...] libgcc/./_udiv_w_sdiv_s.o
libgcc/./_udivmoddi4_s.o libgcc/./unwind-dw2_s.o libg
cc/./unwind-dw2-fde_s.o libgcc/./unwind-sjlj_s.o libgcc/./gthr-gnat_s.o
libgcc/. /unwind-c_s.o -lc && rm -f ./libgcc_s.so && if [ -f
./libgcc_s.so.1 ]; then mv - f ./libgcc_s.so.1 ./libgcc_s.so.1.backup;
else true; fi && mv ./libgcc_s.so.1.tm p ./libgcc_s.so.1 && ln -s
libgcc_s.so.1 ./libgcc_s.so
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: skipping incompatible
/lib/sparcv9/libc.so when searching for -lc
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: skipping incompatible
/usr/lib/sparcv9/libc.so when searching for -lc
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: skipping incompatible
/usr/lib/sparcv9/libc.so when searching for -lc
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `/path/to/sparc-64-solaris_nc
/bootstrap/src/gcc-4.2.2/gcc-4.2.2_build/./gcc/crti.o' is incompatible
with spar c output /path/to/sparc-64-solaris_nc/bootstrap/bin/ld:
sparc:v9 architecture of input file `/usr/ccs/lib/sparcv9/values-Xa.o'
is incompatible wi th sparc output
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `/path/to/sparc-64-solaris_nc
/bootstrap/src/gcc-4.2.2/gcc-4.2.2_build/./gcc/crtbegin.o' is
incompatible with sparc output
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_muldi3_s.o' is incompatible with sparc out put
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_negdi2_s.o' is incompatible with sparc out put
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_lshrdi3_s.o' is incompatible with sparc ou tput
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_ashldi3_s.o' is incompatible with sparc ou tput
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_ashrdi3_s.o' is incompatible with sparc ou tput
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_cmpdi2_s.o' is incompatible with sparc out put
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_ucmpdi2_s.o' is incompatible with sparc ou tput
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_clear_cache_s.o' is incompatible with spar c
output /path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9
architecture of input file `libgcc/./_enable_execute_stack_s.o' is
incompatible with sparc output
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_trampoline_s.o' is incompatible with sparc output
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./__main_s.o' is incompatible with sparc outp ut
/path/to/sparc-64-solaris_nc/bootstrap/bin/ld: sparc:v9 architecture of
input file `libgcc/./_absvsi2_s.o' is incompatible with sparc ou
--
Yorick
More information about the Gcc-help
mailing list