]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp testsuite: Only use 'blddir' if set
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 3 Nov 2014 08:58:38 +0000 (09:58 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 9 May 2023 12:32:45 +0000 (14:32 +0200)
(It is unclear to me why the current working directory needs to be in
'LD_LIBRARY_PATH'; leaving that alone for now.)

libgomp/
* testsuite/lib/libgomp.exp (libgomp_init): Only use 'blddir' if
set.
* testsuite/libgomp.c++/c++.exp: Likewise.
* testsuite/libgomp.oacc-c++/c++.exp: Likewise.

libgomp/testsuite/lib/libgomp.exp
libgomp/testsuite/libgomp.c++/c++.exp
libgomp/testsuite/libgomp.oacc-c++/c++.exp

index e12236e9083c6c1945269b75b38b44109fde1e0b..92f6507422905142e2a77883866ed925b067a179 100644 (file)
@@ -66,7 +66,6 @@ proc libgomp_init { args } {
     global srcdir blddir objdir tool_root_dir
     global libgomp_initialized
     global tmpdir
-    global blddir
     global gluefile wrap_flags
     global ALWAYS_CFLAGS
     global CFLAGS
@@ -118,7 +117,7 @@ proc libgomp_init { args } {
     }
 
     # Compute what needs to be put into LD_LIBRARY_PATH
-    set always_ld_library_path ".:${blddir}/.libs"
+    set always_ld_library_path "."
 
     global offload_additional_lib_paths
     if { $offload_additional_lib_paths != "" } {
@@ -157,6 +156,8 @@ proc libgomp_init { args } {
         lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs"
         lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}"
         lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs"
+
+       append always_ld_library_path ":${blddir}/.libs"
     }
     # The top-level include directory, for gomp-constants.h.
     lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/../../include"
index 81c188e297a88acbf3ba3d6e9592d6e515c11ba8..188d1a8235618e2f462d9ac4caddd18595599224 100644 (file)
@@ -62,7 +62,8 @@ if { $lang_test_file_found } {
     set_ld_library_path_env_vars
 
     set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
-    if { [file exists $flags_file] } {
+    if { $blddir != ""
+        && [file exists $flags_file] } {
        set lang_source_re {^.*\.[cC]$}
        set lang_include_flags [exec sh $flags_file --build-includes]
     }
index 09001788bb427d6fc349dc4ea629af16b088991e..24a4d1f67b96e3fc5c9217cbb62d6ead98a5a4c7 100644 (file)
@@ -68,7 +68,8 @@ if { $lang_test_file_found } {
     set_ld_library_path_env_vars
 
     set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
-    if { [file exists $flags_file] } {
+    if { $blddir != ""
+        && [file exists $flags_file] } {
        set lang_source_re {^.*\.[cC]$}
        set lang_include_flags [exec sh $flags_file --build-includes]
     }