[8u] RFR: enable -fPIC in hotspot
Alex Kashchenko
akashche at redhat.com
Sat Feb 20 22:13:26 UTC 2016
Hi,
aarch32-jdk8u build currently fails on armv7 during VM linking with the
following error:
/usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/bin/ld:
adaptiveFreeList.o: relocation R_ARM_THM_MOVW_ABS_NC against `a local
symbol' can not be used when making a shared object; recompile with -fPIC
At the same time jdk9 builds fine both natively (in Fedora 23 on armv7)
and with cross-compilation on x86_64 (using arm-linux-gnueabihf
toolchain in Ubuntu 15.10).
It looks like this bit in rules.make is inconsistent between jdk8u [1]
and jdk9 [2] as GENPIC variable is set in jdk8u but check is done on LP64.
Webrev:
http://cr.openjdk.java.net/~akasko/aarch32/jdk8u/hotspot_pic/webrev.00/
I can create a JBS issue if it will be needed.
References:
- relevant GCC change [3]
- similar issue [4]
[1]
http://hg.openjdk.java.net/aarch32-port/jdk8u/hotspot/file/a87e86998272/make/linux/makefiles/rules.make#l144
[2]
http://hg.openjdk.java.net/aarch32-port/jdk9/hotspot/file/82b79870e348/make/linux/makefiles/rules.make#l154
[3] https://sourceware.org/ml/binutils/2009-04/msg00395.html
[4]
http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-August/006278.html
--
-Alex
More information about the aarch32-port-dev
mailing list