logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

icedtea-jdk-fix-build.patch (2150B)


  1. Fixes three issues:
  2. - so's should not be linked to -ljvm as dlopen(/abs/name) is
  3. used by the launcher to load libjvm.so; it is thus not available
  4. (musl/uclibc) ld.so to satisfy NEEDED dependency inserted by
  5. -ljvm. Fix to not link against -ljvm, and disable -z defs so
  6. undefined symbols are allowed in sos
  7. - the previous makes ldd generate errors on unresolved symbols (musl)
  8. remove it altogether as it's used for informative purposes only
  9. (display things - not check anything useful)
  10. - Don't delete the generated directory $(GENCSEXT), this can
  11. confuse make in highly parallel builds with:
  12. make[6]: *** INTERNAL: readdir: No such file or directory. Stop.
  13. make[6]: Leaving directory '.../openjdk-boot/jdk/make/sun/nio/cs'
  14. --- openjdk.orig/jdk/make/common/Defs-linux.gmk
  15. +++ openjdk/jdk/make/common/Defs-linux.gmk
  16. @@ -350,7 +350,7 @@
  17. EXTRA_LIBS += -lc
  18. -LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
  19. +LDFLAGS_DEFS_OPTION =
  20. LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
  21. #
  22. @@ -407,7 +407,7 @@
  23. # the library itself should not.
  24. #
  25. VM_NAME = server
  26. -JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
  27. +JVMLIB =
  28. JAVALIB = -ljava $(JVMLIB)
  29. #
  30. --- openjdk.orig/jdk/make/sun/nio/cs/Makefile
  31. +++ openjdk/jdk/make/sun/nio/cs/Makefile
  32. @@ -107,7 +107,7 @@
  33. $(GENCSDATASRC)/DoubleByte-X.java.template \
  34. $(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
  35. @$(prep-target)
  36. - $(RM) -r $(GENCSEXT)
  37. + $(RM) -f "$(GENCSEXT)"/*
  38. $(MKDIR) -p $(GENCSEXT)
  39. $(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) extsbcs
  40. $(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
  41. --- openjdk.orig/jdk/make/common/shared/Defs-linux.gmk
  42. +++ openjdk/jdk/make/common/shared/Defs-linux.gmk
  43. @@ -207,8 +207,6 @@
  44. if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
  45. $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
  46. fi && \
  47. - $(ECHO) "Library loads for: $1" && \
  48. - $(LDD) $1 && \
  49. $(ECHO) "RUNPATH for: $1" && \
  50. ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
  51. )