[compiler-rt] r253703 - [PGO] Fix buildbot failure on FreeBSD (when building __x86_64__ lib)
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 30 09:27:37 PST 2015
On Wed, Dec 30, 2015 at 6:46 AM, Dimitry Andric via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> On 20 Nov 2015, at 21:28, Xinliang David Li via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> > Author: davidxl
> > Date: Fri Nov 20 14:28:38 2015
> > New Revision: 253703
> > URL: http://llvm.org/viewvc/llvm-project?rev=253703&view=rev
> > Log:
> > [PGO] Fix buildbot failure on FreeBSD (when building __x86_64__ lib)
> > There seems to be a problem in system header (stdint.h) of FreeBSD
> > where uint8_t nor uint16_t are defined. Explicitly define the key
> > types as done for FreeBSD i386.
> Strange, your commit message is about i386, but the content itself seems
> to apply to x86_64?
The message meant it was done for x86_64 which is in the similar way for
> > Modified:
> > compiler-rt/trunk/lib/profile/InstrProfiling.h
> > Modified: compiler-rt/trunk/lib/profile/InstrProfiling.h
> > URL:
> > --- compiler-rt/trunk/lib/profile/InstrProfiling.h (original)
> > +++ compiler-rt/trunk/lib/profile/InstrProfiling.h Fri Nov 20 14:28:38
> > @@ -27,6 +27,13 @@ typedef unsigned short uint16_t;
> > typedef unsigned int uint32_t;
> > typedef unsigned long long uint64_t;
> > typedef uint32_t uintptr_t;
> > +#elif defined(__FreeBSD__) && defined(__x86_64__)
> > +#define PRIu64 "lu"
> > +typedef unsigned char uint8_t;
> > +typedef unsigned short uint16_t;
> > +typedef unsigned int uint32_t;
> > +typedef unsigned long long uint64_t;
> This is incorrect. On FreeBSD x86_64, uint64_t is unsigned long. This
> causes a compilation failure of the profiling library, similar to:
> /usr/include/sys/_stdint.h:69:21: error: typedef redefinition with
> different types ('__uint64_t' (aka 'unsigned long') vs 'unsigned long long')
> For now, we should change this to unsigned long, but it would be even
> better to figure out why these hand-rolled typedefs are needed in the
> first place.
Yes, we should get rid of the customized typedefs in profile runtime for
FreeBSD as soon as possible. http://reviews.llvm.org/D15088 is a good
start, but it is probably not complete. I have cc'd you on that patch.
Please continue discussion there.
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits