[all-commits] [llvm/llvm-project] a468d1: cmake: Enable 64bit off_t on 32bit glibc systems

Joe Loser via All-commits all-commits at lists.llvm.org
Sun Feb 5 12:15:57 PST 2023


  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: a468d1914de53d436ffe51c7889e13f08ff25971
      https://github.com/llvm/llvm-project/commit/a468d1914de53d436ffe51c7889e13f08ff25971
  Author: Khem Raj <raj.khem at gmail.com>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M llvm/cmake/config-ix.cmake
    M llvm/include/llvm/Config/config.h.cmake
    M llvm/lib/Support/raw_ostream.cpp
    M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
    M utils/bazel/llvm_configs/config.h.cmake

  Log Message:
  -----------
  cmake: Enable 64bit off_t on 32bit glibc systems

Pass -D_FILE_OFFSET_BITS=64 to compiler flags on 32bit glibc based
systems. This will make sure that 64bit versions of LFS functions are
used e.g. seek will behave same as lseek64. Also revert [1] partially
because this added a cmake test to detect lseek64 but then forgot to
pass the needed macro to actual compile, this test was incomplete too
since libc implementations like musl has 64bit off_t by default on 32bit
systems and does not bundle[2] -D_LARGEFILE64_SOURCE under -D_GNU_SOURCE
like glibc, which means the compile now fails on musl because the cmake
check passes but we do not have _LARGEFILE64_SOURCE defined. Using the
*64 function was transitional anyways so use -D_FILE_OFFSET_BITS=64
instead

[1] https://github.com/llvm/llvm-project/commit/8db7e5e4eed4c4e697dc3164f2c9351d8c3e942b
[2] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D139752

(cherry picked from commit 5cd554303ead0f8891eee3cd6d25cb07f5a7bf67)


  Commit: affa0c3072f7f275df1df29582add5a1d1779151
      https://github.com/llvm/llvm-project/commit/affa0c3072f7f275df1df29582add5a1d1779151
  Author: Jonathan Peyton <jonathan.l.peyton at intel.com>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M openmp/runtime/cmake/config-ix.cmake
    M openmp/runtime/src/exports_test_so.txt

  Log Message:
  -----------
  [OpenMP][libomp] Fix CMake version symbol testing

Do not check for version symbol support if the necessary linker flag is
not supported.

Differential Revision: https://reviews.llvm.org/D143200

(cherry picked from commit c32022ad260aa1e6f485c5a6820fa9973f3b108e)


  Commit: 3a3d9731b29096fd66d406b7f1808fa87b4d8a9c
      https://github.com/llvm/llvm-project/commit/3a3d9731b29096fd66d406b7f1808fa87b4d8a9c
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M clang/lib/CodeGen/TargetInfo.cpp
    A clang/test/CodeGen/SystemZ/vec-abi-gnuattr-03b.c
    A clang/test/CodeGen/SystemZ/vec-abi-gnuattr-08b.c
    A clang/test/CodeGen/SystemZ/vec-abi-gnuattr-09b.c
    A clang/test/CodeGen/SystemZ/vec-abi-gnuattr-17b.c
    M clang/test/CodeGen/SystemZ/vec-abi-gnuattr-24.c

  Log Message:
  -----------
  [SystemZ] Fix handling of vectors and their exposure of the vector ABI.

- Global vector variables expose the vector ABI through their alignments only
  if they are >=16 bytes in size.

- Vectors passed between functions expose the vector ABI only if they are
  <=16 bytes in size.

LLVM test suite builds with gcc/clang now give the same gnu attributes emitted.

Reviewed By: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D141409

(cherry picked from commit 0eff46f87f16772f93bdc584865e945162aff170)


  Commit: 06af31a87296a128ac660235ec2a5c66a63b0d70
      https://github.com/llvm/llvm-project/commit/06af31a87296a128ac660235ec2a5c66a63b0d70
  Author: eopXD <yueh.ting.chen at gmail.com>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M clang/lib/Basic/Targets/RISCV.cpp
    M clang/test/Preprocessor/riscv-target-features.c

  Log Message:
  -----------
  [Clang][RISCV] Bump rvv intrinsics version to v0.11

The LLVM now supports v0.11 of the RVV intrinsics. Users can use the macro
`riscv_v_intrinsic` to distinguish what kind of intrinsics is supported in
the compiler.

Please refer to tag descriptions under

https://github.com/riscv-non-isa/rvv-intrinsic-doc/tags

Reviewed By: kito-cheng, asb

Differential Revision: https://reviews.llvm.org/D143051

