[PATCH] D64482: [Driver] Define _FILE_OFFSET_BITS=64 on Solaris
Rainer Orth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 04:38:32 PDT 2019
ro added a comment.
In D64482#1589174 <https://reviews.llvm.org/D64482#1589174>, @MaskRay wrote:
>
>> Even if it were, this would only affect future releases. The user experience of "you need to upgrade to Solaris 11.x" or install update y to get this" seems pretty dismal to me. Besides, that ship has sailed and GCC 9 is released.
>
> Defining `_LARGEFILE_SOURCE`, `_LARGEFILE64_SOURCE` and `_FILE_OFFSET_BITS` on the compiler side is exclusively used by Solaris. Do you mean that newer Solaris versions may define these macros in the common headers and these macros can eventually be removed from compiler drivers?
No, certainly not: it has been this way in gcc since at least 2002 and is not going to change. Besides, HP-UX 10 and 11 do the same.
> If these are considered temporary hacks to make some application to compile on older Solaris versions, I think the comment should be expanded a bit.
It's not and thus going to stay.
>> Large file support is only relevant for 32-bit targets.
>
> Yes. https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/sol2.h;h=bc4f63df03bc8e0b5bceee4e52f48240de7f993d;hp=ec4b111ba0e3cdf56970073959d228fbafe8937d;hb=0f97ccfdccc033f543ccbcb220697e62e84bf01f;hpb=ee621ce77125904f7946ba6cef345cb83e48248d and the previous commits should probably restrict the scope of the hack to 32-bit only.
There's no point: `_FILE_OFFSET_BITS` has no effect when `_LP64` is defined, so such an effort would be wasted.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64482/new/
https://reviews.llvm.org/D64482
More information about the cfe-commits
mailing list