Skip to content

Commit b7821ad

Browse files
committed
8224214: [AIX] Remove support for legacy xlc compiler
Reviewed-by: erikj, kbarrett, mdoerr, dholmes
1 parent 2399a8d commit b7821ad

File tree

8 files changed

+16
-40
lines changed

8 files changed

+16
-40
lines changed

make/autoconf/flags-cflags.m4

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,7 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
121121
# -g0 enables debug symbols without disabling inlining.
122122
CFLAGS_DEBUG_SYMBOLS="-g0 -xs"
123123
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
124-
if test "x$XLC_USES_CLANG" = xtrue; then
125-
CFLAGS_DEBUG_SYMBOLS="-g1"
126-
else
127-
CFLAGS_DEBUG_SYMBOLS="-g"
128-
fi
124+
CFLAGS_DEBUG_SYMBOLS="-g1"
129125
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
130126
CFLAGS_DEBUG_SYMBOLS="-Z7 -d2Zi+"
131127
fi

make/autoconf/toolchain.m4

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -286,29 +286,22 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
286286
$ECHO "$XLCLANG_VERSION_OUTPUT" | $GREP "IBM XL C/C++ for AIX" > /dev/null
287287
if test $? -eq 0; then
288288
AC_MSG_NOTICE([xlclang++ output: $XLCLANG_VERSION_OUTPUT])
289-
XLC_USES_CLANG=true
289+
else
290+
AC_MSG_ERROR([xlclang++ version output check failed, output: $XLCLANG_VERSION_OUTPUT])
290291
fi
291292
fi
292293
293294
TOOLCHAIN_CC_BINARY_clang="clang"
294295
TOOLCHAIN_CC_BINARY_gcc="gcc"
295296
TOOLCHAIN_CC_BINARY_microsoft="cl$EXE_SUFFIX"
296297
TOOLCHAIN_CC_BINARY_solstudio="cc"
297-
TOOLCHAIN_CC_BINARY_xlc="xlc_r"
298+
TOOLCHAIN_CC_BINARY_xlc="xlclang"
298299
299300
TOOLCHAIN_CXX_BINARY_clang="clang++"
300301
TOOLCHAIN_CXX_BINARY_gcc="g++"
301302
TOOLCHAIN_CXX_BINARY_microsoft="cl$EXE_SUFFIX"
302303
TOOLCHAIN_CXX_BINARY_solstudio="CC"
303-
TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
304-
305-
if test "x$OPENJDK_TARGET_OS" = xaix; then
306-
if test "x$XLC_USES_CLANG" = xtrue; then
307-
AC_MSG_NOTICE([xlclang++ detected, using it])
308-
TOOLCHAIN_CC_BINARY_xlc="xlclang"
309-
TOOLCHAIN_CXX_BINARY_xlc="xlclang++"
310-
fi
311-
fi
304+
TOOLCHAIN_CXX_BINARY_xlc="xlclang++"
312305
313306
# Use indirect variable referencing
314307
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE

