< prev index next >

make/lib/CoreLibraries.gmk

Print this page
rev 12879 : 8136556: Add the ability to perform static builds of MacOSX x64 binaries
Reviewed-by: ihse, bdelsart, gadams, lfoltan, rriggs, hseigel, twisti


 419 
 420   TARGETS += $(BUILD_LIBJLI_STATIC)
 421 
 422 else ifeq ($(OPENJDK_TARGET_OS), macosx)
 423   #
 424   # On macosx they do partial (incremental) linking of libjli_static.a
 425   # code it here...rather than add support to NativeCompilation
 426   # as this is first time I see it
 427   $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
 428       LIBRARY := jli_static, \
 429       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
 430       SRC := $(LIBJLI_SRC_DIRS), \
 431       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 432       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 433       OPTIMIZATION := HIGH, \
 434       CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
 435       LDFLAGS := -nostdlib -r, \
 436       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
 437       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 438 



 439   $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC)
 440         $(call install-file)
 441 
 442   TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a

 443 
 444 else ifeq ($(OPENJDK_TARGET_OS), aix)
 445   # AIX also requires a static libjli because the compiler doesn't support '-rpath'
 446   $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
 447       STATIC_LIBRARY := jli_static, \
 448       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
 449       SRC := $(LIBJLI_SRC_DIRS), \
 450       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 451       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 452       OPTIMIZATION := HIGH, \
 453       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
 454       ARFLAGS := $(ARFLAGS), \
 455       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
 456 
 457   TARGETS += $(BUILD_LIBJLI_STATIC)
 458 
 459 endif


 419 
 420   TARGETS += $(BUILD_LIBJLI_STATIC)
 421 
 422 else ifeq ($(OPENJDK_TARGET_OS), macosx)
 423   #
 424   # On macosx they do partial (incremental) linking of libjli_static.a
 425   # code it here...rather than add support to NativeCompilation
 426   # as this is first time I see it
 427   $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
 428       LIBRARY := jli_static, \
 429       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
 430       SRC := $(LIBJLI_SRC_DIRS), \
 431       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 432       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 433       OPTIMIZATION := HIGH, \
 434       CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
 435       LDFLAGS := -nostdlib -r, \
 436       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
 437       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 438 
 439   ifeq ($(STATIC_BUILD), true)
 440     TARGETS += $(BUILD_LIBJLI_STATIC)
 441   else
 442     $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC)
 443         $(call install-file)
 444 
 445     TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a
 446   endif
 447 
 448 else ifeq ($(OPENJDK_TARGET_OS), aix)
 449   # AIX also requires a static libjli because the compiler doesn't support '-rpath'
 450   $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
 451       STATIC_LIBRARY := jli_static, \
 452       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
 453       SRC := $(LIBJLI_SRC_DIRS), \
 454       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 455       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 456       OPTIMIZATION := HIGH, \
 457       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
 458       ARFLAGS := $(ARFLAGS), \
 459       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
 460 
 461   TARGETS += $(BUILD_LIBJLI_STATIC)
 462 
 463 endif
< prev index next >