[PATCH] D13935: [minisat] Include the fpu_control.h header only when the __GLIBC__ macro is defined.

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 11:05:36 PST 2015


Hi James,

I didn't see your comment in phabricator and I accidentally committed this. Do you want me to revert it?

I was going to say that we use LNT in order to run the LLVM test-suite, and given that CMake isn't supported at the moment, I'd like to have it committed.

Also, I'd like to use CMake with LNT and it's my intention to send any patch that'll allows us to do that with Musl, when the relevant review requests land.

Thanks,
Vasileios

________________________________
From: James Molloy [james at jamesmolloy.co.uk]
Sent: 10 November 2015 15:15
To: reviews+D13935+public+6985f52afb85db86 at reviews.llvm.org; Daniel Sanders; Vasileios Kalintiris
Cc: llvm-commits at lists.llvm.org
Subject: Re: [PATCH] D13935: [minisat] Include the fpu_control.h header only when the __GLIBC__ macro is defined.

Hi,

I'd prefer if we used CMake to check for the existence of the fpu_control.h header - we have a proper configure system now, let's use it!

#if defined(__GLIBC__) || HAVE_FPU_CONTROL_H , or something?

Cheers,

James

On Tue, 10 Nov 2015 at 14:46 Daniel Sanders via llvm-commits <llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>> wrote:
dsanders added a subscriber: dsanders.
dsanders accepted this revision.
dsanders added a reviewer: dsanders.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM with a (possibly unnecessary) nit


================
Comment at: MultiSource/Applications/minisat/Main.cpp:79
@@ -78,3 +78,3 @@

-#if defined(__linux__)
+#if defined(__GLIBC__)
 #include <fpu_control.h>
----------------
You're probably correct here but I don't know much about the non-linux targets that glibc supports (e.g. Hurd). I'd err on the side of caution and test for both `__linux__` and `__GLIBC__`.


http://reviews.llvm.org/D13935



_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151110/b8c57d30/attachment.html>


More information about the llvm-commits mailing list