This is an archive of the discontinued LLVM Phabricator instance.

cmake: set _LARGEFILE_SOURCE=1 to fix a cmake error
ClosedPublic

Authored by sylvestre.ledru on Jul 16 2023, 2:07 PM.

Details

Summary
-- Performing additional configure checks with target flags: -mips32r2;-mabi=32;-D_LARGEFILE_SOURCE;-D_FILE_OFFSET_BITS=64
-- Performing Test COMPILER_RT_HAS_mips_FLOAT16
CMake Error: Parse error in command line argument: _LARGEFILE_SOURCE
 Should be: VAR:type=value

See: https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-16&arch=mips64el&ver=1%3A16.0.6-4&stamp=1689111818&raw=0

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2023, 2:07 PM
sylvestre.ledru requested review of this revision.Jul 16 2023, 2:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2023, 2:07 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
MaskRay accepted this revision.Jul 16 2023, 4:20 PM

-D_LARGEFILE_SOURCE was from the commit 7684d05d95b9369fa0454b525093ed04ee91b1e1 (May 2019). I assume that it used to work, but some changes to test_target_arch made it break?

Anyway, since -D_LARGEFILE_SOURCE=1 (less common) is identical to -D_LARGEFILE_SOURCE (more common), this should be fine.

This revision is now accepted and ready to land.Jul 16 2023, 4:20 PM