Commit Graph

8 Commits

Author SHA1 Message Date
Rainer Orth a5dc9c9835 [Driver] Don't pass --dynamic-linker to ld on Solaris
I noticed that clang currently passes --dynamic-linker to ld.  This has been the case
since Solaris 11 support was added initially back in 2012 by David Chisnall (r150580).
I couldn't find any patch submission, let alone a justification, for this, and it seems
completely useless: --dynamic-linker is a gld compatibility form of the option, the
native option being -I.  First of all, however, the dynamic linker passed is simply the
default, so there's no reason at all to specify it in the first place.

This patch removes passing the option and adjusts the affected testcase accordingly.

Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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

llvm-svn: 366202
2019-07-16 11:06:43 +00:00
Douglas Yung 1b9260baaa Fix test Driver/solaris-ld.c for Windows.
- Test needs to be able to handle "clang.exe" on Windows
- Test needs to be able to handle either '/' or '\\' used as the path separator

Reviewed by Paul Robinson

llvm-svn: 323285
2018-01-24 00:05:01 +00:00
Richard Trieu 3ec8425c0d Fix test Driver/solaris-ld.c
Allow test to accept calls to ld without full path.

llvm-svn: 323267
2018-01-23 21:58:56 +00:00
Fedor Sergeev 69ea82968a Fix Driver/solaris-ld.c test on Windows
Fixing failure introduced with r323193.

llvm-svn: 323199
2018-01-23 13:59:11 +00:00
Fedor Sergeev faa0a82416 [Solaris] gcc toolchain handling revamp
Summary:
General idea is to utilize generic (mostly Generic_GCC) code
and get rid of Solaris-specific handling as much as possible.

In particular:
- scanLibDirForGCCTripleSolaris was removed, relying on generic
  CollectLibDirsAndTriples

- findBiarchMultilibs is now properly utilized to switch between
   m32 and m64 include & lib paths on Solaris

- C system include handling copied from Linux (bar multilib hacks)

Fixes PR24606.

Reviewers: dlj, rafael, jyknight, theraven, tstellar

Reviewed By: jyknight

Subscribers: aaron.ballman, mgorny, krytarowski, ro, joerg, cfe-commits

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

llvm-svn: 323193
2018-01-23 12:23:52 +00:00
Rafael Espindola 8d4d9d2f67 [Solaris] Add -lc also when linking shared libraries
This is actually needed, otherwise libc won't be added at all. For
instance when building libclang.so all the libc symbols won't be
found, with ld warning about libc being an "implicit dependency".

Patch by Xan López!

llvm-svn: 247603
2015-09-14 19:30:53 +00:00
Yaron Keren a8dde6c83f Fix path seperator for Windows.
llvm-svn: 246520
2015-09-01 01:29:13 +00:00
Rafael Espindola c53c5b13be Stop hardcoding GCC paths in crt/ld.so lookup.
This patch refactors the code to use the GCC installation detector
(modified so that it works in Solaris), and uses
ToolChain::GetFilePath everywhere once it works.

Patch by Xan López <xan@igalia.com>!

llvm-svn: 246473
2015-08-31 19:17:51 +00:00