aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-07-03 20:45:35 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-07-03 20:45:35 +0200
commitf707da16f714f7fe5a42391748212c84dfec639b (patch)
treea0693ecb7f84be353c54f762cdb9f97f018b498a /libgomp
parent9e5f78f114729119cc72443a145456e082af2f7c (diff)
downloadgcc-f707da16f714f7fe5a42391748212c84dfec639b.zip
gcc-f707da16f714f7fe5a42391748212c84dfec639b.tar.gz
gcc-f707da16f714f7fe5a42391748212c84dfec639b.tar.bz2
libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re, add $lang_include_flags to options.
* testsuite/lib/libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re, add $lang_include_flags to options. * testsuite/libgomp.c/c.exp: Unset lang_include_flags. * testsuite/libgomp.c++/c++.exp: Likewise. * testsuite/libgomp.fortran/fortran.exp: Likewise. Set lang_source_re and lang_include_flags instead of adding -fintrinsic-modules-path= to ALWAYS_CFLAGS. * testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags. From-SVN: r212268
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog11
-rw-r--r--libgomp/testsuite/lib/libgomp.exp6
-rw-r--r--libgomp/testsuite/libgomp.c++/c++.exp3
-rw-r--r--libgomp/testsuite/libgomp.c/c.exp3
-rw-r--r--libgomp/testsuite/libgomp.fortran/fortran.exp6
-rw-r--r--libgomp/testsuite/libgomp.graphite/graphite.exp3
6 files changed, 31 insertions, 1 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index aaaaca8..ee2e264 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,14 @@
+2014-07-03 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/lib/libgomp.exp (libgomp_target_compile): If $source
+ matches regex $lang_source_re, add $lang_include_flags to options.
+ * testsuite/libgomp.c/c.exp: Unset lang_include_flags.
+ * testsuite/libgomp.c++/c++.exp: Likewise.
+ * testsuite/libgomp.fortran/fortran.exp: Likewise. Set lang_source_re
+ and lang_include_flags instead of adding -fintrinsic-modules-path= to
+ ALWAYS_CFLAGS.
+ * testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags.
+
2014-07-03 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/libgomp.fortran/fortran.exp: Explain
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index c965147..094e5ed 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -184,6 +184,8 @@ proc libgomp_target_compile { source dest type options } {
global lang_test_file
global lang_library_path
global lang_link_flags
+ global lang_include_flags
+ global lang_source_re
if { [info exists lang_test_file] } {
if { $blddir != "" } {
@@ -193,6 +195,10 @@ proc libgomp_target_compile { source dest type options } {
lappend options "ldflags=-L${blddir}/${lang_library_path}"
}
lappend options "ldflags=${lang_link_flags}"
+ if { [info exists lang_include_flags] \
+ && [regexp ${lang_source_re} ${source}] } {
+ lappend options "additional_flags=${lang_include_flags}"
+ }
}
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp
index 88e017e..a9cf41a 100644
--- a/libgomp/testsuite/libgomp.c++/c++.exp
+++ b/libgomp/testsuite/libgomp.c++/c++.exp
@@ -7,6 +7,9 @@ set shlib_ext [get_shlib_extension]
set lang_link_flags "-lstdc++"
set lang_test_file_found 0
set lang_library_path "../libstdc++-v3/src/.libs"
+if [info exists lang_include_flags] then {
+ unset lang_include_flags
+}
# Initialize dg.
dg-init
diff --git a/libgomp/testsuite/libgomp.c/c.exp b/libgomp/testsuite/libgomp.c/c.exp
index 8e902d4..300b921 100644
--- a/libgomp/testsuite/libgomp.c/c.exp
+++ b/libgomp/testsuite/libgomp.c/c.exp
@@ -5,6 +5,9 @@ if [info exists lang_library_path] then {
if [info exists lang_test_file] then {
unset lang_test_file
}
+if [info exists lang_include_flags] then {
+ unset lang_include_flags
+}
load_lib libgomp-dg.exp
load_gcc_lib gcc-dg.exp
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index 41e1714..c77a119 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -8,6 +8,9 @@ global ALWAYS_CFLAGS
set shlib_ext [get_shlib_extension]
set lang_library_path "../libgfortran/.libs"
set lang_link_flags "-lgfortran"
+if [info exists lang_include_flags] then {
+ unset lang_include_flags
+}
set lang_test_file_found 0
set quadmath_library_path "../libquadmath/.libs"
@@ -19,7 +22,8 @@ dg-init
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
if { $blddir != "" } {
- lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path=${blddir}"
+ set lang_source_re {^.*\.[fF](|90|95|03|08)$}
+ set lang_include_flags "-fintrinsic-modules-path=${blddir}"
# Look for a static libgfortran first.
if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
set lang_test_file "${lang_library_path}/libgfortran.a"
diff --git a/libgomp/testsuite/libgomp.graphite/graphite.exp b/libgomp/testsuite/libgomp.graphite/graphite.exp
index 93dea1b..190f557 100644
--- a/libgomp/testsuite/libgomp.graphite/graphite.exp
+++ b/libgomp/testsuite/libgomp.graphite/graphite.exp
@@ -21,6 +21,9 @@ if [info exists lang_library_path] then {
if [info exists lang_test_file] then {
unset lang_test_file
}
+if [info exists lang_include_flags] then {
+ unset lang_include_flags
+}
load_lib libgomp-dg.exp
load_gcc_lib gcc-dg.exp