src/hotspot/os/aix/os_aix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static void query_multipage_support() {
523523
describe_pagesize(g_multipage_support.pthr_stack_pagesize));
524524
trcVerbose("Default shared memory page size: %s",
525525
describe_pagesize(g_multipage_support.shmpsize));
526-
trcVerbose("Can use 64K pages dynamically with shared meory: %s",
526+
trcVerbose("Can use 64K pages dynamically with shared memory: %s",
527527
(g_multipage_support.can_use_64K_pages ? "yes" :"no"));
528528
trcVerbose("Can use 16M pages dynamically with shared memory: %s",
529529
(g_multipage_support.can_use_16M_pages ? "yes" :"no"));
@@ -1440,7 +1440,7 @@ void os::print_memory_info(outputStream* st) {
14401440
describe_pagesize(g_multipage_support.pthr_stack_pagesize));
14411441
st->print_cr(" Default shared memory page size: %s",
14421442
describe_pagesize(g_multipage_support.shmpsize));
1443-
st->print_cr(" Can use 64K pages dynamically with shared meory: %s",
1443+
st->print_cr(" Can use 64K pages dynamically with shared memory: %s",
14441444
(g_multipage_support.can_use_64K_pages ? "yes" :"no"));
14451445
st->print_cr(" Can use 16M pages dynamically with shared memory: %s",
14461446
(g_multipage_support.can_use_16M_pages ? "yes" :"no"));

src/hotspot/share/gc/shared/oopStorage.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,7 @@ class OopStorage : public CHeapObj<mtGC> {
183183
// private types by providing public typedefs for them.
184184
class TestAccess;
185185

186-
// xlC on AIX can't compile test_oopStorage.cpp with following private
187-
// classes. C++03 introduced access for nested classes with DR45, but xlC
188-
// version 12 rejects it.
189-
NOT_AIX( private: )
186+
private:
190187
class Block; // Fixed-size array of oops, plus bookkeeping.
191188
class ActiveArray; // Array of Blocks, plus bookkeeping.
192189
class AllocationListEntry; // Provides AllocationList links in a Block.
@@ -224,10 +221,7 @@ NOT_AIX( private: )
224221
const char* _name;
225222
ActiveArray* _active_array;
226223
AllocationList _allocation_list;
227-
AIX_ONLY(public:) // xlC 12 on AIX doesn't implement C++ DR45.
228224
Block* volatile _deferred_updates;
229-
AIX_ONLY(private:)
230-
231225
Mutex* _allocation_mutex;
232226
Mutex* _active_mutex;
233227

@@ -248,9 +242,7 @@ AIX_ONLY(private:)
248242
Block* find_block_or_null(const oop* ptr) const;
249243
void delete_empty_block(const Block& block);
250244
bool reduce_deferred_updates();
251-
AIX_ONLY(public:) // xlC 12 on AIX doesn't implement C++ DR45.
252245
void record_needs_cleanup();
253-
AIX_ONLY(private:)
254246

255247
// Managing _active_array.
256248
bool expand_active_array();

src/hotspot/share/gc/shared/ptrQueue.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ class BufferNode {
211211

212212
static BufferNode* volatile* next_ptr(BufferNode& bn) { return &bn._next; }
213213

214-
AIX_ONLY(public:) // xlC 12 on AIX doesn't implement C++ DR45.
215214
// Allocate a new BufferNode with the "buffer" having size elements.
216215
static BufferNode* allocate(size_t size);
217216

src/hotspot/share/memory/allocation.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,6 @@ class StackObj ALLOCATION_SUPER_CLASS_SPEC {
230230
private:
231231
void* operator new(size_t size) throw();
232232
void* operator new [](size_t size) throw();
233-
#ifdef __IBMCPP__
234-
public:
235-
#endif
236233
void operator delete(void* p);
237234
void operator delete [](void* p);
238235
};

src/hotspot/share/runtime/vm_version.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
249249
#define HOTSPOT_BUILD_COMPILER "clang " __VERSION__
250250
#elif defined(__GNUC__)
251251
#define HOTSPOT_BUILD_COMPILER "gcc " __VERSION__
252-
#elif defined(__IBMCPP__)
253-
#define HOTSPOT_BUILD_COMPILER "xlC " XSTR(__IBMCPP__)
254-
255252
#else
256253
#define HOTSPOT_BUILD_COMPILER "unknown compiler"
257254
#endif

src/hotspot/share/utilities/globalDefinitions_xlc.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@
5151

5252
#include <stdint.h>
5353

54-
// __IBMCPP__ is not defined any more with xlclang++
55-
#ifdef __IBMCPP__
56-
#if __IBMCPP__ < 1200
57-
#error "xlc < 12 not supported"
58-
#endif
54+
// check for xlc16 or higher
55+
#ifdef __ibmxl_version__
56+
#if __ibmxl_version__ < 16
57+
#error "xlc < 16 not supported"
58+
#endif
59+
#else
60+
#error "xlc < 16 not supported, macro __ibmxl_version__ not found"
5961
#endif
6062

6163
#ifndef _AIX

0 commit comments

Comments
 (0)