Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to ensure compatibility with OpenXL and xlC on AIX #7561

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

midronij
Copy link
Contributor

Modify compiler flags, macros, and linked libraries to ensure that OMR can be built with both OpenXL and xlC on AIX.

Updated version of #7447 and #7480

@midronij
Copy link
Contributor Author

@zl-wang here is the new OpenXL PR for OMR. Marked as a WIP since I'm still addressing the remaining review comments from Ishita's PRs

@midronij
Copy link
Contributor Author

I've just finished addressing the review comments from the previous version of this PR. @keithc-ca @zl-wang when you have a moment could you take a look to ensure that I didn't miss anything/provide any further feedback?

cmake/modules/OmrDetectSystemInformation.cmake Outdated Show resolved Hide resolved
cmake/modules/platform/toolcfg/gnu.cmake Show resolved Hide resolved
compiler/control/OptimizationPlan.hpp Outdated Show resolved Hide resolved
compiler/cs2/bitmanip.h Outdated Show resolved Hide resolved
compiler/infra/Bit.hpp Outdated Show resolved Hide resolved
compiler/runtime/Runtime.cpp Outdated Show resolved Hide resolved
include_core/AtomicSupport.hpp Outdated Show resolved Hide resolved
port/unix/omrsignal.c Outdated Show resolved Hide resolved
util/omrutil/gettimebase.c Outdated Show resolved Hide resolved
configure Outdated
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
if [ "$OMR_ENV_OPENXL" == "1" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be derived from configure.ac (which is not modified by this change).
How would OMR_ENV_OPENXL be defined? (Hint: it's not from OmrDetectSystemInformation.cmake).

Copy link
Contributor Author

@midronij midronij Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the solution you have in mind, but I opted to replace the check on OMR_ENV_OPENXL with the following condition:

if [[ "$CC" =~ 'ibm-clang' ]] && [[ "$CXX" =~ 'ibm-clang' ]]; then

since CC and CXX are both used in configure.ac, and when OpenXL being used, they should be set to the following:

* C Compiler:     Version 17.0.6 (at /opt/IBM/openxlC/17.1.2/bin/ibm-clang_r)
* C++ Compiler:   Version 17.0.6 (at /opt/IBM/openxlC/17.1.2/bin/ibm-clang++_r)

Is this a viable alternative?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

watch out for possible conflict with zOS using wyvern compiler:

  1. do they have the same names?
  2. if yes, can they use whatever under that condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zOS installation of OpenXL does indeed use the same name. And I don't think there's anything under that condition that's incompatible with zOS, but I will test that out before we proceed just to make sure.

@midronij midronij force-pushed the openxl-final branch 3 times, most recently from c1a8ebd to d3634f0 Compare December 3, 2024 16:15
@midronij midronij changed the title WIP: Modifications to ensure compatibility with OpenXL and xlC on AIX Modifications to ensure compatibility with OpenXL and xlC on AIX Dec 3, 2024
Copy link
Contributor

@dsouzai dsouzai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks fine to me; just had some questions and minor suggestions.

cmake/modules/platform/toolcfg/gnu.cmake Outdated Show resolved Hide resolved
compiler/ras/DebugCounter.cpp Outdated Show resolved Hide resolved
compiler/ras/DebugCounter.cpp Outdated Show resolved Hide resolved
configure Outdated Show resolved Hide resolved
configure Outdated Show resolved Hide resolved
tools/configure Outdated Show resolved Hide resolved
Copy link
Contributor

@dsouzai dsouzai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could you squash the commits?

To ensure that OMR can be built on AIX with both OpenXL and xlC, make
modifications to compiler flags, macros, and linked libraries.

Signed-off-by: midronij <[email protected]>
Initialize nlen, tindex, and myTag in TR_PPCTableOfConstants::lookUp()
to prevent unexpected behavior when building with OpenXL on AIX.

Signed-off-by: midronij <[email protected]>
@dsouzai
Copy link
Contributor

dsouzai commented Dec 11, 2024

jenkins build all

@jdmpapin
Copy link
Contributor

Windows and z/OS builds failed due to a lack of machines. RV ran into some groovy error

Jenkins build riscv

@jdmpapin
Copy link
Contributor

The RV problem happened again, but it looks like it's been happening in other PR builds as well

@jdmpapin jdmpapin merged commit 470ed10 into eclipse-omr:master Dec 16, 2024
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants