Subject: compile error at src/lib/csu/sparc64/crt0.c::___start
To: None <eeh@netbsd.org>
From: FUKAUMI Naoki <naoki@fukaumi.org>
List: port-sparc64
Date: 04/02/2002 13:05:29
At 29 Mar 2002 22:16:15 -0000,
eeh@netbsd.org wrote:
> Old versions of egcs and binutils did strange things.
>
> The linker defaults to using `_start'. Our gcc changes that to `__start'.
>
> I suppose `start' can be removed now we're using a semi-sane toolchain.
I couldn't compile src/lib/csu/sparc64/crt0.c at Apr 1 source.
Error message:
(cd /usr/src/lib/csu && /home/tools/bin/nbmake dependall)
dependall ===> sparc64
/home/tools/bin/sparc64--netbsd-gcc -O -ffixed-g4 -fPIC -mcmodel=medlow -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow -Werror -I- -I/usr/src/lib/csu/sparc64/../sparc_elf -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=64 -I/usr/src/lib/csu/sparc64/../../../libexec/ld.elf_so -I/usr/src/lib/csu/sparc64/../common_elf -I/usr/src/lib/csu/sparc64/../../libc/dlfcn -DDWARF2_EH -DJCR -DDSO_HANDLE -nostdinc -isystem /home/d/usr/include -c -DCRT0 /usr/src/lib/csu/sparc64/crt0.c -o crt0.o
cc1: warnings being treated as errors
/usr/src/lib/csu/sparc64/crt0.c:74: warning: `___start' defined but not used
*** Error code 1
Stop.
Is 'static' needed?
--- lib/csu/sparc64/crt0.c.orig Tue Apr 2 12:44:00 2002
+++ lib/csu/sparc64/crt0.c Tue Apr 2 12:44:50 2002
@@ -66,10 +66,10 @@
mov %g1, %o3 ! ps_strings XXXX\n\
");
-static void ___start __P((char **, void (*cleanup) __P((void)), const Obj_Entry *,
+void ___start __P((char **, void (*cleanup) __P((void)), const Obj_Entry *,
struct ps_strings *));
-static void
+void
___start(sp, cleanup, obj, ps_strings)
char **sp;
void (*cleanup) __P((void)); /* from shared loader */
--
FUKAUMI Naoki