blob: 2efbad75133a417e72a83e1e01ecdea3b6d84804 [file] [log] [blame]
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001Subject: [PATCH] template/Makefile.in: filter out -f*prefix-map
2
3If we add DEBUG_PREFIX_MAP into LDFLAGS, ruby and ruby-dbg are no longer
4reproducible. Fix this.
5
Andrew Geisslereff27472021-10-29 15:35:00 -05006Upstream-Status: Inappropriate [oe-core specific]
Patrick Williams0ca19cc2021-08-16 14:03:13 -05007Signed-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:+' '}; \