[前][次][番号順一覧][スレッド一覧]

ruby-changes:26232

From: nobu <ko1@a...>
Date: Mon, 10 Dec 2012 13:18:22 +0900 (JST)
Subject: [ruby-changes:26232] nobu:r38289 (trunk): configure.in, mkmf.rb: sign extensions

nobu	2012-12-10 13:18:13 +0900 (Mon, 10 Dec 2012)

  New Revision: 38289

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38289

  Log:
    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.

  Modified files:
    trunk/configure.in
    trunk/lib/mkmf.rb

Index: configure.in
===================================================================
--- configure.in	(revision 38288)
+++ configure.in	(revision 38289)
@@ -1214,9 +1214,11 @@
                 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"
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 38288)
+++ lib/mkmf.rb	(revision 38289)
@@ -2412,13 +2412,14 @@
   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'

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]