[PATCH] D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 10 07:52:59 PDT 2019
aaronpuchert added a comment.
Herald added subscribers: shchenz, wuzish.
Sorry for warming this up again, but it would be nice to get rid of this patch in openSUSE.
In D55326#1342412 <https://reviews.llvm.org/D55326#1342412>, @nemanjai wrote:
> - Will this change not affect 64-bit PPC SUSE? Namely will the default libraries on actual 64-bit PPC SUSE big endian systems now be 32-bit libraries?
So I've had a look at the gcc packages on PowerPC <https://build.opensuse.org/package/binaries/devel:gcc/gcc9/openSUSE_Factory_PPC> and where they put their stuff.
| | on `ppc` | on `ppc64` |
| 32-bit gcc | `gcc9` uses `/usr/lib/gcc/powerpc64-suse-linux/9/` | `gcc9-32bit` uses `/usr/lib64/gcc/powerpc64-suse-linux/9/32/` |
| 64-bit gcc | `gcc9-64bit` uses `/usr/lib/gcc/powerpc64-suse-linux/9/64/` | `gcc9` uses `/usr/lib64/gcc/powerpc64-suse-linux/9/` |
|
For comparison, on x86:
| | on `i586` | on `x86_64` |
| 32-bit gcc | `gcc9` uses `/usr/lib/gcc/i586-suse-linux/9/` | `gcc9-32bit` uses `/usr/lib64/gcc/x86_64-suse-linux/9/32/` |
| 64-bit gcc | not available | `gcc9` uses `/usr/lib64/gcc/x86_64-suse-linux/9/` |
|
So on x86 we do indeed have different triples, but there is no conflict between 32-bit and 64-bit default libraries either way, because the alternative arch always sits in a subdirectory.
In D55326#1320180 <https://reviews.llvm.org/D55326#1320180>, @glaubitz wrote:
> I'm not sure whether anyone will ever start a SUSE derivative for 32-bit PowerPC.
There is no such image <https://download.opensuse.org/ports/ppc/tumbleweed/iso/> currently, and the repositories are empty <https://download.opensuse.org/ports/ppc/tumbleweed/repo/oss/ppc/>, so given the waning popularity of 32-bit PowerPC that's a valid assumption, I guess. I think that 32-bit binaries are only built to be available on 64-bit systems.
In D55326#1342431 <https://reviews.llvm.org/D55326#1342431>, @glaubitz wrote:
> On an openSUSE machine on ppc, we have:
>
> :/usr # ls -l /usr/lib/gcc/
> total 0
> drwxr-xr-x 3 root root 15 Nov 19 23:27 powerpc64-suse-linux
> :/usr # ls -dl /usr/power*
> drwxr-xr-x 5 root root 43 May 25 2018 /usr/powerpc-suse-linux
> :/usr #
>
This one is a bit weird, why `/usr/powerpc-suse-linux` suddenly? And is that going to be a problem?
I see that packages that use Clang compile fine on ppc, e.g. include-what-you-use <https://build.opensuse.org/package/show/devel:tools:compiler/include-what-you-use>, but I'm still wondering why this works.
>> - Can you please add a test case and a patch with full context before this patch can go any further?
>
> Not sure what the proper test would be.
I guess something like the test for D32347 <https://reviews.llvm.org/D32347>: add a mock directory tree, and test that everything is set up correctly.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55326/new/
https://reviews.llvm.org/D55326
More information about the cfe-commits
mailing list