Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 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 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame^] | 6 | Upstream-Status: Inappropriate [oe-core specific] |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 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:+' '}; \ |