hg: bsd-port/bsd-port/hotspot: . OpenBSD nm(1) doesn't have -U or -j, so provide an OpenBSD specific
Kurt Miller
kurt at intricatesoftware.com
Mon May 5 17:05:56 UTC 2014
On Mon, 2014-05-05 at 12:42 -0400, Jung-uk Kim wrote:
> On 2014-05-05 02:37:38 -0400, ?? wrote:
> > Hi,
> >
> > Thus wrote kurt at intricatesoftware.com
> > (kurt at intricatesoftware.com):
> >
> >> . OpenBSD nm(1) doesn't have -U or -j, so provide an OpenBSD
> >> specific
> >
> > neither have NetBSD's nor FreeBSD's. Generalization would be
> > appreciated.
>
> FYI, this is what I did in FreeBSD port for jdk8.
>
> /head/java/openjdk8/files/patch-bsd?revision=352721&view=markup#l155
>
> Jung-uk Kim
Thanks. OpenBSD doesn't have --defined-only. I believe the following
change will work for *BSD:
diff -r 0d6f95e05945 make/bsd/makefiles/build_vm_def.sh
--- a/make/bsd/makefiles/build_vm_def.sh Mon Apr 28 12:29:31 2014 -0400
+++ b/make/bsd/makefiles/build_vm_def.sh Mon May 05 12:50:51 2014 -0400
@@ -7,7 +7,10 @@
NM=nm
fi
-if [ `uname` == "OpenBSD" ] ; then
+OS_NAME=`uname -s`
+BSD_OS=${OS_NAME##${OS_NAME%BSD}}
+
+if [ "$BSD_OS" == "BSD" ] ; then
$NM $* \
| awk '{
if ($2 != "U") if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
So the whole chunk looks like this:
OS_NAME=`uname -s`
BSD_OS=${OS_NAME##${OS_NAME%BSD}}
if [ "$BSD_OS" == "BSD" ] ; then
$NM $* \
| awk '{
if ($2 != "U") if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
if ($2 != "U") if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
if ($2 != "U") if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
}' \
| sort -u
else
$NM -Uj $* | awk '
{ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 }
'
fi
More information about the bsd-port-dev
mailing list