[PATCH] D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux

John Paul Adrian Glaubitz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 29 14:39:56 PST 2018


glaubitz added a comment.

In D55326#1342412 <https://reviews.llvm.org/D55326#1342412>, @nemanjai wrote:

> A couple of questions since I am not all that familiar with clang and am certainly not familiar with this unusual SUSE 32-bit situation:
>
> - We seem to be changing the set of aliases here, but what happens if someone actually explicitly specifies `--target=powerpc-suse-linux`?


This is just the name of GCCDIST that is adjusted.

> - Do we need to change anything about include paths?

No.

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 #



> - Can you describe the default triple for clang on SUSE 32-bit PPC? Will it be `powerpc-suse-linux`? `powerpc64-suse-linux`?

I have to verify this.

> - 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?

No. There are separate compiler packages for ppc64 and ppc.

> - 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.

On a sidenote, the spec file for gcc8 in openSUSE has:

  %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
  %ifarch ppc
  %define GCCDIST powerpc64-suse-linux
  %else
  %ifarch %sparc
  %define GCCDIST sparc64-suse-linux
  %else
  %ifarch %arm
  %define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
  %else
  %define GCCDIST %{HOST_ARCH}-suse-linux
  %endif
  %endif
  %endif

See: https://build.opensuse.org/package/view_file/devel:gcc/gcc8/gcc8.spec?expand=1

So, it's explicitly overriding GCCDIST on ppc to be powerpc64-suse-linux.


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