diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-06 05:20:52 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-06 05:20:52 +0000 |
commit | c50e2851d2803bb37d9cdfa13f4a703812dc1e1c (patch) | |
tree | 3b94386c48a4283db2245f0dc9aa6055ee8c212c | |
parent | b6a4e7cea087b176ac82f2cb3fb3f9812a418f40 (diff) | |
download | ruby-c50e2851d2803bb37d9cdfa13f4a703812dc1e1c.tar.gz |
* configure.in (POSTLINK): sign built program using RUBY_CODESIGN
identity.
[Backport #9491]
* Makefile.in (PROGRAM): ditto.
* Makefile.in (LIBRUBY_SO): ditto.
* lib/mkmf.rb (LINK_SO): sign extensions too. replace empty line with
default command.
* enc/depend (link_so): prefix $(Q) for each commands.
* tool/mkconfig.rb: restore embedded newlines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | Makefile.in | 3 | ||||
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | enc/depend | 2 | ||||
-rw-r--r-- | lib/mkmf.rb | 3 | ||||
-rwxr-xr-x | tool/mkconfig.rb | 1 | ||||
-rw-r--r-- | version.h | 6 |
7 files changed, 33 insertions, 5 deletions
@@ -1,3 +1,20 @@ +Thu Feb 6 09:06:00 2014 Kenta Murata <mrkn@cookpad.com> + + * configure.in (POSTLINK): sign built program using RUBY_CODESIGN + identity. + [Backport #9491] + + * Makefile.in (PROGRAM): ditto. + + * Makefile.in (LIBRUBY_SO): ditto. + + * lib/mkmf.rb (LINK_SO): sign extensions too. replace empty line with + default command. + + * enc/depend (link_so): prefix $(Q) for each commands. + + * tool/mkconfig.rb: restore embedded newlines. + Wed Feb 5 13:43:02 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (rb_str_modify_expand): enable capacity and disable diff --git a/Makefile.in b/Makefile.in index 41ea4122e8..680f761c5f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -71,6 +71,7 @@ ARCHMINIOBJS = @MINIOBJS@ BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@ BUILTIN_TRANSSRCS = @BUILTIN_TRANSSRCS@ BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@ +POSTLINK = @POSTLINK@ RUBY_BASE_NAME=@RUBY_BASE_NAME@ RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@ @@ -169,6 +170,7 @@ $(PROGRAM): @$(RM) $@ $(ECHO) linking $@ $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@ + $(Q) $(POSTLINK) # We must `rm' the library each time this rule is invoked because "updating" a # MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not @@ -184,6 +186,7 @@ $(LIBRUBY_SO): $(ECHO) linking shared-library $@ $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@ -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@ + $(Q) $(POSTLINK) @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \ File.symlink "$(LIBRUBY_SO)", link}' \ $(LIBRUBY_ALIASES) || true diff --git a/configure.in b/configure.in index 549914edcb..ea461489a1 100644 --- a/configure.in +++ b/configure.in @@ -1022,6 +1022,12 @@ main() if test "$rb_cv_broken_crypt" = yes; then AC_DEFINE(BROKEN_CRYPT, 1) fi + 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" ac_cv_c_inline=no], diff --git a/enc/depend b/enc/depend index 8e930d5053..d42aa5c775 100644 --- a/enc/depend +++ b/enc/depend @@ -103,7 +103,7 @@ $(TRANSOBJS): ruby.h intern.h config.h defines.h missing.h encoding.h oniguruma. % end % end -% link_so = LINK_SO.gsub(/\n/, "\n\t") +% link_so = LINK_SO.gsub(/([^\\])\n/, "\\1\n$(Q) ").gsub(/\n/, "\n\t") % link_so.gsub!(/(-(?:implib|pdb):\S+)-\$\(arch\)\./, '\1.') % dependencies.each do |e| % obj = "enc/#{e}.$(OBJEXT)" diff --git a/lib/mkmf.rb b/lib/mkmf.rb index f5e4e92f39..898e4a78c9 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2308,13 +2308,14 @@ COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $( TRY_LINK = config_string('TRY_LINK') || "$(CC) #{OUTFLAG}conftest $(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' diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 6d8751175e..bddf381d67 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -62,6 +62,7 @@ File.foreach "config.status" do |line| next if !continued_line continued_line << $1 next if $2 + continued_line.each {|s| s.sub!(/\\n\z/, "\n")} val = continued_line.join name = continued_name continued_line = nil @@ -1,10 +1,10 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 514 +#define RUBY_PATCHLEVEL 515 -#define RUBY_RELEASE_DATE "2014-02-05" +#define RUBY_RELEASE_DATE "2014-02-06" #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 5 +#define RUBY_RELEASE_DAY 6 #include "ruby/version.h" |