Subject: problem with cross compiling x86 -> sparc
To: None <port-sparc@netbsd.org>
From: Ronald van der Pol <Ronald.vanderPol@rvdp.org>
List: port-sparc
Date: 07/07/2002 12:48:31
I am trying to do a sparc build on x86. I am trying to install
cross-sparc-netbsdelf-1.3.0.0. Installation went fine. I also
could install the include files. But when I try to make in
/usr/src/lib/csu I get an error:

# sh -x /usr/pkg/sbin/build-sparc dependall install
+ MACHINE=sparc
+ MACHINE_ARCH=sparc
+ CFLAGS=-D__NetBSD__
+ DESTDIR=/export/clients/scotty/usr/NetBSD-new-build
+ export MACHINE MACHINE_ARCH CFLAGS DESTDIR
+ TARGET=/usr/pkg/cross/bin/sparc-netbsdelf
+ /usr/pkg/cross/bin/sparc-netbsdelf-gcc -print-prog-name=cpp
+ CPP=/usr/pkg/cross/lib/gcc-lib/sparc-netbsdelf/egcs-2.91.60/cpp
+ make AR=/usr/pkg/cross/bin/sparc-netbsdelf-ar AS=/usr/pkg/cross/bin/sparc-netbsdelf-as CC=/usr/pkg/cross/bin/sparc-netbsdelf-gcc LD=/usr/pkg/cross/bin/sparc-netbsdelf-ld NM=/usr/pkg/cross/bin/sparc-netbsdelf-nm RANLIB=/usr/pkg/cross/bin/sparc-netbsdelf-ranlib SIZE=/usr/pkg/cross/bin/sparc-netbsdelf-size STRIP=/usr/pkg/cross/bin/sparc-netbsdelf-strip OBJCOPY=/usr/pkg/cross/bin/sparc-netbsdelf-objcopy CXX=/usr/pkg/cross/bin/sparc-netbsdelf-c++ CPP=/usr/pkg/cross/lib/gcc-lib/sparc-netbsdelf/egcs-2.91.60/cpp dependall install
dependall ===> sparc_elf
/usr/pkg/cross/bin/sparc-netbsdelf-gcc -D__NetBSD__ -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow  -Werror  -I- -I/usr/src/lib/csu/sparc_elf -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=32 -I/usr/src/lib/csu/sparc_elf/../../../libexec/ld.elf_so -I/usr/src/lib/csu/sparc_elf/../common_elf -I/usr/src/lib/csu/sparc_elf/../../libc/dlfcn -DDWARF2_EH -DJCR -DDSO_HANDLE -nostdinc -isystem /export/clients/scotty/usr/NetBSD-new-build/usr/include  -c /usr/src/lib/csu/sparc_elf/../common_elf/crtbegin.c -o crtbegin.o
/tmp/ccTtuJwV.s: Assembler messages:
/tmp/ccTtuJwV.s:43: Error: Unknown pseudo-op:  `.hidden'
*** Error code 1

Stop.
make: stopped in /usr/src/lib/csu/sparc_elf
*** Error code 1

Stop.
make: stopped in /usr/src/lib/csu/sparc_elf
*** Error code 1

Stop.
make: stopped in /usr/src/lib/csu
# 

The code that gets generated has this part in it:

.section        ".data"
        .align 4
        .type    __dso_handle,@object
        .size    __dso_handle,4
__dso_handle:
        .uaword 0
        .hidden __dso_handle
.section        ".text"
        .align 8


Any suggestions?

	rvdp