diff options
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby/0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch')
-rw-r--r-- | meta/recipes-devtools/ruby/ruby/0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch b/meta/recipes-devtools/ruby/ruby/0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch new file mode 100644 index 0000000000..f08aaf555f --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch @@ -0,0 +1,31 @@ +From f491fff7d006954c1c51eb7a513a85bdbab0fe5a Mon Sep 17 00:00:00 2001 +From: Reiner Herrmann <reiner@reiner-h.de> +Date: Tue, 10 Oct 2017 15:06:13 -0300 +Subject: [PATCH] lib/mkmf.rb: sort list of object files in generated Makefile + +Without sorting the list explicitly, its order is indeterministic, +because readdir() is also not deterministic. +When the list of object files varies between builds, they are linked +in a different order, which results in an unreproducible build. + +Upstream-Status: Backport [debian] + +Signed-off-by: Antonio Terceiro <terceiro@debian.org> +Signed-off-by: Reiner Herrmann <reiner@reiner-h.de> +--- + lib/mkmf.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/mkmf.rb b/lib/mkmf.rb +index 6da7dde..3af30a9 100644 +--- a/lib/mkmf.rb ++++ b/lib/mkmf.rb +@@ -2368,7 +2368,7 @@ LOCAL_LIBS = #{$LOCAL_LIBS} + LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS} + ORIG_SRCS = #{orig_srcs.collect(&File.method(:basename)).join(' ')} + SRCS = $(ORIG_SRCS) #{(srcs - orig_srcs).collect(&File.method(:basename)).join(' ')} +-OBJS = #{$objs.join(" ")} ++OBJS = #{$objs.sort.join(" ")} + HDRS = #{hdrs.map{|h| '$(srcdir)/' + File.basename(h)}.join(' ')} + LOCAL_HDRS = #{$headers.join(' ')} + TARGET = #{target} |