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
Zend/asm: adjust XCOFF asm files for AIX assembler #7579
Conversation
@NattyNarwhal Does this look fine to you? |
I tested the 64-bit files (using the AIX assembler because binutils is busted), but not the 32-bit files, because my build environment is 64-bit only. I'll try this patch and see if 64-bit changes. Relatedly, if these changes work, please upstream them to boost/context. |
Are the fiber tests working fine on your side ? I'm seeing a lot of errors in them, but I didn't have time to investigate further.
Yes, I'm planning to do that. But there is another file and I'll have to test it so it might take a bit of time. |
They were when I tested them in #7338, though now in RC4 I'm getting some inane symbol errors relating to mysql* that only occurs in the test environment and thus cause errors, so We'll See™.
I am interested in working binutils, so probably message me off this issue.
To provide a bit of context to help, I think what's wrong is (I didn't look at 32-bit, only speaking for 64-bit), the calling convention in the context code from Boost does not match (it was basically 32-bit in random places, things out of order, etc.) the system. At least with ELFv2 sharing the calling convention, what I did for 64-bit was make the AIX version match the ELF version exactly but with AIX assembler syntax. 32-bit, that may be trickier because you don't have anything to copy from (except the 64-bit version?). Of course, being that 32-bit AIX is unique, it may be not actually messed up. |
Just ran with |
@trowski how much have our versions of these files diverged already from boost ? are we comfortable merging this here before upstream ? |
Interesting. I'm rebuilding RC4 right now to check if there are still failing with our specfile. Meanwhile, I'm trying to rebuild boost and test with it. I only changed the "envelop" of asm so maybe there is something wrong within the asm code itself in 32bit. I'll check. Thus, this PR mgiht not be ready as is. When is the deadline for having merge in php 8.1.0 ? |
@krakjoe The prior changes made by @NattyNarwhal were merged upstream to boost. I'm fine merging here before boost. I'll ensure we stay in sync with boost. Looks like there's a fix for macOS + ARM upstream. I'll merge that before GA. |
FWIW, you could also take the (risky?) proposition of not building a 32-bit PHP, and we could just remove the 32-bit assembly files instead. At least in the PASE world, all binaries distributed through RPM are 64-bit now, and I don't really see the point of building a 32-bit PHP when you have to have a 64-bit CPU anyways. Of course, there might be some desire for 32-bit PHP due to libraries or what not. |
Just before GA looks acceptable to me ... it would be nice if these changes saw at least one RC. @trowski I'll leave this in your hands then, merge when ready ... |
From what I've heard some customers of IBM still need it. However, I'll discuss that with my IBM contact. If it's too time-consuming to support, it seems to be the logical approach. However, in boost, we'll want to have both anyway, as it creates libraries. |
Yeah, and if you fix Boost, you've fixed this. FWIW there is the ucontext fallback, which may be a valid approach on 32-bit. I decided to get it working on 64-bit instead. |
I've discussed with my IBM contact and we agree that 32bit can be dropped for AIX. |
bump @trowski |
So can I assume the 32-bit XCOFF assembly probably doesn't work? Maybe then we should change configure to fallback to ucontext on that platform. Unlikely to see much (any) use, but at least it would work. |
If there was an old way to provide these fibers mechanisms, I guess it should be okay to keep that. PHP 32bit is working fine for a long time, it's just that it takes too much time to port/support new features for it. So, I'm fine falling back to an previous option. |
7d305a7
to
87d44ba
Compare
I've updated boost context library including ppc32 files: boostorg/context#191. |
This doesn't seem to update the ppc32 files? |
As we said above, the support for 32bit on AIX can be dropped. There is no real need and it will ease the support of AIX for PHP, only one architecture to work on instead of two. |
Shouldn't the files be deleted in that case? I'd expect them to either be in sync with upstream or to not exist. |
I can remove them for sure. But I'm expecting that some configuration files need to be updated in order to disable the asm version of the fiber feature. |
@Helflym Looks like you pushed both 32 and 64-bit upstream, so lets update both of them here too. |
AIX assembler is a bit more strict than GNU assembler. Thus, adjust the XCOFF asm files to be able to accept both assembler.
AIX assembler is a bit more strict than GNU assembler. Thus, adjust
the XCOFF asm files to be able to accept both assembler.
Fix #81507