8055141: Catch linker errors earlier in the JVM build by not allowing unresolved externals

Reviewed-by: erikj, ehelin, dholmes
This commit is contained in:
Mikael Gerdin 2014-09-25 10:01:53 +02:00
parent 30cb2dcb12
commit 53b92fe072
3 changed files with 5 additions and 1 deletions

View file

@ -272,6 +272,8 @@ else
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/. LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.. LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F) LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
else
LFLAGS_VM += -Wl,-z,defs
endif endif
# JVM is statically linked with libgcc[_s] and libstdc++; this is needed to # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to

View file

@ -268,6 +268,7 @@ else
LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE)) LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM)) LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
LFLAGS_VM += -Wl,-z,defs
# JVM is statically linked with libgcc[_s] and libstdc++; this is needed to # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
# get around library dependency and compatibility issues. Must use gcc not # get around library dependency and compatibility issues. Must use gcc not

View file

@ -130,7 +130,7 @@ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
# Not sure what the 'designed for' comment is referring too above. # Not sure what the 'designed for' comment is referring too above.
# The order may not be too significant anymore, but I have placed this # 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. # 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 else
ifeq ($(COMPILER_REV_NUMERIC), 502) ifeq ($(COMPILER_REV_NUMERIC), 502)
# SC6.1 has it's own libm.so: specifying anything else provokes a name conflict. # SC6.1 has it's own libm.so: specifying anything else provokes a name conflict.
@ -284,6 +284,7 @@ else
LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended
LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE)) LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM)) LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
LFLAGS_VM += -Wl,-z,defs
ifndef USE_GCC ifndef USE_GCC
LIBS_VM = $(LIBS) LIBS_VM = $(LIBS)
else else