]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re, add...
authorJakub Jelinek <jakub@redhat.com>
Thu, 3 Jul 2014 18:45:35 +0000 (20:45 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 3 Jul 2014 18:45:35 +0000 (20:45 +0200)
* 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

libgomp/ChangeLog
libgomp/testsuite/lib/libgomp.exp
libgomp/testsuite/libgomp.c++/c++.exp
libgomp/testsuite/libgomp.c/c.exp
libgomp/testsuite/libgomp.fortran/fortran.exp
libgomp/testsuite/libgomp.graphite/graphite.exp

index aaaaca8a00d823140daa53f6daaa07d0f42aaa8c..ee2e264e58bbe0489b7b8b1a3ce4c12dd46e1533 100644 (file)
@@ -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
index c965147e4fde58ab6f0cbb7900cd969f8e1de906..094e5ed1b0c3c4e80c12bd5c7d9c5d9683605e11 100644 (file)
@@ -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] } {
index 88e017e4e29cf568d3289af3d6eed5f2a7eee972..a9cf41aba4b25aba4e06e28a8e6748f272c25aae 100644 (file)
@@ -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
index 8e902d4c131e8ec76b6bb5b81474121c84f01ff5..300b9211f6de36b9a77f98c9e780cdb190057495 100644 (file)
@@ -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
index 41e1714ad8b3d00e67c53d5dd53074f42d71432f..c77a119a98b91ca661864c1b09c9e500b3ba6e4a 100644 (file)
@@ -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"
index 93dea1bbddd8a76c5d878f1e12250019c4a6b4ef..190f5575275bc59ff50b34f1cf65b4dfe7ac1d93 100644 (file)
@@ -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