Re: powerpc64 rescue/rescue link failures
[email protected] (Christos Zoulas) Sun, 11 Jan 2015 01:24:12 +0000 (UTC)
| Newsgroups | gmane.os.netbsd.ports.powerpc |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]>, Dennis Ferguson <[email protected]> wrote: >-=-=-=-=-=- > >Since the January 2 fix to the powerpc64 loader to properly >complain about this the macppc64 build has been failing >while linking rescue/rescue, this way: > ># link rescue/rescue >[...] >/build/macppc64/obj/tooldir.NetBSD-7.99.3-amd64/lib/gcc/powerpc64--netbsd/4.8.4/../../../../powerpc64--netbsd/bin/ld: >(.text+0xc): call to `.__cerror' lacks nop, can't restore toc; >(-mcmodel=small toc adjust >stub)/build/macppc64/obj/tooldir.NetBSD-7.99.3-amd64/lib/gcc/powerpc64--netbsd/4.8.4/../../../../powerpc64--netbsd/bin/ld: final link failed: Bad value > >The problem is with the tail call to __cerror() which each >system call stub does (despite what the error message says). > >I can fix this by brute force with the attached patch, which >inlines __cerror() everywhere it is used, but I was wondering >if there was a better way. I see .hidden sometimes being used >for this but I have no idea if, or how, that might help this >case. The way this has been done so far is similar, basically giving each library with syscall stubs its own copy of cerror... find /usr/src/lib -name Makefile\* -exec grep cerror {} + /usr/src/lib/libc/sys/Makefile.inc: syscall.S __syscall.S __clone.S cerror.S /usr/src/lib/libposix/sys/Makefile.inc:SRCS+= cerror.S /usr/src/lib/libposix/sys/Makefile.inc:CPPFLAGS+= -D__cerror=__posix_cerror -I${LIBCDIR} -D_REENTRANT /usr/src/lib/librt/sys/Makefile.inc:SRCS+= cerror.S /usr/src/lib/librt/sys/Makefile.inc:CPPFLAGS+= -D__cerror=__rt_cerror -I${LIBCDIR} -D_REENTRANT I don't know what the right solution is... Also libc/shlib_version says: # - make __cerror (spelled CERROR) hidden again christos