|
| 1 | +diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am |
| 2 | +index 655a413c160..916e9d30f15 100644 |
| 3 | +--- a/libgomp/testsuite/Makefile.am |
| 4 | ++++ b/libgomp/testsuite/Makefile.am |
| 5 | +@@ -14,6 +14,13 @@ RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir |
| 6 | + |
| 7 | + EXTRA_DEJAGNU_SITE_CONFIG = libgomp-site-extra.exp |
| 8 | + |
| 9 | ++EXTRA_DEJAGNU_SITE_CONFIG = extra.exp |
| 10 | ++ |
| 11 | ++extra.exp: |
| 12 | ++ echo 'set BUILD_CC "$(CC)"' > [email protected] |
| 13 | + |
| 14 | ++ |
| 15 | ++ |
| 16 | + # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the |
| 17 | + # following variables have to be "routed through" this Makefile, for expansion |
| 18 | + # of the several (Makefile) variables used therein. |
| 19 | +diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in |
| 20 | +index 52aa6c5fbc9..617da8ddbf2 100644 |
| 21 | +--- a/libgomp/testsuite/Makefile.in |
| 22 | ++++ b/libgomp/testsuite/Makefile.in |
| 23 | +@@ -311,6 +311,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ |
| 24 | + echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) |
| 25 | + |
| 26 | + RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir |
| 27 | ++EXTRA_DEJAGNU_SITE_CONFIG = extra.exp |
| 28 | + EXTRA_DEJAGNU_SITE_CONFIG = libgomp-site-extra.exp |
| 29 | + all: all-am |
| 30 | + |
| 31 | +@@ -475,6 +476,10 @@ uninstall-am: |
| 32 | + .PRECIOUS: Makefile |
| 33 | + |
| 34 | + |
| 35 | ++extra.exp: |
| 36 | ++ echo 'set BUILD_CC "$(CC)"' > [email protected] |
| 37 | + |
| 38 | ++ |
| 39 | + # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the |
| 40 | + # following variables have to be "routed through" this Makefile, for expansion |
| 41 | + # of the several (Makefile) variables used therein. |
| 42 | +diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp |
| 43 | +index ee5f0e57b19..183081b5802 100644 |
| 44 | +--- a/libgomp/testsuite/lib/libgomp.exp |
| 45 | ++++ b/libgomp/testsuite/lib/libgomp.exp |
| 46 | +@@ -68,6 +68,7 @@ proc libgomp_init { args } { |
| 47 | + global ALWAYS_CFLAGS |
| 48 | + global CFLAGS |
| 49 | + global TOOL_EXECUTABLE TOOL_OPTIONS |
| 50 | ++ global BUILD_CC |
| 51 | + global GCC_UNDER_TEST |
| 52 | + global TESTING_IN_BUILD_TREE |
| 53 | + global target_triplet |
| 54 | +@@ -90,6 +91,8 @@ proc libgomp_init { args } { |
| 55 | + if ![info exists GCC_UNDER_TEST] then { |
| 56 | + if [info exists TOOL_EXECUTABLE] { |
| 57 | + set GCC_UNDER_TEST $TOOL_EXECUTABLE |
| 58 | ++ } elseif [info exists BUILD_CC] { |
| 59 | ++ set GCC_UNDER_TEST $BUILD_CC |
| 60 | + } else { |
| 61 | + set GCC_UNDER_TEST "[find_gcc]" |
| 62 | + } |
0 commit comments