diff options
author | Tony Battersby <tonyb@cybernetics.com> | 2021-08-06 17:04:32 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-12 06:26:15 +0100 |
commit | fa91de383e0e42a8905b2b01686c2a643d0a5ad9 (patch) | |
tree | e2f807f5578267d23a213b857c3eee3b209c9a51 /meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch | |
parent | 666548c44e273d1d3673830349e0781170719a6c (diff) | |
download | poky-fa91de383e0e42a8905b2b01686c2a643d0a5ad9.tar.gz |
ruby: Fix reproducibility issue with LDFLAGS
If we add DEBUG_PREFIX_MAP into LDFLAGS, ruby and ruby-dbg are no
longer reproducible. Fix this.
(From OE-Core rev: c34d5e409b291e69d6ff28ee71acba7055ef3f08)
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch')
-rw-r--r-- | meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch b/meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch new file mode 100644 index 0000000000..9387506c26 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | Subject: [PATCH] template/Makefile.in: filter out -f*prefix-map | ||
2 | |||
3 | If we add DEBUG_PREFIX_MAP into LDFLAGS, ruby and ruby-dbg are no longer | ||
4 | reproducible. Fix this. | ||
5 | |||
6 | Upstream-Status: Inapproppriate [oe-core specific] | ||
7 | Signed-off-by: Tony Battersby <tonyb@cybernetics.com> | ||
8 | --- | ||
9 | --- a/tool/mjit_archflag.sh | ||
10 | +++ b/tool/mjit_archflag.sh | ||
11 | @@ -7,6 +7,20 @@ quote() { | ||
12 | echo | ||
13 | } | ||
14 | |||
15 | +quote_filtered() { | ||
16 | + printf "#${indent}define $1" | ||
17 | + while shift && [ "$#" -gt 0 ]; do | ||
18 | + case "$1" in | ||
19 | + -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*) | ||
20 | + ;; | ||
21 | + *) | ||
22 | + printf ' "%s"'$sep "$1" | ||
23 | + ;; | ||
24 | + esac | ||
25 | + done | ||
26 | + echo | ||
27 | +} | ||
28 | + | ||
29 | archs="" | ||
30 | arch_flag="" | ||
31 | |||
32 | --- a/template/Makefile.in | ||
33 | +++ b/template/Makefile.in | ||
34 | @@ -666,7 +666,7 @@ mjit_config.h: | ||
35 | quote "MJIT_OPTFLAGS " $(MJIT_OPTFLAGS); \ | ||
36 | quote "MJIT_DEBUGFLAGS " $(MJIT_DEBUGFLAGS); \ | ||
37 | quote "MJIT_LDSHARED " ; \ | ||
38 | - quote "MJIT_DLDFLAGS MJIT_ARCHFLAG" $(MJIT_DLDFLAGS); \ | ||
39 | + quote_filtered "MJIT_DLDFLAGS MJIT_ARCHFLAG" $(MJIT_DLDFLAGS); \ | ||
40 | quote "MJIT_LIBS " $(LIBRUBYARG_SHARED); \ | ||
41 | quote 'PRELOADENV "@PRELOADENV@"'; \ | ||
42 | indent=$${archs:+' '}; \ | ||