Skip to content

Fix: Add -m64 linker flag for ibm-openxl on z/OS#408

Open
KiarashIBM wants to merge 1 commit into
pypa:mainfrom
KiarashIBM:64bit_issue
Open

Fix: Add -m64 linker flag for ibm-openxl on z/OS#408
KiarashIBM wants to merge 1 commit into
pypa:mainfrom
KiarashIBM:64bit_issue

Conversation

@KiarashIBM
Copy link
Copy Markdown

Problem

When using ibm-clang (without the 64 suffix) to build Python packages on z/OS, setuptools fails to build C extensions with AMODE mismatch errors. The compiler correctly adds -m64 during compilation to target 64-bit mode, but the linker was missing this flag, causing 31-bit/64-bit linking errors.

Solution

Add -m64 to the linker flags for ibm-openxl compilers in distutils/compilers/C/zos.py to match the compilation flags and ensure consistent 64-bit mode throughout the build process.

Testing

Tested with both ibm-clang and ibm-clang64 compilers on z/OS. C extensions now build successfully without AMODE errors.

Fixes: Issue #407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant