musl-cross-make/patches/gcc-9.1.0/0004-libgomp-test-fix.diff
Kevin Mark 0e455cd5ba
Support GCC 9.1.0
Rebased the patches for GCC 8.3.0 onto 9.1.0. Not all applied
cleanly, particularly the PIE patch so I had to get a little
creative. Could definitely use an extra pair of eyes on these
patches.

Independent verification of the SHA1 is always appreciated.

Verified compile with the following config.mak:

    BINUTILS_VER = 2.32
    GCC_VER = 9.1.0
    GMP_VER = 6.1.2
    MPC_VER = 1.1.0
    MPFR_VER = 4.0.2
    ISL_VER = 0.21
    LINUX_VER = 3.0.35

    COMMON_CONFIG += --disable-nls
    GCC_CONFIG += --enable-languages=c,c++
    GCC_CONFIG += --disable-libquadmath --disable-decimal-float
    GCC_CONFIG += --disable-multilib
2019-06-30 23:53:50 -04:00

62 lines
2.2 KiB
Diff

diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am
index 2100f49e5..fa25b3a06 100644
--- a/libgomp/testsuite/Makefile.am
+++ b/libgomp/testsuite/Makefile.am
@@ -12,6 +12,12 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
+
+extra.exp:
+ echo 'set BUILD_CC "$(CC)"' > $@.tmp
+ mv $@.tmp $@
+
# Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
# following variables have to be "routed through" this Makefile, for expansion
# of the several (Makefile) variables used therein.
diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
index 80315b15a..cdbf35695 100644
--- a/libgomp/testsuite/Makefile.in
+++ b/libgomp/testsuite/Makefile.in
@@ -303,6 +303,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
all: all-am
.SUFFIXES:
@@ -464,6 +465,10 @@ uninstall-am:
.PRECIOUS: Makefile
+extra.exp:
+ echo 'set BUILD_CC "$(CC)"' > $@.tmp
+ mv $@.tmp $@
+
# Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
# following variables have to be "routed through" this Makefile, for expansion
# of the several (Makefile) variables used therein.
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index 14d9b5f13..186b0ba0b 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -68,6 +68,7 @@ proc libgomp_init { args } {
global ALWAYS_CFLAGS
global CFLAGS
global TOOL_EXECUTABLE TOOL_OPTIONS
+ global BUILD_CC
global GCC_UNDER_TEST
global TESTING_IN_BUILD_TREE
global target_triplet
@@ -90,6 +91,8 @@ proc libgomp_init { args } {
if ![info exists GCC_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] {
set GCC_UNDER_TEST $TOOL_EXECUTABLE
+ } elseif [info exists BUILD_CC] {
+ set GCC_UNDER_TEST $BUILD_CC
} else {
set GCC_UNDER_TEST "[find_gcc]"
}