[PATCH] D85309: [WIP][clang][Driver] Support GNU ld on Solaris

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 19:08:28 PDT 2020


MaskRay added a comment.

Please find a suitable test file (clang/test/Driver/solaris-*.c) and add some tests there (for example, solaris-ld.c)
The challenge is that CLANG_ENABLE_GLD is not a default configuration, so leaving out tests may be fine.



================
Comment at: clang/CMakeLists.txt:281
 
+option(CLANG_ENABLE_GLD "Default to GNU ld." OFF)
+
----------------
Mention SOLARIS in the variable name? Users on other OSes don't need to read the description of this variable.

It will also make the abbreviation `GLD` more legitimate. GLD isn't a well-recognized abbreviation for GNU ld.


================
Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:252
+  // FIXME: Hack around /usr/gnu/bin/ld being configure with --with-sysroot.
+  return "/vol/gcc/bin/gld-2.35";
+  //return "/usr/gnu/bin/ld";
----------------
The hard-coded version doesn't sound great.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85309/new/

https://reviews.llvm.org/D85309



More information about the cfe-commits mailing list