[libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac
authorTom de Vries <tdevries@suse.de>
Mon, 28 Mar 2022 08:45:45 +0000 (10:45 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 28 Mar 2022 12:09:02 +0000 (14:09 +0200)
commit52f42dce15f036a140154aa339fa1709c5cc858b
treecb04beafac9021fcb62f9ae5a38bfa629111f51e
parent567eb37c76e19f82a44db53edbd54c361ab7aa18
[libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac

When building an nvptx offloading configuration on openSUSE Leap 15.3, the
site script /usr/share/site/x86_64-unknown-linux-gnu is activated, setting
libexecdir to ${exec_prefix}/lib rather than ${exec_prefix}/libexec:
...
| # If user did not specify libexecdir, set the correct target:
| # Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.
|
| if test "$libexecdir" = '${exec_prefix}/libexec' ; then
|       libexecdir='${exec_prefix}/lib'
| fi
...

However, in libgomp libgomp/plugin/configfrag.ac we hardcode libexec:
...
    # Configure additional search paths.
    if test x"$tgt_dir" != x; then
      offload_additional_options="$offload_additional_options \
        -B$tgt_dir/libexec/gcc/\$(target_alias)/\$(gcc_version) \
-B$tgt_dir/bin"
...

Fix this by using /$(libexecdir:\$(exec_prefix)/%=%)/ instead of /libexec/.

Tested on x86_64-linux with nvptx accelerator.

libgomp/ChangeLog:

2022-03-28  Tom de Vries  <tdevries@suse.de>

* plugin/configfrag.ac: Use /$(libexecdir:\$(exec_prefix)/%=%)/
instead of /libexec/.
* configure: Regenerate.
libgomp/configure
libgomp/plugin/configfrag.ac