void-packages/srcpkgs/openjdk7-bootstrap/files/icedtea-jdk-fix-build.patch

57 lines
2.1 KiB
Diff

Fixes three issues:
- so's should not be linked to -ljvm as dlopen(/abs/name) is
used by the launcher to load libjvm.so; it is thus not available
(musl/uclibc) ld.so to satisfy NEEDED dependency inserted by
-ljvm. Fix to not link against -ljvm, and disable -z defs so
undefined symbols are allowed in sos
- the previous makes ldd generate errors on unresolved symbols (musl)
remove it altogether as it's used for informative purposes only
(display things - not check anything useful)
- Don't delete the generated directory $(GENCSEXT), this can
confuse make in highly parallel builds with:
make[6]: *** INTERNAL: readdir: No such file or directory. Stop.
make[6]: Leaving directory '.../openjdk-boot/jdk/make/sun/nio/cs'
--- openjdk.orig/jdk/make/common/Defs-linux.gmk
+++ openjdk/jdk/make/common/Defs-linux.gmk
@@ -350,7 +350,7 @@
EXTRA_LIBS += -lc
-LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
+LDFLAGS_DEFS_OPTION =
LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
#
@@ -407,7 +407,7 @@
# the library itself should not.
#
VM_NAME = server
-JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
+JVMLIB =
JAVALIB = -ljava $(JVMLIB)
#
--- openjdk.orig/jdk/make/sun/nio/cs/Makefile
+++ openjdk/jdk/make/sun/nio/cs/Makefile
@@ -107,7 +107,7 @@
$(GENCSDATASRC)/DoubleByte-X.java.template \
$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
@$(prep-target)
- $(RM) -r $(GENCSEXT)
+ $(RM) -f "$(GENCSEXT)"/*
$(MKDIR) -p $(GENCSEXT)
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) extsbcs
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
--- openjdk.orig/jdk/make/common/shared/Defs-linux.gmk
+++ openjdk/jdk/make/common/shared/Defs-linux.gmk
@@ -207,8 +207,6 @@
if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
$(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
fi && \
- $(ECHO) "Library loads for: $1" && \
- $(LDD) $1 && \
$(ECHO) "RUNPATH for: $1" && \
( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
)