recipes: tools/pmount: added version 0.9.23
[dragora.git] / patches / gcc / 0004-libgomp-test-fix.patch
blob061fc8f34d14edaac4e41a302a7442b240b821a6
1 From 61c15ebc2895bdee5f4460a17b015bb47177fa90 Mon Sep 17 00:00:00 2001
2 From: Szabolcs Nagy <nsz@port70.net>
3 Date: Sun, 6 Nov 2016 03:11:18 +0000
4 Subject: [PATCH 04/13] libgomp test fix
6 ---
7 libgomp/testsuite/Makefile.am | 6 ++++++
8 libgomp/testsuite/Makefile.in | 5 +++++
9 libgomp/testsuite/lib/libgomp.exp | 3 +++
10 3 files changed, 14 insertions(+)
12 diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am
13 index 2100f49e53b..fa25b3a0604 100644
14 --- a/libgomp/testsuite/Makefile.am
15 +++ b/libgomp/testsuite/Makefile.am
16 @@ -12,6 +12,12 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
17 echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
18 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
20 +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
22 +extra.exp:
23 + echo 'set BUILD_CC "$(CC)"' > $@.tmp
24 + mv $@.tmp $@
26 # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
27 # following variables have to be "routed through" this Makefile, for expansion
28 # of the several (Makefile) variables used therein.
29 diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
30 index 80315b15a7d..cdbf35695f7 100644
31 --- a/libgomp/testsuite/Makefile.in
32 +++ b/libgomp/testsuite/Makefile.in
33 @@ -303,6 +303,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
34 echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
36 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
37 +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
38 all: all-am
40 .SUFFIXES:
41 @@ -464,6 +465,10 @@ uninstall-am:
42 .PRECIOUS: Makefile
45 +extra.exp:
46 + echo 'set BUILD_CC "$(CC)"' > $@.tmp
47 + mv $@.tmp $@
49 # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
50 # following variables have to be "routed through" this Makefile, for expansion
51 # of the several (Makefile) variables used therein.
52 diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
53 index 14d9b5f1305..186b0ba0b57 100644
54 --- a/libgomp/testsuite/lib/libgomp.exp
55 +++ b/libgomp/testsuite/lib/libgomp.exp
56 @@ -68,6 +68,7 @@ proc libgomp_init { args } {
57 global ALWAYS_CFLAGS
58 global CFLAGS
59 global TOOL_EXECUTABLE TOOL_OPTIONS
60 + global BUILD_CC
61 global GCC_UNDER_TEST
62 global TESTING_IN_BUILD_TREE
63 global target_triplet
64 @@ -90,6 +91,8 @@ proc libgomp_init { args } {
65 if ![info exists GCC_UNDER_TEST] then {
66 if [info exists TOOL_EXECUTABLE] {
67 set GCC_UNDER_TEST $TOOL_EXECUTABLE
68 + } elseif [info exists BUILD_CC] {
69 + set GCC_UNDER_TEST $BUILD_CC
70 } else {
71 set GCC_UNDER_TEST "[find_gcc]"
73 --
74 2.21.0