[committed] libgomp: Use absolute pathname to testsuite/flock [PR113192]

Message ID ZZ0LVCjnhnI4r5qs@tucnak
State New
Headers
Series [committed] libgomp: Use absolute pathname to testsuite/flock [PR113192] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Jakub Jelinek Jan. 9, 2024, 9:01 a.m. UTC
  Hi!

When flock program doesn't exist, libgomp configure attempts to
offer a fallback version using a perl script, but we weren't using
absolute filename to that, so it apparently failed to work correctly.

The following patch arranges for it to get the absolute filename.

Tested by John David in the PR.

2024-01-09  Jakub Jelinek  <jakub@redhat.com>

	PR libgomp/113192
	* configure.ac (FLOCK): Use \$(abs_top_srcdir)/testsuite/flock
	rather than $srcdir/testsuite/flock.
	* configure: Regenerated.


	Jakub
  

Comments

Rainer Orth Jan. 10, 2024, 9:32 a.m. UTC | #1
Hi Jakub,

> When flock program doesn't exist, libgomp configure attempts to
> offer a fallback version using a perl script, but we weren't using
> absolute filename to that, so it apparently failed to work correctly.
>
> The following patch arranges for it to get the absolute filename.
>
> Tested by John David in the PR.

This patch completely broke parallel libgomp testing on Solaris:

ERROR: couldn't execute "\$(abs_top_srcdir)/testsuite/flock": no such file or directory

FLOCK is also substituted into testsuite/libgomp-site-extra.exp.in,
which gets included into site.exp.  That one has

## Begin content included from file libgomp-site-extra.exp.  Do not modify. ##
set FLOCK {$(abs_top_srcdir)/testsuite/flock}

So expect tries to literally execute '$(abs_top_srcdir)/testsuite/flock'
which cannot work.

	Rainer
  

Patch

--- libgomp/configure.ac.jj	2023-11-02 07:49:21.693801244 +0100
+++ libgomp/configure.ac	2024-01-08 21:46:21.014765685 +0100
@@ -343,7 +343,7 @@  AX_COUNT_CPUS
 AC_CHECK_PROGS(FLOCK, flock)
 # Fallback if 'perl' is available.
 if test -z "$FLOCK"; then
-  AC_CHECK_PROG(FLOCK, perl, $srcdir/testsuite/flock)
+  AC_CHECK_PROG(FLOCK, perl, \$(abs_top_srcdir)/testsuite/flock)
 fi
 
 AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
--- libgomp/configure.jj	2024-01-06 02:29:24.566795886 +0100
+++ libgomp/configure	2024-01-08 21:46:23.799726387 +0100
@@ -16655,7 +16655,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="$srcdir/testsuite/flock"
+    ac_cv_prog_FLOCK="\$(abs_top_srcdir)/testsuite/flock"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi