diff options
| author | uwe <uwe@NetBSD.org> | 2004-04-28 01:44:59 +0000 |
|---|---|---|
| committer | uwe <uwe@NetBSD.org> | 2004-04-28 01:44:59 +0000 |
| commit | 562404165ea1f9b2edfb3deeda6d346cd7c98f04 (patch) | |
| tree | 78135dec09005a16828dee7b91a519407b39c7ba /gnu/lib | |
| parent | ac908ddaabd4b69c5087e427ebe3c2230e218416 (diff) | |
Copy .s.so rule we use for libgcc_pic to make sure the millicode is
.hidden in libgcc_s.so as well. Enable it for sh3. Other CPUs for
which gcc uses millicode probably need this too.
Per discussion with Nick Hudson <skrll>.
Diffstat (limited to 'gnu/lib')
| -rw-r--r-- | gnu/lib/libgcc3/libgcc_s/Makefile | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gnu/lib/libgcc3/libgcc_s/Makefile b/gnu/lib/libgcc3/libgcc_s/Makefile index 0a62967f262..5426da9dbc2 100644 --- a/gnu/lib/libgcc3/libgcc_s/Makefile +++ b/gnu/lib/libgcc3/libgcc_s/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2004/03/22 17:08:23 skrll Exp $ +# $NetBSD: Makefile,v 1.6 2004/04/28 01:44:59 uwe Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -28,6 +28,25 @@ SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} \ .include <bsd.lib.mk> +.if ${MACHINE_CPU} == "sh3" +# make sure the millicode is not externally visible + +CLEANFILES+= ${SOBJS:=.tmp1} ${SOBJS:=.tmp2} + +.S.so .s.so: + ${_MKTARGET_COMPILE} + ${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${.IMPSRC} -o ${.TARGET}.tmp1 + ${NM} -pg ${.TARGET}.tmp1 | ${AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \ + ${CC} -Wl,-x -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler - +.if defined(COPTS) && !empty(COPTS:M*-g*) + mv ${.TARGET}.tmp2 ${.TARGET} +.else + ${LD} -x -r ${.TARGET}.tmp2 -o ${.TARGET} + rm -f ${.TARGET}.tmp2 +.endif + rm -f ${.TARGET}.tmp1 +.endif + .else .include <bsd.prog.mk> # do nothing .endif |
