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