<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 5:49 AM, Olivier Hainque via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
(First time I'm sending a patch, hope I have the format and destination<br>
list etc right :)<br></blockquote><div><br></div><div>Nope. :) </div><div>Please use <a href="http://llvm.org/docs/Phabricator.html">llvm.org/docs/Phabricator.html</a></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Building a recent gcc on a powerpc-linux system advertsing:<br>
<br>
Red Hat Enterprise Linux Server release 5.10 (Tikanga)<br>
<br>
we stumbled on a compilation error on a file originating<br>
from compiler-rt/lib/sanitizer-common.<br>
<br>
sanitizer_platform_limits_linux.cc #includes asm/posix_types.h,<br>
which, on our system, uses __kernel_fd_set and associated macros.<br>
These aren't defined at the point of their use, and the compilation<br>
fails with symptoms like:<br>
<br>
In file included from ../../../../src/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:29:0:<br>
/usr/include/asm/posix_types.h:72:51: error: '__kernel_fd_set' has not been declared<br>
static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)<br>
...<br>
<br>
The attached patch is a suggestion to fix this. linux/posix_types.h defines<br>
the necessary types and macros, then #includes asm/posix_types.h.<br>
<br>
We have been using it locally for gcc without problems for a couple of years<br>
on powerpc, x86 and x86_64-linux platforms. It is still needed for gcc-6 on<br>
our powerpc host and applies cleanly on the compiler-rt trunk.<br>
<br>
Comments ?<br>
<br>
Thanks much in advance for your feedback,<br>
<br>
With Kind Regards,<br>
<br>
Olivier<br>
<br>
--<br>
<br>
* lib/sanitizer_common/sanitizer_platform_limits_linux.cc:<br>
#include <linux/posix_types.h> instead of asm/posix_types.h.<br>
<br>
<br>
<br><br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>