-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
make sure Julia doesn't use x87 math. #43978
Conversation
From discussion with @Keno on slack, I believe this is the reasons the tests added in #43870 are failing on linux32. (As seen in https://build.julialang.org/#/builders/17/builds/1356/steps/5/logs/stdio for example.) Not sure if `RT_LIBS` is where this should go, so I'd appreciate any feedback.
a135539
to
f2e84c7
Compare
@Keno Is this good to merge once CI is green? |
Hmm, the linux32 binaries don't seem to explicitly link against glibc anymore, but the test is still failing:
|
The issue is that the link line ends up being |
Doesn't look like that worked either. Let's just statically link openlibm. There's really no point to making it a dynamic library and it just opens us open to all kinds of dynamic linker shenanigans. |
I think the problem is |
It looks like this works! |
It looks like tester_linux32 hasn't started yet. |
oops. I looked at the package rather than the tester. |
Why isn't tester_linux_32 running? |
@DilumAluthge Could you clear the cue again? |
If you need to do more debugging after this, maybe just run the docker container locally. Get yourself some millisecond cycle time rather than hours. |
It turns out the problem wasn't the linking between Julia and libm, but just that we were compiling runtime-intrisics.c with settings that allowed it to do math in 80 bit precision which breaks stuff. |
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.
I don't seem to see any code changes resulting from this in jl_sqrt_llvm_withtype
Are you building 32bit linux? |
Also, analyzegc is sad now. |
Clang doesn't understand the option, so needs to either be made GCC specific, add |
Ready to merge? (Merging tomorrow sans objection) |
Should probably change the name, but thanks for figuring this out! |
@@ -874,6 +874,10 @@ ifneq (,$(filter $(ARCH), powerpc64le ppc64le)) | |||
DIST_ARCH:=ppc64le | |||
endif | |||
ifeq (1,$(ISX86)) | |||
# on x86 make sure not to use 80 bit math when we want 64 bit math. | |||
ifeq (32,$BINARY)) |
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.
missing a (
here
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.
x87 math? ;) |
|
* use fpmath=sse on 32 bit x86 to prevent 80 bit floats causing double rounding Co-authored-by: Oscar Smith <oscardssmith@gmail.com>
* use fpmath=sse on 32 bit x86 to prevent 80 bit floats causing double rounding Co-authored-by: Oscar Smith <oscardssmith@gmail.com>
* use fpmath=sse on 32 bit x86 to prevent 80 bit floats causing double rounding Co-authored-by: Oscar Smith <oscardssmith@gmail.com>
From discussion with @Keno on slack, I believe this is the reasons the
tests added in #43870 are failing on linux32. (As seen in
https://build.julialang.org/#/builders/17/builds/1356/steps/5/logs/stdio
for example.)
Not sure if
RT_LIBS
is where this should go, so I'd appreciate anyfeedback.