-
Notifications
You must be signed in to change notification settings - Fork 737
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
Adding libs for OpenXL #20045
Adding libs for OpenXL #20045
Conversation
Two high-level comments:
|
please indicate if it cleared the criteria that, with these changes in place, we can build with both xlC/xlclang and OpenXL (also staying or better the performance). that is when it is ready to be reviewed. |
did I miss your changes to makefiles, to set CC and CXX? at least, i haven't seen them yet. |
I tried a build with the OMR (eclipse-omr/omr#7447) and these OpenJ9 changes. It got this far:
|
defaults.yml should be updated similarly to https://github.ibm.com/Peter-Shipton/tooling/commit/eebd2986b8a3b It won't work on any OpenJ9 open machine until we update them to have the 17.1.2 compiler. |
Yes there was an issue. I have fixed that.will push the modification shortly. |
@@ -34,7 +34,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex | |||
<makefilestub data="CFLAGS += -Wc,DLL,EXPORTALL"> | |||
<include-if condition="spec.zos_390.*"/> | |||
</makefilestub> | |||
<makefilestub data="UMA_CC_MODE += -qpic -brtl -bexpall"> | |||
<makefilestub data="UMA_CC_MODE += -fpic -brtl -bexpall"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't be changed unconditionally.
FYI module.xml (UMA) is mostly used for IBM Java 8 builds, but it's still (was) possible use UMA to build OpenJ9 versions, It's something we should check, if UMA is still working for Java 23 with OpenXL. By default we use cmake, but UMA can be used if adding options for debugging purposes.
e426cf2
to
121bd27
Compare
@@ -64,7 +64,7 @@ | |||
#endif /* defined(J9VM_OPT_JITSERVER) */ | |||
|
|||
// TODO: move this someplace common for RuntimeAssumptions.cpp and here | |||
#if defined(__IBMCPP__) && !defined(AIXPPC) && !defined(LINUXPPC) | |||
#if (defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)) && !defined(AIXPPC) && !defined(LINUXPPC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subexpression defined(__cplusplus)
seems redundant in this C++ source file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it in new commit
@@ -178,7 +203,9 @@ $(patsubst %.s,%.o,$(filter %.s,$(UMA_FILES_TO_PREPROCESS))) : %$(UMA_DOT_O) : % | |||
|
|||
ifdef UMA_TREAT_WARNINGS_AS_ERRORS | |||
ifndef UMA_SUPPRESS_WARNINGS_AS_ERRORS | |||
CFLAGS += -qhalt=w | |||
CXXFLAGS += -qhalt=w | |||
ifneq ($(OMR_ENV_OPENXL),1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please invert and add equivalent options for OpenXL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inverted
Tried a new build https://hyc-runtimes-jenkins.swg-devops.com/job/Build_JDK23_ppc64_aix_Personal/52
|
0a882d4
to
60ce5cd
Compare
@@ -0,0 +1,3 @@ | |||
#if defined(__open_xl__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs a copyright notice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current year should be used in the copyright notice for new files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed year to 2024
9ddb7f3
to
795bb55
Compare
runtime/compiler/runtime/asmprotos.h
Outdated
@@ -28,7 +28,7 @@ extern "C" { | |||
#endif | |||
|
|||
|
|||
#if (defined(__IBMCPP__) || defined(__IBMC__) && !defined(MVS)) && !defined(J9ZOS390) && !defined(LINUXPPC64) | |||
#if (defined(__IBMCPP__) || defined(__IBMC__) && !defined(MVS)) && !defined(J9ZOS390) && !defined(LINUXPPC64) || defined(__open_xl__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks weird, given the fact that && has higher precedence over ||. it seems dangerous or unreadable to mix up compiler macro (__open_xl__
) with platform macro (J9ZOS390 and LINUXPPC64).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it should be __MVS__
and with the fix Julian suggests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the MVS issue is not introduced by the changes of this PR I will address this in future creating a new PR.
runtime/j9vm/jvm.c
Outdated
@@ -4399,7 +4399,7 @@ JVM_Available(jint descriptor, jlong* bytes) | |||
return JNI_FALSE; | |||
} | |||
|
|||
#if defined(WIN32) && !defined(__IBMC__) | |||
#if defined(WIN32) && !defined(__IBMC__) && !(defined(__open_xl__) && !defined(__cplusplus)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering why we need to do this to begin with. WIN32 definition already excludes the code from being picked up on AIX or zOS, what is the purpose of && with more other conditions?
@@ -96,7 +96,7 @@ extern "C" { | |||
# endif | |||
# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */ | |||
# ifndef __PPC64__ | |||
# if defined (__IBMC__) || defined (__IBMCPP__) | |||
# if defined (__IBMC__) || defined (__IBMCPP__) || defined(__open_xl__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the above dozen ffi.h files on non-AIX platforms, do we really need to change this line of code, especially since it is under# ifdef _AIX
to begin with. in other words, how changing or not-changing this code affect the builds on non-AIX platforms?
CFLAGS += -std=c89 -qarch=ppc -fno-strict-aliasing -fstack-protector | ||
else | ||
CFLAGS += -qlanglvl=extended -qarch=ppc -qalias=noansi -qxflag=LTOL:LTOL0 -qsuppress=1506-1108 -qstackprotect | ||
endif | ||
CFLAGS += -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE -DRS6000 -DAIXPPC -D_LARGE_FILES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take notice maybe: we need to revisit this flag setting in the future ... -qarch=ppc is pretty out of date and conservative.
Signed-off-by: midronij <[email protected]>
Signed-off-by: midronij <[email protected]>
Signed-off-by: midronij <[email protected]>
Signed-off-by: Ishita Ray <[email protected]>
Add CMAKE_C_COMPILER_IS_OPENXL macro to add the compiler flags needed by openXL17 Signed-off-by: Ishita Ray <[email protected]>
runtime/j9vm/jvm.c
Outdated
@@ -4542,7 +4542,7 @@ JVM_Lseek(jint descriptor, jlong bytesToSeek, jint origin) | |||
} | |||
|
|||
#if defined(WIN32) | |||
#ifdef __IBMC__ | |||
#if defined(__IBMC__) || defined(__open_xl__) && !defined(__cplusplus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would require parentheses if __cplusplus
needed to be tested, but it doesn't:
#if defined(__IBMC__) || defined(__open_xl__)
The condition should be repeated (in a comment) on #else
and #endif
lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
@@ -4642,7 +4642,7 @@ JVM_Open(const char* filename, jint flags, jint mode) | |||
#define JVM_EEXIST -100 | |||
|
|||
#ifdef WIN32 | |||
#ifdef __IBMC__ | |||
#if defined(__IBMC__) || defined(__open_xl__) && !defined(__cplusplus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove redundant uses of defined(__cplusplus)
throughout.
@@ -96,7 +96,7 @@ extern "C" { | |||
# endif | |||
# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */ | |||
# ifndef __PPC64__ | |||
# if defined (__IBMC__) || defined (__IBMCPP__) | |||
# if defined (__IBMC__) || defined (__IBMCPP__) || defined(__open_xl__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert changes such as this (where Open XL can't apply).
else | ||
# xlc++ options | ||
CXXFLAGS += -q mbcs -qinfo=pro | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not legal (only one else
is allowed).
if(DEFINED OMR_OS_AIX AND DEFINED CMAKE_C_COMPILER_IS_OPENXL) | ||
target_link_libraries(j9vrb | ||
PRIVATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do this. If libraries are need by any compiler, they should be used for all.
The description is incomplete. This isn't just about libraries - many command-line options are adjusted and source is changed. Please follow the commit guidelines at https://github.com/eclipse-omr/omr/blob/master/CONTRIBUTING.md#commit-guidelines (the commit summary and the headline here should be "written in the imperative mood"). |
Signed-off-by: midronij <[email protected]>
No description provided.