< prev index next >
make/common/NativeCompilation.gmk
Print this page
rev 59189 : imported patch build
rev 59190 : imported patch build-01
*** 237,271 ****
) \
)
# When compiling with relative paths, the deps file comes out with relative
# paths.
- ifeq ($(TOOLCHAIN_TYPE), solstudio)
- define fix-deps-file
- $(SED) -e 's|\./|$(WORKSPACE_ROOT)/|g' $1.tmp > $1
- endef
- else
define fix-deps-file
$(SED) -e 's|^\([ ]*\)|\1$(WORKSPACE_ROOT)|' $1.tmp > $1
endef
- endif
else
# By default the MakeCommandRelative macro does nothing.
MakeCommandRelative = $1
! # Even with absolute paths on the command line, the Solaris studio compiler
! # doesn't output the full path to the object file in the generated deps files.
! # For other toolchains, no adjustment is needed.
! ifeq ($(TOOLCHAIN_TYPE), solstudio)
! define fix-deps-file
! $(SED) 's|^$$(@F):|$$@:|' $1.tmp > $1
! endef
! else
define fix-deps-file
$(MV) $1.tmp $1
endef
- endif
endif
################################################################################
# Create the recipe needed to compile a single native source file.
#
--- 237,257 ----
) \
)
# When compiling with relative paths, the deps file comes out with relative
# paths.
define fix-deps-file
$(SED) -e 's|^\([ ]*\)|\1$(WORKSPACE_ROOT)|' $1.tmp > $1
endef
else
# By default the MakeCommandRelative macro does nothing.
MakeCommandRelative = $1
! # No adjustment is needed.
define fix-deps-file
$(MV) $1.tmp $1
endef
endif
################################################################################
# Create the recipe needed to compile a single native source file.
#
*** 459,469 ****
# EXTRA_DEPS List of extra dependencies to be added to each compiled file
# VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
# RC_FLAGS flags for RC.
# EMBED_MANIFEST if true, embed manifest on Windows.
# MAPFILE mapfile
- # REORDER reorder file
# USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the
# mapfile for the output symbols file
# CC the compiler to use, default is $(CC)
# LD the linker to use, default is $(LD)
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST, HIGHEST_JVM, SIZE
--- 445,454 ----
*** 697,711 ****
$1_EXTRA_CFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
$1_EXTRA_CXXFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
$1_EXTRA_ASFLAGS += $$(ASFLAGS_DEBUG_SYMBOLS)
endif
- ifneq ($$($1_REORDER), )
- $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
- $1_EXTRA_CXXFLAGS += $$(C_FLAG_REORDER)
- endif
-
# Pass the library name for static JNI library naming
ifeq ($$($1_TYPE), STATIC_LIBRARY)
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_NAME)
$1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_NAME)
endif
--- 682,691 ----
*** 735,745 ****
endif
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), true)
$1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
$1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
- $1_EXTRA_LDFLAGS += $(LDFLAGS_WARNINGS_ARE_ERRORS)
endif
ifeq (NONE, $$($1_OPTIMIZATION))
$1_OPT_CFLAGS := $(C_O_FLAG_NONE)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
--- 715,724 ----
*** 927,947 ****
-include $$($1_DEPS_FILE).old
endif
ifneq ($(DISABLE_MAPFILES), true)
$1_REAL_MAPFILE := $$($1_MAPFILE)
- ifeq ($(call isTargetOs, windows), false)
- ifneq ($$($1_REORDER), )
- $1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
-
- $$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
- $$(call MakeDir, $$(@D))
- $$(CP) $$($1_MAPFILE) $$@.tmp
- $$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp
- $$(MV) $$@.tmp $$@
- endif
- endif
endif
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables
# for LDFLAGS and LIBS
$1_EXTRA_LDFLAGS += $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
--- 906,915 ----
*** 971,981 ****
$1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).stripped.pdb"
endif
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map
! else ifeq ($(call isTargetOs, linux solaris), true)
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo
# Setup the command line creating debuginfo files, to be run after linking.
# It cannot be run separately since it updates the original target file
$1_CREATE_DEBUGINFO_CMDS := \
$$($1_OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
--- 939,949 ----
$1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).stripped.pdb"
endif
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map
! else ifeq ($(call isTargetOs, linux), true)
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo
# Setup the command line creating debuginfo files, to be run after linking.
# It cannot be run separately since it updates the original target file
$1_CREATE_DEBUGINFO_CMDS := \
$$($1_OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
*** 1098,1108 ****
$1 += $$($1_IMPORT_LIBRARY)
endif
endif
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
! $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
$$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
$$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
--- 1066,1076 ----
$1 += $$($1_IMPORT_LIBRARY)
endif
endif
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
! $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
$$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
$$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
*** 1157,1177 ****
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
ifeq ($(call isTargetOs, windows), true)
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
! $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
test "$$$$?" = "1" ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
else
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
! $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
endif
ifeq ($(call isTargetOs, windows), true)
--- 1125,1145 ----
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
ifeq ($(call isTargetOs, windows), true)
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
! $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
test "$$$$?" = "1" ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
else
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
! $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
endif
ifeq ($(call isTargetOs, windows), true)
< prev index next >