Skip to content

Allow AIX to use openxlC as the C compiler #23476

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

Open
wants to merge 6 commits into
base: blead
Choose a base branch
from

Conversation

FractalBoy
Copy link
Contributor

@FractalBoy FractalBoy commented Jul 25, 2025

The recommended compiler for AIX is now the openxlC compiler (ibm-clang).

This PR updates AIX hints so that it can be used. Additionally, it fixes an issue with Perl's implementation of Clang TSA so that the perl_tsa_mutex_* functions are accessible to ext/re. This was required in order for AIX to build cleanly.

We also remove NEED_PTHREAD_INIT, since pthread_init doesn't exist on AIX (nor anywhere from what I can tell). https://www.ibm.com/docs/en/aix/7.3.0?topic=options-supported-interfaces

I'm also updating the AIX documentation to recommend ibm-clang_r over cc/xlc.

Addresses #23333


  • This set of changes requires a perldelta entry, and it is included.

@Leont
Copy link
Contributor

Leont commented Jul 25, 2025

I would recommend running the tests before sending an PR ;-).

  • You need to run the Porting/updateAUTHORS.pl to add yourself to the AUTHORS file.
  • You also need to run make regen and commit the results of that after editing embed.fnc.
  • And you need to reformat some verbatim sections perlaix.pod to not be too long.

@FractalBoy FractalBoy force-pushed the aix-clang branch 4 times, most recently from a8de11f to 5cdea78 Compare July 26, 2025 02:10
@FractalBoy FractalBoy force-pushed the aix-clang branch 5 times, most recently from 506d704 to cd8691b Compare July 26, 2025 04:59
@FractalBoy
Copy link
Contributor Author

Okay, should be good now.

  • I'm already in the AUTHORS file but I had some commits where the author/committer used a different email address
  • All porting.t tests are fixed
  • The original change to embed.fnc didn't work because perl_tsa_mutex_{un,}lock are already defined in perl.h. Adding it to embed.fnc without defining it in perl.h broke Windows builds. Instead, I updated perl.h so that they are always defined if USE_ITHREADS and I_PTHREAD are defined, and updated makedef.pl to ensure they are exported. This is consistent with other stuff defined in perl.h.

When PERL_TSA_ACTIVE is defined, perl_tsa_mutex_lock and perl_tsa_mutex_unlock
are required to be defined. However, they are not exported so they cannot be used
by core extensions such as re.
pthread_init is not a real function (in POSIX or AIX pthread), and
doesn't appear to have ever existed. Trying to use it causes a compiler
failure when using ibm-clang.
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.

2 participants