This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Undef _TIME_BITS along with _FILE_OFFSET_BITS on linux
ClosedPublic

Authored by raj.khem on Dec 31 2022, 3:14 PM.

Details

Summary

On 32-bit glibc>=2.34 systems using 64bit time_t build fails because
_FILE_OFFSET_BITS is undefined here but _TIME_BITS is still set to 64

Fixes

/usr/include/features-time64.h:26:5: error: "_TIME_BITS=64 is allowed
 only with _FILE_OFFSET_BITS=64"
| #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
|     ^
| 1 error generated.

Diff Detail

Event Timeline

raj.khem created this revision.Dec 31 2022, 3:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 31 2022, 3:14 PM
Herald added subscribers: Enna1, dberris. · View Herald Transcript
raj.khem requested review of this revision.Dec 31 2022, 3:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 31 2022, 3:14 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
thesamesam accepted this revision.Jan 7 2023, 12:36 AM
This revision is now accepted and ready to land.Jan 7 2023, 12:36 AM
MaskRay accepted this revision.Feb 3 2023, 11:44 AM
MaskRay edited the summary of this revision. (Show Details)

Thanks!

MaskRay edited the summary of this revision. (Show Details)Feb 3 2023, 11:46 AM

Changed the description a bit that this is for glibc>=2.34

MaskRay retitled this revision from compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS on linux to [sanitizer] Undef _TIME_BITS along with _FILE_OFFSET_BITS on linux.Feb 3 2023, 11:48 AM
This revision was landed with ongoing or failed builds.Feb 3 2023, 11:48 AM
This revision was automatically updated to reflect the committed changes.