[all-commits] [llvm/llvm-project] 0cbf00: [PowerPC] Fix check for ieeelongdouble support

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Oct 27 01:36:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0cbf003c78cdba5cc81b69ee4cd6cee53f2e2796
      https://github.com/llvm/llvm-project/commit/0cbf003c78cdba5cc81b69ee4cd6cee53f2e2796
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/lib/Driver/ToolChains/PPCLinux.cpp
    R clang/test/Driver/Inputs/powerpc64le-linux-gnu-tree/gcc-11.2.0/lib/gcc/powerpc64le-linux-gnu/11.2.0/.keep
    A clang/test/Driver/Inputs/powerpc64le-linux-gnu-tree/gcc-11.2.0/lib/gcc/powerpc64le-linux-gnu/11.2.0/crtbegin.o
    A clang/test/Driver/Inputs/powerpc64le-linux-gnu-tree/gcc-12/lib/gcc/powerpc64le-linux-gnu/12/crtbegin.o
    A clang/test/Driver/Inputs/powerpc64le-linux-gnu-tree/gcc-12/lib64/ld64.so.2
    M clang/test/Driver/ppc-float-abi-warning.cpp

  Log Message:
  -----------
  [PowerPC] Fix check for ieeelongdouble support

Clang detects the GCC version from the libdir. However, modern
GCC versions only include the major version in the libdir
(something like lib/gcc/powerpc64le-linux-gnu/12/), not all
version components. For this reason, even though the system has
a supported libstdcxx, it will still fail the check against the
12.1.0 version requirement.

Fix this by doing the same thing we do for patch versions: Assume
that a missing minor version is larger than any specific version.

To allow this to be tested, we need to fix two additional issues:
First, the GCC toolchain directories used for testing need to
contain a crtbegin.o file to be properly detected. The existing
tests actually ended up using a 0.0.0 version, rather the intended
one. Second, we also need to satisfy the glibc version check based
on the dynamic linker. To do so, respect the --dyld-prefix argument
and add the necessary file to the test toolchain directory.

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




More information about the All-commits mailing list