1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.ac: use linker_flag to LIBRUBY_DLDFLAGS

* configure.ac: use a feature flag `linker_flag`, than checking if the
  compiler is `GCC`.

* configure.ac: append to LIBRUBY_DLDFLAGS once after initialized with
  DLDFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-08-13 06:09:57 +00:00
parent 843589a726
commit 2132fb3316

View file

@ -3067,11 +3067,7 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)'
LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(RUBY_PROGRAM_VERSION)'
LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
AS_IF([test "$GCC" = yes], [
LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(@F)'
], [
LIBRUBY_DLDFLAGS="$DLDFLAGS "'-h $(@F)'
])
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-h${linker_flag:+,}"'$(@F)'])
XLDFLAGS="$XLDFLAGS "'-R${libdir}'
],
[hpux*], [
@ -3318,7 +3314,7 @@ AS_CASE(["$target_os"],
])
],
[cygwin*|mingw*], [
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
AS_CASE(["$target_os"],
[cygwin*], [
AS_IF([test x"$enable_shared" = xyes], [