(cherry picked from commit e685bde1e0b0dcfeb1619b434a5dce3c755b9631)


  Commit: ccc916a82734d59a6aad625e928835e333bf9b19
      https://github.com/llvm/llvm-project/commit/ccc916a82734d59a6aad625e928835e333bf9b19
  Author: Sam James <sam at gentoo.org>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M compiler-rt/test/lit.common.cfg.py

  Log Message:
  -----------
  [compiler-rt] Disable default config files for tests

Without this, if hardening measures like FORTIFY_SOURCE are are in
/etc/clang/*.cfg, many sanitizer tests will die before the sanitizer
can trap the problem being tested, because e.g. the _chk variants
of common functions will abort first.

This gets the number of failing tests down from 42->3 for me (and the
remaining 3 are unrelated).

See: 52ce6776cf98e993c6ec04ae54b52e1354fff917
See: 136f77805fd89cd30e69b3d1204fbf7efedd9a12
Closes: https://github.com/llvm/llvm-project/issues/60394

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D143322

(cherry picked from commit 8ab762557fb057af1a3015211ee116a975027e78)


  Commit: 60df88fd9d1733811f2f5b82b797ab6f2324634a
      https://github.com/llvm/llvm-project/commit/60df88fd9d1733811f2f5b82b797ab6f2324634a
  Author: Sam James <sam at gentoo.org>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M compiler-rt/test/lit.common.cfg.py

  Log Message:
  -----------
  [compiler-rt] Fix FORTIFY_SOURCE -> _FORTIFY_SOURCE reference (NFC)

As pointed out by maskray.

Fixes: 8ab762557fb057af1a3015211ee116a975027e78
(cherry picked from commit ca50897a763c7dd0ec7c9b3ec003eeca802c5525)


  Commit: 673bf4fb39c837f8cc3eb76687446ff90602de8a
      https://github.com/llvm/llvm-project/commit/673bf4fb39c837f8cc3eb76687446ff90602de8a
  Author: Tom Honermann <tom at honermann.net>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M libcxx/include/__config
    M libcxx/test/std/strings/c.strings/no_c8rtomb_mbrtoc8.verify.cpp

  Log Message:
  -----------
  [libc++] Remove use of internal glibc macros to determine if c8rtomb() and mbrtoc8() are present.

When support for declaring the c8rtomb() and mbrtoc8() functions within the
std namespace was added in commit 7e7013c5d4b1b3996c8dba668c5a94bb33b2999b,
internal glibc macros were used to determine if C2X extensions are enabled.
Specifically, a check for whether `__GLIBC_USE` is defined and whether
`__GLIBC_USE(ISOC2X)` is non-0 was added. `__GLIBC_USE` is an internal
detail of the glibc implementation that may be changed or removed in the
future potentially leading to inconsistency or compilation failures.  This
change removes the use of the internal glibc macro to avoid such problems.
Unfortunately, without another mechanism to determine if C2X extensions are
enabled, this removal will result in inconsistent declarations of the
c8rtomb() and mbrtoc8() functions; when C++ char8_t support is not enabled, but
C2X extensions are, these functions will be declared in the global namespace
but not in the std namespace. This situation will improve when C23 support
is finalized and the check can be re-implemented using `__STDC_VERSION__`.

(cherry picked from commit cf93a3dd512e4912181f05790992c760378c8893)


  Commit: 66c1717f496d34fa248080f845c09e8ac8ce5b15
      https://github.com/llvm/llvm-project/commit/66c1717f496d34fa248080f845c09e8ac8ce5b15
  Author: Joe Loser <joeloser at fastmail.com>
  Date:   2023-02-05 (Sun, 05 Feb 2023)

  Changed paths:
    M clang/lib/Basic/Targets/X86.cpp
    M clang/lib/Headers/immintrin.h
    M clang/test/Preprocessor/predefined-arch-macros.c
    M clang/test/Preprocessor/x86_amx_target_features.c
    M clang/test/Preprocessor/x86_target_features.c

  Log Message:
  -----------
  [clang] Change AMX macros to match names from GCC

The current behavior for AMX macros is:

```
gcc -march=native -dM -E - < /dev/null | grep TILE

clang -march=native -dM -E - < /dev/null | grep TILE
```

which is not ideal.  Change `__AMXTILE__` and friends to `__AMX_TILE__` (i.e.
have an underscore in them).  This makes GCC and Clang agree on the naming of
these AMX macros to simplify downstream user code.

Fix this for `__AMXTILE__`, `__AMX_INT8__`, `__AMX_BF16__`, and `__AMX_FP16__`.

Differential Revision: https://reviews.llvm.org/D143094

(cherry picked from commit 8998fa6c14f1e19957858aa0e4b592d62ae56041)


Compare: https://github.com/llvm/llvm-project/compare/2ed18bf1a05e...66c1717f496d


More information about the All-commits mailing list