-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[flang] Fix building on aarch64 *BSD and musl libc after 9d8dc45d17088300e9e2086594ca581b119193c8 #125183
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
Conversation
@llvm/pr-subscribers-flang-runtime Author: Brad Smith (brad0) ChangesFull diff: https://github.com/llvm/llvm-project/pull/125183.diff 1 Files Affected:
diff --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp
index 257c71b51edb3d..344e7216cfaae8 100644
--- a/flang/runtime/exceptions.cpp
+++ b/flang/runtime/exceptions.cpp
@@ -11,7 +11,7 @@
#include "flang/Runtime/exceptions.h"
#include "terminator.h"
#include <cfenv>
-#if defined(__aarch64__) && !defined(_WIN32)
+#if defined(__aarch64__) && defined(__GLIBC__)
#include <fpu_control.h>
#elif defined(__x86_64__) && !defined(_WIN32)
#include <xmmintrin.h>
|
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.
fpu_control.h is also absent on macOS. This PR fixes the build on it.
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.
Thanks for the fix!
[There is no "request for changes". Thanks for the fix!] |
This also fixes macOS builds. Can we cherry pick this onto the release branch? Builds for all the mentioned targets are broken there at the moment. |
You already did... never mind! I didn't know there was a different way to do it except for the cherry-pick command 👍 |
That is the way of doing things. But I opened another issue under the milestone and then did a cherry-pick. |
The fpu_control.h header appears to be GLIBC specific.