public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-8382] libgomp: Fix up FLOCK fallback handling [PR113192]
@ 2024-03-02 0:38 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2024-03-02 0:38 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d4f849c0564fc80938d4d4871810a2b97ace45e7
commit r13-8382-gd4f849c0564fc80938d4d4871810a2b97ace45e7
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Jan 10 13:29:47 2024 +0100
libgomp: Fix up FLOCK fallback handling [PR113192]
My earlier change broke Solaris testing, because @FLOCK@ isn't substituted
just into libgomp/Makefile where it worked, but also the
testsuite/libgomp-site-extra.exp file where Make variables aren't present
and can't be substituted.
The following patch instead computes the absolute srcdir path and uses it
for FLOCK.
2024-01-10 Jakub Jelinek <jakub@redhat.com>
PR libgomp/113192
* configure.ac (FLOCK): Use $libgomp_abs_srcdir/testsuite/flock
instead of \$(abs_top_srcdir)/testsuite/flock.
* configure: Regenerated.
(cherry picked from commit 2fb3ee3ee82874e160309344bc3e52afeed8f26a)
Diff:
---
libgomp/configure | 9 ++++++++-
libgomp/configure.ac | 11 ++++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/libgomp/configure b/libgomp/configure
index 404f7064fd0..389500df738 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -16533,6 +16533,13 @@ done
# Fallback if 'perl' is available.
if test -z "$FLOCK"; then
+ # These need to be absolute paths, yet at the same time need to
+ # canonicalize only relative paths, because then amd will not unmount
+ # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+ case $srcdir in
+ [\\/$]* | ?:[\\/]*) libgomp_abs_srcdir=${srcdir} ;;
+ *) libgomp_abs_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+ esac
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -16550,7 +16557,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_FLOCK="\$(abs_top_srcdir)/testsuite/flock"
+ ac_cv_prog_FLOCK="$libgomp_abs_srcdir/testsuite/flock"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
diff --git a/libgomp/configure.ac b/libgomp/configure.ac
index de7e8159053..dd88f20103a 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -343,7 +343,16 @@ AC_MSG_NOTICE([checking for flock implementation])
AC_CHECK_PROGS(FLOCK, flock)
# Fallback if 'perl' is available.
if test -z "$FLOCK"; then
- AC_CHECK_PROG(FLOCK, perl, \$(abs_top_srcdir)/testsuite/flock)
+ # These need to be absolute paths, yet at the same time need to
+ # canonicalize only relative paths, because then amd will not unmount
+ # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+ case $srcdir in
+changequote(,)dnl
+ [\\/$]* | ?:[\\/]*) libgomp_abs_srcdir=${srcdir} ;;
+changequote([,])dnl
+ *) libgomp_abs_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+ esac
+ AC_CHECK_PROG(FLOCK, perl, $libgomp_abs_srcdir/testsuite/flock)
fi
# Get target configury.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-02 0:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-02 0:38 [gcc r13-8382] libgomp: Fix up FLOCK fallback handling [PR113192] Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).