[clang] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 00:20:41 PDT 2024


MaskRay wrote:

> I think other folks than myself also got a similar problem, so it's not just on my machine / setup.
> 
> Should everybody set LLVM_DEFAULT_TARGET_TRIPLE with cmake instead of this patch? Sorry, not very familiar with this...
> 
> Would it be ok to apply this for now?

The inferred value is incorrect for many systems. For example, Probably all linux-musl users need to set LLVM_DEFAULT_TARGET_TRIPLE correctly, since the default guessed value isn't correct for them.

```
% grep -A1 s390x:Linux llvm/cmake/config.guess
    s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
```

Since you have access to s390x, perhaps you can test a change to `llvm/cmake/config.guess`
```
if [ "$(grep -Ei 'debian|ubuntu' /etc/lsb-release)" ]; then
   echo ${UNAME_MACHINE}-unkown-linux-gnu
else
  echo ${UNAME_MACHINE}-unkown-linux-gnu
fi
```

https://github.com/llvm/llvm-project/pull/94729


More information about the cfe-commits mailing list