Getting clang/llvm to use crle paths on Solaris?

546 views Asked by At

I'm trying to configure an OpenIndiana build machine, and I'm new in general to the (not-so-) subtle differences in how (Open)(Solaris|Indiana) treat the build process. While I now understand that on Solaris, the default even when running on a 64-bit kernel is to build applications as m32, unless -m64 is explicitly provided; I cannot seem to properly configure default search paths for clang, though gcc is working just fine and dandy.

I installed both llvm and gcc via pkg, nothing had to be manually compiled.

Compiling a basic C file with gcc works fine in both the default (-m32) and the 64-bit -m64 configurations, correctly using the search paths as set in crle:

mqudsi@openindiana:~/random$ crle

Default configuration file (/var/ld/ld.config) not found
  Platform:     32-bit LSB 80386
  Default Library Path (ELF):   /lib:/usr/lib  (system default)
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)
mqudsi@openindiana:~/random$ crle -64

Default configuration file (/var/ld/64/ld.config) not found
  Platform:     64-bit LSB AMD64
  Default Library Path (ELF):   /lib/64:/usr/lib/64  (system default)
  Trusted Directories (ELF):    /lib/secure/64:/usr/lib/secure/64  (system default)

However, clang seems to be oblivious to the system configuration, and is requiring me to manually set -L .... when compiling. Globally setting LD_LIBRARY_PATH fails because clang itself is 32-bit when trying to compile a 64-bit binary with it.

How can I get clang to respect the Solaris crle configuration in the same way that gcc does?

1

There are 1 answers

0
Anton Korobeynikov On BEST ANSWER

Well, given that clang known a little about Solaris in general, the answer is easy, unfortunately: someone should implement crle support in clang.