-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-05-05 14:59:32 -0400, ?? wrote: 2014년 5월 5일 14:59, Jung-uk Kim 쓴 글:> On 2014-05-05 13:27:44 - -0400, ?? wrote: >> On 2014-05-05 13:05:56 -0400, ?? wrote: >>> 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 k...@intricatesoftware.com >>>>> (k...@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: > >> I see. > >>> 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 > >> Please note '==' is a Linuxism/Bashism. '=' is Posixly-correct >> equivalent. > >>> +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 ";" >> ... > >> This file is just for *BSDs and Mac but Mac's toolchains are >> always special. Therefore, Darwin should be specialized, not >> ours. > >> Also, I am not sure why 'if ($2 != "U")' was repeated three >> times. awk(1) is not that dumb. ;-) > Actually, I realized it won't work for FreeBSD because the field 2 > is not always a symbol type. > > % nm -V GNU nm 2.17.50 [FreeBSD] 2007-07-03 Copyright 2007 Free > Software Foundation, Inc. This program is free software; you may > redistribute it under the terms of the GNU General Public License. > This program has absolutely no warranty. % nm mknodes.o U __error U > __isthreaded 0000000000000f50 t __sputc U __stderrp U __stdinp U > __swbuf 00000000000069d0 b curstr 0000000000000b00 t error ... % nm > mknodes.o | awk '{print $2}' __error __isthreaded t __stderrp > __stdinp __swbuf b t ... > > In fact, it is always $1 because undefined symbol does not have an > address. :-/
It seems OpenBSD is the only one requiring the hack and working with it and other *BSDs seem to have '--defined-only' or '-U' option. Therefore, I am going to commit the following for my jdk8 port later. https://redports.org/changeset/26342/#file1 Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJTZ/CsAAoJEHyflib82/FGbFoH/RyWFY/UacNj5M9bO5ESjbJ5 Bg7elZmhGKVtongBfID9lAbgr19PXE3vHEtmVpICJIkwYRgkY3LEeF4kK61OYjoS 6mfd1/sEm9OwMk7eQ5lhJbq1uz1u//PpkYFb9RPjNqnh2rB9Cvd/YikEJ4lcmpoz fCBeZyWr7/A04fhZlVgR8/tqbOpJKnWk7+7E9VIukTnIkNxSRPMqFdGN7k3jKTWf fHyRToK+q/WqgExD2n6/q681p7TsXVDvjhimVWosoLIY0bn57fTfm+rIe23u2jkq NHo21gfZjUcF7pwpJ6ANJ4ImyGVss3LBuOhz4/U9uVdzWbI4CcnDtWgvI/kPocc= =xCZ2 -----END PGP SIGNATURE-----