New Issue: Should we change the default CHPL_LIB_PIC setting?

19898, "mppf", "Should we change the default CHPL_LIB_PIC setting?", "2022-05-27T20:42:13Z"

Today, the default setting for CHPL_LIB_PIC is none. However, I've noticed (when investigating problems with LLVM 14 on Ubuntu 22.04 and problems on Arch linux) that some systems default to position-independent code, even for executables. On those systems gcc or clang from a system package will generate position-independent code by default, even if -fPIC is not provided. As a result, on those systems, when Chapel is built with CHPL_LIB_PIC=none, it will produced position-independent code (and, if it does not, there will be linker errors, which I think are due to the fact that the libraries linked are position independent and can't be compiled otherwise).

Given that, on some systems, CHPL_LIB_PIC=none produces position independent code, should we change the name of the default setting none? Or do something else to make it less confusing?

See also:

  • #19894
  • #19785