-
Notifications
You must be signed in to change notification settings - Fork 76
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
Be explicit about OS version #179
Conversation
via macports, allows pcre2 to build with jit support on OS X 10.4
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.
is it safe to assume you tested the fallback works for PPC?
#elif defined __APPLE__ | ||
#elif defined __APPLE__ && \ | ||
defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ && \ | ||
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 |
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.
wouldn't it be better to use the documented API for this with:
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
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.
MAC_OS_X_VERSION_10_5
is not going to be defined on 10.4, but I can compare to 1050 I guess.
I'll take a look and report back.
Yes, I've been building on a G5. |
Is this patch ok for landing? I have no mac at all. |
the use of |
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.
LGTM
did you build it both as 32bit and 64bit and run |
No, 64bit powerpc builds on Tiger is a bit of a gamble and I never bother. Rode the defaults with 32bit build. |
sljit code is fairly portable and doesn't have many dependencies, so it should build fine also in 64bit, and indeed it would be important to verify it works well for PPC with both. |
It's more the case that on Tiger, it's really the kernel which has 64-bit support, most of the provided userland is 32-bit so it just ends up with broken builds. Just for background, I ended up here because of pcre2 with jit support btw. |
PCRE2 only uses a subset of what sljit provides, for example with PowerPC, 32bit AIX is broken for sljit, but still has a working PCRE because floating point support is not needed. Note also there is a proposed change on top of yours for the portability issue that was previously discussed. |
With a latest clone of the repo, on OS X Leopard 10.5, attempting to build the "First Program" example from doc/tutorial/sljit_tutorial.html fails.
|
Running
|
Building with GCC 7.5.0 on Leopard, there's a little less noise.
|
Not sure how it worked before, but it sure needs at least #214 Running to avoid warnings breaking the build could use |
With GCC 4.2, it barfs on linking
With GCC 7
|
Ok, that means that you don't have a definition for Can you try the latest version (76b16be) of that PR? |
That compiled.
With GCC 7
Running the test binaries
|
OK, so that means (as I suspected originally) that macOS uses the same ABI than AIX and is therefore as broken at least in 32bit. The fix is in #211, if you are interested. |
I applied the patch but same tests are failing. |
Ah, |
At least, I am also wondering if it might be also needed for some of the BSD; eitherway latest version might work. |
That worked for 32-bit build using GCC 4.2 & GCC 7.5.0
Now to try the 64-bit build. |
the simplest is to run |
Doesn't work, GCC 4.2 dumps out lots of warnings about
Can't test with GCC 7.5.0 because my build is |
interesting, if you run it with running it under gdb would let you see exactly where it crashes and disassemble the instructions with |
Stepping away for the day. |
Checked out the repo on a G4 running 10.4 and with the patches from 211 & 214 PRs, sljit_test & regex_test build and pass fine using GCC 4.0.1. Previous reports were on a G5 running 10.5. |
correct, 32bit build on G4 which is a 32bit CPU.
|
It is the opposite in fact. |
via macports, allows pcre2 to build with jit support on OS X 10.4