<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 30, 2015 at 6:46 AM, Dimitry Andric via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 20 Nov 2015, at 21:28, Xinliang David Li via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: davidxl<br>
> Date: Fri Nov 20 14:28:38 2015<br>
> New Revision: 253703<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=253703&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=253703&view=rev</a><br>
> Log:<br>
> [PGO] Fix buildbot failure on FreeBSD (when building __x86_64__ lib)<br>
><br>
> There seems to be a problem in system header (stdint.h) of FreeBSD<br>
> where uint8_t nor uint16_t are defined.  Explicitly define the key<br>
> types as done for FreeBSD i386.<br>
<br>
</span>Strange, your commit message is about i386, but the content itself seems<br>
to apply to x86_64?<br>
<span class=""><br></span></blockquote><div><br></div><div>The message meant it was done for x86_64 which is in the similar way for i386.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
<br>
> Modified:<br>
>    compiler-rt/trunk/lib/profile/InstrProfiling.h<br>
><br>
> Modified: compiler-rt/trunk/lib/profile/InstrProfiling.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfiling.h?rev=253703&r1=253702&r2=253703&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfiling.h?rev=253703&r1=253702&r2=253703&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/lib/profile/InstrProfiling.h (original)<br>
> +++ compiler-rt/trunk/lib/profile/InstrProfiling.h Fri Nov 20 14:28:38 2015<br>
> @@ -27,6 +27,13 @@ typedef unsigned short uint16_t;<br>
> typedef unsigned int uint32_t;<br>
> typedef unsigned long long uint64_t;<br>
> typedef uint32_t uintptr_t;<br>
> +#elif defined(__FreeBSD__) && defined(__x86_64__)<br>
> +#define PRIu64 "lu"<br>
> +typedef unsigned char uint8_t;<br>
> +typedef unsigned short uint16_t;<br>
> +typedef unsigned int uint32_t;<br>
> +typedef unsigned long long uint64_t;<br>
<br>
</span>This is incorrect.  On FreeBSD x86_64, uint64_t is unsigned long.  This<br>
causes a compilation failure of the profiling library, similar to:<br>
<br>
/usr/include/sys/_stdint.h:69:21: error: typedef redefinition with different types ('__uint64_t' (aka 'unsigned long') vs 'unsigned long long')<br>
<br>
For now, we should change this to unsigned long, but it would be even<br>
better to figure out why these hand-rolled typedefs are needed in the<br>
first place.<br></blockquote><div><br></div><div><br></div><div>Yes, we should get rid of the customized typedefs in profile runtime for FreeBSD as soon as possible. <a href="http://reviews.llvm.org/D15088">http://reviews.llvm.org/D15088</a> is a good start, but it is probably not complete. I have cc'd you on that patch. Please continue discussion there.</div><div><br></div><div>thanks,</div><div><br></div><div>David</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
-Dimitry<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" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>