Add support for z/OS compilers; Fixes #215 #216
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to fix all issues mentioned in #215 as minimally as possible - I tried to isolate all z/OS changes to not cause any breakage for all other platforms. This change adds support for building C/C++ packages with distutils using the following compilers:
IBM C/C++ For Open Enterprise Languages on z/OS 2.0
IBM Open XL C/C++ 1.1 for z/OS
IBM XL C/C++ V2.4.1 for z/OS 2.4 and 2.5
IBM z/OS XL C/C++
The way this change works is that cpython on z/OS is built with CFLAGS that are compatible between the compilers, with the rest being in CFLAGS_NODIST. Then the compiler the user is using can be determined in distutils (checking CC/CXX/LDSHARED, or just the default), and the appropriate flags for that compiler can be added. For requiring the side deck, this is common between all compilers so no compiler specific option was used here.
Currently I cannot run the full distutils/setuptools test suite on z/OS due to there being rust dependencies in some of the packages being used to test and there is no rust compiler on z/OS. So I did the following to verify that the changes are correct: