# HG changeset patch # User mgerdin # Date 1411632113 -7200 # Node ID f64f39a7ec7cf1a8653c943f7de4d6a2495afd26 # Parent 515ff48cf5f07d3e5d56c4804c0babd81a73ec06 8055141: Catch linker errors earlier in the JVM build by not allowing unresolved externals Reviewed-by: erikj, ehelin, dholmes diff -r 515ff48cf5f0 -r f64f39a7ec7c hotspot/make/bsd/makefiles/vm.make --- a/hotspot/make/bsd/makefiles/vm.make Wed Sep 24 11:00:12 2014 +0200 +++ b/hotspot/make/bsd/makefiles/vm.make Thu Sep 25 10:01:53 2014 +0200 @@ -272,6 +272,8 @@ LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/. LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.. LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F) + else + LFLAGS_VM += -Wl,-z,defs endif # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to diff -r 515ff48cf5f0 -r f64f39a7ec7c hotspot/make/linux/makefiles/vm.make --- a/hotspot/make/linux/makefiles/vm.make Wed Sep 24 11:00:12 2014 +0200 +++ b/hotspot/make/linux/makefiles/vm.make Thu Sep 25 10:01:53 2014 +0200 @@ -268,6 +268,7 @@ LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE)) LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM)) + LFLAGS_VM += -Wl,-z,defs # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to # get around library dependency and compatibility issues. Must use gcc not diff -r 515ff48cf5f0 -r f64f39a7ec7c hotspot/make/solaris/makefiles/vm.make --- a/hotspot/make/solaris/makefiles/vm.make Wed Sep 24 11:00:12 2014 +0200 +++ b/hotspot/make/solaris/makefiles/vm.make Thu Sep 25 10:01:53 2014 +0200 @@ -130,7 +130,7 @@ # Not sure what the 'designed for' comment is referring too above. # The order may not be too significant anymore, but I have placed this # older libm before libCrun, just to make sure it's found and used first. -LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc -ldemangle +LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc -ldemangle -lnsl else ifeq ($(COMPILER_REV_NUMERIC), 502) # SC6.1 has it's own libm.so: specifying anything else provokes a name conflict. @@ -284,6 +284,7 @@ LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE)) LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM)) + LFLAGS_VM += -Wl,-z,defs ifndef USE_GCC LIBS_VM = $(LIBS) else