Skip to content
  • Brad King's avatar
    AIX: Do not enable runtime linking by default anymore · 3fb3157d
    Brad King authored
    We've long created shared objects on AIX using the linker's `-G` option
    (also offered by the XL front-end).  The `-G` option implies `-brtl` and
    enables runtime linking.  This has been largely unnecessary because we
    provide all dependencies on the link line and both XL and GNU compilers
    offer builtin behavior to export symbols.  Since commit 0f150b69 (AIX:
    Explicitly compute shared object exports for both XL and GNU,
    2019-07-11) we compute exports explicitly and consistently.
    Therefore runtime linking is no longer necessary for shared objects.
    
    We've also long created executables on AIX using the linker's `-brtl`
    option to enable runtime linking in case they load plugins at runtime.
    Since commit 9f5c2040 (AIX: Explicitly compute executable exports for
    both XL and GNU, 2019-07-12) and commit 2fa920c0 (AIX: Create import
    library for executables with exports, 2019-07-16) we now provide the
    linker enough information to fully resolve symbols in plugins up front.
    Therefore runtime linking is no longer necessary for executables.
    
    Drop use of `-G` for creating shared objects and use the XL `-qmkshrobj`
    and GCC `-shared` options instead.  Both invoke the linker with the
    `-bM:SRE -bnoentry` options to create a shared object without runtime
    linking enabled.  Also drop use of `-brtl` for creating executables.
    
    Issue: #19163
    3fb3157d