Subject: __trampoline_setup?
To: None <port-macppc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-macppc
Date: 01/13/2001 16:47:38
I was trying to build some code on my macppc machine and got a linker
error "undefined reference to `__trampoline_setup'".  The file name and
line number indicate the beginning of a function that has nested
functions, so I'd expect to see trampolines involved - but this doesn't
look right.

The code in question builds (and AFAICT runs) fine on NetBSD/sparc
built from the same source tree.

I went looking for trampoline_setup in the source.  I found was two
files in the gcc source, int config/rs6000.  rs6000.c contains the code
to generate the call and tramp.asm contains the code itself.  Upon
copying tramp.asm (and ginclude/ppc-asm.h) into the directory with my
program (tramp.asm under the name of tramp.S), ane editing the Makefile
to (a) set COMPILE.S = ${CC} ${AFLAGS} ${CPPFLAGS} -c and (b) include
tramp.o in the program's list of .o files, the program links OK and
appears to do trampolines right at run time.  But it seems to me I
really shouldn't need to do that. :-)

Have I borked something, or is the NetBSD build system not correctly
set up to deal with trampoline support in libgcc, or what?  In
particular, what's the Right fix?

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B