1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
--- make/common/NativeCompilation.gmk.orig
+++ make/common/NativeCompilation.gmk
@@ -438,58 +438,6 @@ define SetupNativeCompilation
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
$(CP) $$< $$@
endif
-
- ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
- ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
- ifeq ($(OPENJDK_TARGET_OS), solaris)
- # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
- # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
- # empty section headers until a fixed $(OBJCOPY) is available.
- # An empty section header has sh_addr == 0 and sh_size == 0.
- # This problem has only been seen on Solaris X64, but we call this tool
- # on all Solaris builds just in case.
- #
- # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
- # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
- $(RM) $$@
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
- $(OBJCOPY) --only-keep-debug $$< $$@
- $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
- else # not solaris
- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
- $(RM) $$@
- $(OBJCOPY) --only-keep-debug $$< $$@
- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
- endif # Touch to not retrigger rule on rebuild
- $(TOUCH) $$@
- endif # !windows
- endif # !macosx
-
- ifeq ($(ZIP_DEBUGINFO_FILES), true)
-ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
- $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
-
- ifeq ($(OPENJDK_TARGET_OS), windows)
- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET)
- $(CD) $$($1_OBJECT_DIR) \
- && $(ZIP) -q $$@ $$($1_LIBRARY).map $$($1_LIBRARY).pdb
- else
- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET) \
- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
- $(CD) $$($1_OBJECT_DIR) \
- && $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
- endif
-endif # no MacOS X support yet
- else
- ifeq ($(OPENJDK_TARGET_OS), windows)
- $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
- $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
- else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
- $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
- endif
- endif
endif
endif
@@ -522,58 +470,6 @@ endif # no MacOS X support yet
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
$(CP) $$< $$@
endif
-
- ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
- ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
- ifeq ($(OPENJDK_TARGET_OS), solaris)
- # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
- # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
- # empty section headers until a fixed $(OBJCOPY) is available.
- # An empty section header has sh_addr == 0 and sh_size == 0.
- # This problem has only been seen on Solaris X64, but we call this tool
- # on all Solaris builds just in case.
- #
- # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
- # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
- $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
- $(RM) $$@
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
- $(OBJCOPY) --only-keep-debug $$< $$@
- $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
- else # not solaris
- $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
- $(RM) $$@
- $(OBJCOPY) --only-keep-debug $$< $$@
- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
- endif
- $(TOUCH) $$@
- endif # !windows
- endif # !macosx
-
- ifeq ($(ZIP_DEBUGINFO_FILES), true)
-ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
- $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
-
- ifeq ($(OPENJDK_TARGET_OS), windows)
- $$($1_OBJECT_DIR)/$$($1_PROGRAM).diz : $$($1_TARGET)
- $(CD) $$($1_OBJECT_DIR) \
- && $(ZIP) -q $$@ $$($1_PROGRAM).map $$($1_PROGRAM).pdb
- else
- $$($1_OBJECT_DIR)/$$(PROGRAM_PREFIX)$$($1_PROGRAM).diz : $$($1_TARGET) \
- $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo
- $(CD) $$($1_OBJECT_DIR) \
- && $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo
- endif
-endif # no MacOS X support yet
- else
- ifeq ($(OPENJDK_TARGET_OS), windows)
- $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
- $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
- else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
- $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
- endif
- endif
endif
endif
|