# HG changeset patch # User mbaesken # Date 1549022656 -3600 # Fri Feb 01 13:04:16 2019 +0100 # Node ID 16c352c054ee2fe9e7dcb19b423a927114f9e0d0 # Parent 230b84fa7e531f771efff0c6af39943eb0e52efe 8218136: minor hotspot adjustments for xlclang++ from xlc16 on AIX diff --git a/src/hotspot/os/aix/porting_aix.cpp b/src/hotspot/os/aix/porting_aix.cpp --- a/src/hotspot/os/aix/porting_aix.cpp +++ b/src/hotspot/os/aix/porting_aix.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 SAP SE. All rights reserved. + * Copyright (c) 2012, 2019 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,15 @@ #include "utilities/align.hpp" #include "utilities/debug.hpp" +// distinguish old xlc and xlclang++, where +// is suggested but not found +#if defined(__clang__) +#define DISABLE_DEMANGLE +// #include +#else #include +#endif + #include #include #include @@ -237,6 +245,7 @@ p_name[i] = '\0'; // If it is a C++ name, try and demangle it using the Demangle interface (see demangle.h). +#ifndef DISABLE_DEMANGLE if (demangle) { char* rest; Name* const name = Demangle(p_name, rest); @@ -249,6 +258,7 @@ delete name; } } +#endif } else { strncpy(p_name, "", namelen-1); p_name[namelen-1] = '\0'; diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -3784,8 +3784,8 @@ #endif #if defined(AIX) - UNSUPPORTED_OPTION(AllocateHeapAt); - UNSUPPORTED_OPTION(AllocateOldGenAt); + UNSUPPORTED_OPTION_NULL(AllocateHeapAt); + UNSUPPORTED_OPTION_NULL(AllocateOldGenAt); #endif #ifndef PRODUCT diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp --- a/src/hotspot/share/runtime/arguments.hpp +++ b/src/hotspot/share/runtime/arguments.hpp @@ -663,4 +663,16 @@ } \ } while(0) +// similar to UNSUPPORTED_OPTION but sets flag to NULL +#define UNSUPPORTED_OPTION_NULL(opt) \ +do { \ + if (opt) { \ + if (FLAG_IS_CMDLINE(opt)) { \ + warning("-XX flag " #opt " not supported in this VM"); \ + } \ + FLAG_SET_DEFAULT(opt, NULL); \ + } \ +} while(0) + + #endif // SHARE_RUNTIME_ARGUMENTS_HPP diff --git a/src/hotspot/share/utilities/globalDefinitions_xlc.hpp b/src/hotspot/share/utilities/globalDefinitions_xlc.hpp --- a/src/hotspot/share/utilities/globalDefinitions_xlc.hpp +++ b/src/hotspot/share/utilities/globalDefinitions_xlc.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017 SAP SE. All rights reserved. + * Copyright (c) 2012, 2019 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,11 +74,7 @@ // pointer is stored as integer value. On some platforms, sizeof(intptr_t) > // sizeof(void*), so here we want something which is integer type, but has the // same size as a pointer. -#ifdef __GNUC__ - #error XLC and __GNUC__? -#else - #define NULL_WORD NULL -#endif +#define NULL_WORD NULL // AIX also needs a 64 bit NULL to work as a null address pointer. // Most system includes on AIX would define it as an int 0 if not already defined with one