[all-commits] [llvm/llvm-project] 77e086: [Driver] Always use gas with -fno-integrated-as on...

Rainer Orth via All-commits all-commits at lists.llvm.org
Thu Sep 7 02:26:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77e0863e3902c0f8ea6acafdcc26c787018471f0
      https://github.com/llvm/llvm-project/commit/77e0863e3902c0f8ea6acafdcc26c787018471f0
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/lib/Driver/ToolChains/Solaris.cpp
    M clang/lib/Driver/ToolChains/Solaris.h
    M clang/test/Driver/compress-noias.c
    A clang/test/Driver/solaris-as.c

  Log Message:
  -----------
  [Driver] Always use gas with -fno-integrated-as on Solaris (#65489)

`clang -fno-integrated-as` doesn't currently work on Solaris: it doesn't
even select between 32 and 64-bit objects. Besides, Solaris has both the
native assembler (`/usr/bin/as`) and the GNU assembler (`/usr/bin/gas`
resp. `/usr/gnu/bin/as`). The native sparc and x86 assemblers aren't
compatible with `clang`'s assembler syntax to varying degrees, and the
command line options for `as` and `gas` are completely different.

Therefore this patch chooses to always use `gas` on Solaris, using
`gnutools::Assembler::ConstructJob` to pass the correct options.

Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.




More information about the All-commits mailing list