Module Name: src
Committed By: mrg
Date: Sun Mar 28 04:29:35 UTC 2010
Modified Files:
src/sys/rump: Makefile.rump
Log Message:
apply a patch from dennis fergusson:
fix the powerpc64 quirk handling by introducing a prefix quirk and
using it as appropriate. fix the (postfix) quirk.
now rump and powerpc64 get along nicely.
To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/rump/Makefile.rump
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.54 src/sys/rump/Makefile.rump:1.55
--- src/sys/rump/Makefile.rump:1.54 Mon Mar 22 05:39:00 2010
+++ src/sys/rump/Makefile.rump Sun Mar 28 04:29:34 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rump,v 1.54 2010/03/22 05:39:00 mrg Exp $
+# $NetBSD: Makefile.rump,v 1.55 2010/03/28 04:29:34 mrg Exp $
#
WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet
@@ -70,7 +70,22 @@
.elif ${MACHINE_CPU} == "hppa"
_SYMQUIRK='|\$$\$$'
.elif ${MACHINE_ARCH} == "powerpc64"
-_SYMQUIRK='|\.(rump|RUMP)'
+_SYMQUIRK="|PF_funcs"
+.endif
+
+#
+# Prefix quirks. At least one toolchain generates global
+# symbols with prefixes which really need to remain as prefixes
+# (i.e. the '.' on the front of some ppc64 globals). The
+# way to know if you have the problem is if you get later
+# complaints about symbols like 'rumpns_XrumpBLAH' or 'XrumpBLAH';
+# the 'X' part was added by the toolchain and will need to
+# be mentioned here.
+#
+.if ${MACHINE_ARCH} == "powerpc64"
+_PQ="\.?"
+.else
+_PQ=
.endif
rump_symren: __archivebuild
@@ -94,8 +109,8 @@
${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
.endif
${NM} -go ${RUMP_SYMREN:U${.TARGET}} | ${TOOL_AWK} ' \
- $$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \
- {printf "%s rumpns_%s\n", $$NF, $$NF}' \
+ $$NF!~/^'${_PQ}'(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \
+ {s = $$NF; sub(/^'${_PQ}'/, "&rumpns_", s); print $$NF, s}' \
| sort | uniq > renametab.${.TARGET}
${OBJCOPY} --preserve-dates --redefine-syms \
renametab.${.TARGET} ${RUMP_SYMREN:U${.TARGET}}