< prev index next >

hotspot/make/lib/CompileLibjsig.gmk

Print this page

        

*** 32,42 **** include MakeBase.gmk include NativeCompilation.gmk ifneq ($(OPENJDK_TARGET_OS), windows) ifeq ($(STATIC_BUILD), false) - LIBJSIG_STRIP_SYMBOLS := true ifeq ($(OPENJDK_TARGET_OS), linux) LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS) LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) $(EXTRA_CFLAGS) LIBJSIG_LIBS := $(LIBDL) --- 32,41 ----
*** 70,105 **** SET_SHARED_LIBRARY_NAME := else ifeq ($(OPENJDK_TARGET_OS), macosx) LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) - # NOTE: This lib is not stripped on macosx in old build. Looks like a mistake. - LIBJSIG_STRIP_SYMBOLS := false else $(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk) endif LIBJSIG_SRC_FILE := $(HOTSPOT_TOPDIR)/src/os/$(HOTSPOT_TARGET_OS)/vm/jsig.c LIBJSIG_MAPFILE := $(wildcard $(HOTSPOT_TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS)) LIBJSIG_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/libjsig LIBJSIG_LDFLAGS += $(SHARED_LIBRARY_FLAGS) $(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \ LIBRARY := jsig, \ EXTRA_FILES := $(LIBJSIG_SRC_FILE), \ ! OUTPUT_DIR := $(LIBJSIG_OUTPUTDIR), \ LANG := C, \ CFLAGS := $(LIBJSIG_CFLAGS) $(LIBJSIG_CPU_FLAGS), \ LDFLAGS := $(LIBJSIG_LDFLAGS) $(LIBJSIG_CPU_FLAGS), \ LIBS := $(LIBJSIG_LIBS), \ MAPFILE := $(LIBJSIG_MAPFILE), \ OBJECT_DIR := $(LIBJSIG_OUTPUTDIR)/objs, \ - STRIP_SYMBOLS := $(LIBJSIG_STRIP_SYMBOLS), \ )) TARGETS += $(BUILD_LIBJSIG) endif endif all: $(TARGETS) --- 69,153 ---- SET_SHARED_LIBRARY_NAME := else ifeq ($(OPENJDK_TARGET_OS), macosx) LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) else $(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk) endif LIBJSIG_SRC_FILE := $(HOTSPOT_TOPDIR)/src/os/$(HOTSPOT_TARGET_OS)/vm/jsig.c LIBJSIG_MAPFILE := $(wildcard $(HOTSPOT_TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS)) LIBJSIG_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/libjsig LIBJSIG_LDFLAGS += $(SHARED_LIBRARY_FLAGS) + LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base) + $(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \ LIBRARY := jsig, \ EXTRA_FILES := $(LIBJSIG_SRC_FILE), \ ! OUTPUT_DIR := $(LIB_OUTPUTDIR), \ LANG := C, \ CFLAGS := $(LIBJSIG_CFLAGS) $(LIBJSIG_CPU_FLAGS), \ LDFLAGS := $(LIBJSIG_LDFLAGS) $(LIBJSIG_CPU_FLAGS), \ LIBS := $(LIBJSIG_LIBS), \ MAPFILE := $(LIBJSIG_MAPFILE), \ OBJECT_DIR := $(LIBJSIG_OUTPUTDIR)/objs, \ )) TARGETS += $(BUILD_LIBJSIG) + + ############################################################################ + # Create symlinks in each variant sub dir + ifeq ($(OPENJDK_TARGET_OS), macosx) + DEBUG_INFO_SUFFIX := $(SHARED_LIBRARY_SUFFIX).dSYM + else + DEBUG_INFO_SUFFIX := .debuginfo + endif + + # $1 variant subdir + define CreateSymlinks + # Always symlink from libdir/variant/libjsig.so -> ../libjsig.so and + # the corresponding debuginfo. + $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig): \ + $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig) + $$(call MakeDir, $$(@D)) + $(RM) $$@ + $(LN) -s ../$$(@F) $$@ + + TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig) + + ifeq ($(COPY_DEBUG_SYMBOLS), true) + $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX): \ + $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig) + $$(call MakeDir, $$(@D)) + $(RM) $$@ + $(LN) -s ../$$(@F) $$@ + + TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX) + + ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) + $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz: \ + $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX) + $(CD) $$(@D) && $(ZIP) -q -y $$@ $$(basename $$(@F))$(DEBUG_INFO_SUFFIX) + + TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz + endif + endif + endef + + # The subdir is the same as the variant for client and minimal, for all + # others it's server. + VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \ + $(if $(filter-out client minimal, $(JVM_VARIANTS)), server) + $(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v))) + + ############################################################################ + + include CopyToExplodedJdk.gmk + endif endif all: $(TARGETS)
< prev index next >