Bug#452402: gcc-4.2: cannot generate sparc64 executables
Package: gcc-4.2
Version: 4.2.2-3
Severity: normal
When I try to compile a 64 bit executable on sparc, I get errors
about missing a libgcc.a file for it:
$ cat > test.c <<EOF
int main() { return 0; }
EOF
$ gcc -Wall -W -m64 -c test.c
$ gcc -Wall -W -m64 test.o
/usr/bin/ld: skipping incompatible /usr/lib/gcc/sparc-linux-gnu/4.2.3/libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/sparc-linux-gnu/4.2.3/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
A related problem seems to be, that
$ gcc -print-libgcc-file-name
and
$ gcc -m64 -print-libgcc-file-name
both report
/usr/lib/gcc/sparc-linux-gnu/4.2.3/libgcc.a
(Which I'm somewhat suspecting might be the cause for the klibc
segfaults, as that tries to build 64 bit binaries)
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: sparc (sparc64)
Kernel: Linux 2.6.22-3-sparc64-smp (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages gcc-4.2 depends on:
ii binutils 2.18-1 The GNU assembler, linker and bina
ii cpp-4.2 4.2.2-3 The GNU C preprocessor
ii gcc-4.2-base 4.2.2-3 The GNU Compiler Collection (base
ii libc6 2.6.1-6 GNU C Library: Shared libraries
ii libgcc1 1:4.2.2-3 GCC support library
ii libgomp1 4.2.2-3 GCC OpenMP (GOMP) support library
Versions of packages gcc-4.2 recommends:
ii libc6-dev 2.6.1-6 GNU C Library: Development Librari
-- no debconf information
Reply to: