19
19
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
20
20
#############################################################################
21
21
22
- set (OMR_C_WARNINGS_AS_ERROR_FLAG -Werror)
23
- set (OMR_CXX_WARNINGS_AS_ERROR_FLAG -Werror)
24
- set (OMR_NASM_WARNINGS_AS_ERROR_FLAG -Werror)
22
+ # disable warnings as errors for OpenXL
23
+ # (see https://github.com/eclipse-omr/omr/issues/7583)
24
+ if (NOT CMAKE_C_COMPILER_IS_OPENXL)
25
+ set (OMR_C_WARNINGS_AS_ERROR_FLAG -Werror)
26
+ set (OMR_CXX_WARNINGS_AS_ERROR_FLAG -Werror)
27
+ set (OMR_NASM_WARNINGS_AS_ERROR_FLAG -Werror)
28
+ endif ()
25
29
26
30
set (OMR_C_ENHANCED_WARNINGS_FLAG -Wall)
27
31
set (OMR_CXX_ENHANCED_WARNINGS_FLAG -Wall)
@@ -68,6 +72,19 @@ if(OMR_HOST_ARCH STREQUAL "s390")
68
72
list (APPEND OMR_PLATFORM_COMPILE_OPTIONS -march=z9-109)
69
73
endif ()
70
74
75
+ if (OMR_OS_AIX AND CMAKE_C_COMPILER_IS_OPENXL)
76
+ omr_append_flags(CMAKE_C_FLAGS "-m64" )
77
+ omr_append_flags(CMAKE_CXX_FLAGS "-m64" )
78
+ omr_append_flags(CMAKE_ASM_FLAGS "-m64" )
79
+ omr_append_flags(CMAKE_SHARED_LINKER_FLAGS "-m64" )
80
+
81
+ if (OMR_ENV_DATA64)
82
+ set (CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> -X64 cr <TARGET> <LINK_FLAGS> <OBJECTS>" )
83
+ set (CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -X64 cr <TARGET> <LINK_FLAGS> <OBJECTS>" )
84
+ set (CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -X64 <TARGET>" )
85
+ endif ()
86
+ endif ()
87
+
71
88
# Testarossa build variables. Longer term the distinction between TR and the rest
72
89
# of the OMR code should be heavily reduced. In the meantime, we keep the distinction.
73
90
@@ -110,13 +127,22 @@ function(_omr_toolchain_separate_debug_symbols tgt)
110
127
else ()
111
128
omr_get_target_output_genex(${tgt} output_name )
112
129
set (dbg_file "${output_name}${OMR_DEBUG_INFO_OUTPUT_EXTENSION} " )
113
- add_custom_command (
114
- TARGET "${tgt} "
115
- POST_BUILD
116
- COMMAND "${CMAKE_OBJCOPY} " --only-keep-debug "${exe_file} " "${dbg_file} "
117
- COMMAND "${CMAKE_OBJCOPY} " --strip-debug "${exe_file} "
118
- COMMAND "${CMAKE_OBJCOPY} " --add-gnu-debuglink="${dbg_file} " "${exe_file} "
119
- )
130
+ if (OMR_OS_AIX AND CMAKE_C_COMPILER_IS_OPENXL)
131
+ add_custom_command (
132
+ TARGET "${tgt} "
133
+ POST_BUILD
134
+ COMMAND "${CMAKE_COMMAND} " -E copy ${exe_file} ${dbg_file}
135
+ COMMAND "${CMAKE_STRIP} " -X32_64 ${exe_file}
136
+ )
137
+ else ()
138
+ add_custom_command (
139
+ TARGET "${tgt} "
140
+ POST_BUILD
141
+ COMMAND "${CMAKE_OBJCOPY} " --only-keep-debug "${exe_file} " "${dbg_file} "
142
+ COMMAND "${CMAKE_OBJCOPY} " --strip-debug "${exe_file} "
143
+ COMMAND "${CMAKE_OBJCOPY} " --add-gnu-debuglink="${dbg_file} " "${exe_file} "
144
+ )
145
+ endif ()
120
146
endif ()
121
147
set_target_properties (${tgt} PROPERTIES OMR_DEBUG_FILE "${dbg_file} " )
122
148
endfunction ()
@@ -140,7 +166,9 @@ function(_omr_toolchain_process_exports TARGET_NAME)
140
166
"${exp_file} "
141
167
)
142
168
169
+ if (NOT CMAKE_C_COMPILER_IS_OPENXL)
143
170
target_link_libraries (${TARGET_NAME}
144
171
PRIVATE
145
172
"-Wl,--version-script,${exp_file} " )
173
+ endif ()
146
174
endfunction ()
0 commit comments