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

configure.in, mkmf.rb: sign extensions

* configure.in (codesign): check identifier at link time, not
  configure time.

* lib/mkmf.rb (LINK_SO): sign extensions too.  replace empty line with
  default command.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-12-10 04:18:13 +00:00
parent 08b98cc317
commit 2b8485bc89
2 changed files with 7 additions and 4 deletions

View file

@ -1214,9 +1214,11 @@ main()
if test "$rb_cv_broken_crypt" = yes; then
AC_DEFINE(BROKEN_CRYPT, 1)
fi
if test "${RUBY_CODESIGN:+set}"; then
AC_CHECK_PROGS(codesign, codesign)
POSTLINK="$ac_cv_prog_codesign -s '$RUBY_CODESIGN' -f \$@"
AC_CHECK_PROGS(codesign, codesign)
if test -n "$codesign"; then
POSTLINK="test -z '\$(RUBY_CODESIGN)' || $codesign -s '\$(RUBY_CODESIGN)' -f \$@"
LINK_SO="$LINK_SO
$POSTLINK"
fi
],
[hpux*], [ LIBS="-lm $LIBS"

View file

@ -2412,13 +2412,14 @@ MESSAGE
TRY_LINK = config_string('TRY_LINK') ||
"$(CC) #{OUTFLAG}conftest#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \
"$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
LINK_SO = config_string('LINK_SO') ||
LINK_SO = (config_string('LINK_SO') || "").sub(/^$/) do
if CONFIG["DLEXT"] == $OBJEXT
"ld $(DLDFLAGS) -r -o $@ $(OBJS)\n"
else
"$(LDSHARED) #{OUTFLAG}$@ $(OBJS) " \
"$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)"
end
end
LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L%s'
RPATHFLAG = config_string('RPATHFLAG') || ''
LIBARG = config_string('LIBARG') || '-l%s'