113
114 # Math Library (libm.so), do not use -lm.
115 # There might be two versions of libm.so on the build system:
116 # libm.so.1 and libm.so.2, and we want libm.so.1.
117 # Depending on the Solaris release being used to build with,
118 # /usr/lib/libm.so could point at a libm.so.2, so we are
119 # explicit here so that the libjvm.so you have built will work on an
120 # older Solaris release that might not have libm.so.2.
121 # This is a critical factor in allowing builds on Solaris 10 or newer
122 # to run on Solaris 8 or 9.
123 #
124 LIBM=/usr/lib$(ISA_DIR)/libm.so.1
125
126 ifeq ("${Platform_compiler}", "sparcWorks")
127 # The whole megilla:
128 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
129 # Old Comment: List the libraries in the order the compiler was designed for
130 # Not sure what the 'designed for' comment is referring too above.
131 # The order may not be too significant anymore, but I have placed this
132 # older libm before libCrun, just to make sure it's found and used first.
133 LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc -ldemangle
134 else
135 ifeq ($(COMPILER_REV_NUMERIC), 502)
136 # SC6.1 has it's own libm.so: specifying anything else provokes a name conflict.
137 LIBS += -ldl -lthread -lsocket -lm -lsched -ldoor -ldemangle
138 else
139 LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor -ldemangle
140 endif # 502
141 endif # 505
142 else
143 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle
144 endif # sparcWorks
145
146 LIBS += -lkstat -lpicl
147
148 # By default, link the *.o into the library, not the executable.
149 LINK_INTO$(LINK_INTO) = LIBJVM
150
151 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
152
153 #----------------------------------------------------------------------
259 print $$0; \
260 } \
261 }' > $@
262
263 mapfile_extended : mapfile $(MAPFILE_DTRACE_OPT)
264 rm -f $@
265 cat $^ > $@
266
267 vm.def: $(Obj_Files)
268 sh $(GAMMADIR)/make/solaris/makefiles/build_vm_def.sh *.o > $@
269
270 ifeq ($(LINK_INTO),AOUT)
271 LIBJVM.o =
272 LIBJVM_MAPFILE =
273 LIBS_VM = $(LIBS)
274 else
275 LIBJVM.o = $(JVM_OBJ_FILES)
276 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended
277 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
278 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
279 ifndef USE_GCC
280 LIBS_VM = $(LIBS)
281 else
282 # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
283 # get around library dependency and compatibility issues. Must use gcc not
284 # g++ to link.
285 LFLAGS_VM += $(STATIC_LIBGCC)
286 LIBS_VM += $(STATIC_STDCXX) $(LIBS)
287 endif
288 endif
289
290 ifdef USE_GCC
291 LINK_VM = $(LINK_LIB.CC)
292 else
293 LINK_VM = $(LINK_LIB.CXX)
294 endif
295 # making the library:
296 $(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE)
297 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
298 @echo Linking vm...
|
113
114 # Math Library (libm.so), do not use -lm.
115 # There might be two versions of libm.so on the build system:
116 # libm.so.1 and libm.so.2, and we want libm.so.1.
117 # Depending on the Solaris release being used to build with,
118 # /usr/lib/libm.so could point at a libm.so.2, so we are
119 # explicit here so that the libjvm.so you have built will work on an
120 # older Solaris release that might not have libm.so.2.
121 # This is a critical factor in allowing builds on Solaris 10 or newer
122 # to run on Solaris 8 or 9.
123 #
124 LIBM=/usr/lib$(ISA_DIR)/libm.so.1
125
126 ifeq ("${Platform_compiler}", "sparcWorks")
127 # The whole megilla:
128 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
129 # Old Comment: List the libraries in the order the compiler was designed for
130 # Not sure what the 'designed for' comment is referring too above.
131 # The order may not be too significant anymore, but I have placed this
132 # older libm before libCrun, just to make sure it's found and used first.
133 LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc -ldemangle -lnsl
134 else
135 ifeq ($(COMPILER_REV_NUMERIC), 502)
136 # SC6.1 has it's own libm.so: specifying anything else provokes a name conflict.
137 LIBS += -ldl -lthread -lsocket -lm -lsched -ldoor -ldemangle
138 else
139 LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor -ldemangle
140 endif # 502
141 endif # 505
142 else
143 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc -ldemangle
144 endif # sparcWorks
145
146 LIBS += -lkstat -lpicl
147
148 # By default, link the *.o into the library, not the executable.
149 LINK_INTO$(LINK_INTO) = LIBJVM
150
151 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
152
153 #----------------------------------------------------------------------
259 print $$0; \
260 } \
261 }' > $@
262
263 mapfile_extended : mapfile $(MAPFILE_DTRACE_OPT)
264 rm -f $@
265 cat $^ > $@
266
267 vm.def: $(Obj_Files)
268 sh $(GAMMADIR)/make/solaris/makefiles/build_vm_def.sh *.o > $@
269
270 ifeq ($(LINK_INTO),AOUT)
271 LIBJVM.o =
272 LIBJVM_MAPFILE =
273 LIBS_VM = $(LIBS)
274 else
275 LIBJVM.o = $(JVM_OBJ_FILES)
276 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended
277 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
278 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
279 LFLAGS_VM += -Wl,-z,defs
280 ifndef USE_GCC
281 LIBS_VM = $(LIBS)
282 else
283 # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
284 # get around library dependency and compatibility issues. Must use gcc not
285 # g++ to link.
286 LFLAGS_VM += $(STATIC_LIBGCC)
287 LIBS_VM += $(STATIC_STDCXX) $(LIBS)
288 endif
289 endif
290
291 ifdef USE_GCC
292 LINK_VM = $(LINK_LIB.CC)
293 else
294 LINK_VM = $(LINK_LIB.CXX)
295 endif
296 # making the library:
297 $(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE)
298 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
299 @echo Linking vm...
|