summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch
blob: 9387506c26df4f7d5e57dbd75e82a81862e81151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Subject: [PATCH] template/Makefile.in: filter out -f*prefix-map

If we add DEBUG_PREFIX_MAP into LDFLAGS, ruby and ruby-dbg are no longer
reproducible.  Fix this.

Upstream-Status: Inapproppriate [oe-core specific]
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---
--- a/tool/mjit_archflag.sh
+++ b/tool/mjit_archflag.sh
@@ -7,6 +7,20 @@ quote() {
     echo
 }
 
+quote_filtered() {
+    printf "#${indent}define $1"
+    while shift && [ "$#" -gt 0 ]; do
+	case "$1" in
+	    -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*)
+		;;
+	    *)
+		printf ' "%s"'$sep "$1"
+		;;
+	esac
+    done
+    echo
+}
+
 archs=""
 arch_flag=""
 
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -666,7 +666,7 @@ mjit_config.h:
 	quote "MJIT_OPTFLAGS   " $(MJIT_OPTFLAGS); \
 	quote "MJIT_DEBUGFLAGS " $(MJIT_DEBUGFLAGS); \
 	quote "MJIT_LDSHARED   " ; \
-	quote "MJIT_DLDFLAGS    MJIT_ARCHFLAG" $(MJIT_DLDFLAGS); \
+	quote_filtered "MJIT_DLDFLAGS    MJIT_ARCHFLAG" $(MJIT_DLDFLAGS); \
 	quote "MJIT_LIBS       " $(LIBRUBYARG_SHARED); \
 	quote 'PRELOADENV       "@PRELOADENV@"'; \
 	indent=$${archs:+'  '}; \