Skip to content

Commit

Permalink
(PA-4871) Add our libdir to the runtime linker search path
Browse files Browse the repository at this point in the history
When the runtime linker loads executables, it uses a search path in the
executable to find library dependencies. On most platforms this is done
via -rpath, but on AIX it's -R. The search path is embedded in the
executable and can be seen using:

    # dump -H /opt/puppetlabs/puppet/bin/openssl
    ...
                               ***Import File Strings***
    INDEX  PATH                          BASE                MEMBER
    0      /opt/puppetlabs/puppet/lib:/usr/lib:/lib
  • Loading branch information
joshcooper committed Jul 5, 2023
1 parent f6f29e9 commit fd31343
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions configs/components/openssl-3.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@
pkg.environment 'CC', '/opt/freeware/bin/gcc'

cflags = "#{settings[:cflags]} -static-libgcc"
# see https://github.com/openssl/openssl/issues/18007
ldflags = "#{settings[:ldflags]} -latomic -lm"
# see https://github.com/openssl/openssl/issues/18007 about -latomic
# see https://www.ibm.com/docs/en/aix/7.2?topic=l-ld-command about -R<path>, which is equivalent to -rpath
ldflags = "#{settings[:ldflags]} -Wl,-R#{settings[:libdir]} -latomic -lm"
target = 'aix-gcc'
# elsif platform.is_solaris?
# pkg.environment 'PATH', '/opt/pl-build-tools/bin:$(PATH):/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin'
Expand Down

0 comments on commit fd31343

Please sign in to comment.