From patchwork Mon Mar 28 08:45:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 52397 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8226E3858C74 for ; Mon, 28 Mar 2022 08:46:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8226E3858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1648457177; bh=wwxsp39okIlMEei/ImGYhFiB70HNkzo11DjV3LFwsCY=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=k6enXd66+xnwkaUQ1bQI97/XLebzckI6vpMShKZMBousDR/jPx4THzwlF91sbdcXm LAqZDhfohtfxW4dctbQ5wfiMO8Iq9PIsqK4L21k1VsEwfxWU7eSL0Od7j+koa5bDLa hKn+g2ukYl4ajgA+yILYb+nbnuyu/FqggizQ1LBQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 3AC973858C56 for ; Mon, 28 Mar 2022 08:45:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3AC973858C56 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E92E3210EA; Mon, 28 Mar 2022 08:45:46 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C6C1413215; Mon, 28 Mar 2022 08:45:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yVxvL7p1QWJYFQAAMHmgww (envelope-from ); Mon, 28 Mar 2022 08:45:46 +0000 Date: Mon, 28 Mar 2022 10:45:45 +0200 To: gcc-patches@gcc.gnu.org Subject: [PATCH][libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac Message-ID: <20220328084543.GA5967@delia.home> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Gcc-patches From: Tom de Vries Reply-To: Tom de Vries Cc: Jakub Jelinek , Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi, 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. OK for trunk? Thanks, - Tom [libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac libgomp/ChangeLog: 2022-03-28 Tom de Vries * plugin/configfrag.ac: Use /$(libexecdir:\$(exec_prefix)/%=%)/ instead of /libexec/. * configure: Regenerate. --- libgomp/configure | 2 +- libgomp/plugin/configfrag.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgomp/configure b/libgomp/configure index a73a6d44003..bdbe3d142d1 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -15419,7 +15419,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi # 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" + offload_additional_options="$offload_additional_options -B$tgt_dir/\$(libexecdir:\$(exec_prefix)/%=%)/gcc/\$(target_alias)/\$(gcc_version) -B$tgt_dir/bin" offload_additional_lib_paths="$offload_additional_lib_paths:$tgt_dir/lib64:$tgt_dir/lib:$tgt_dir/lib32" else offload_additional_options="$offload_additional_options -B\$(libexecdir)/gcc/\$(target_alias)/\$(gcc_version) -B\$(bindir)" diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac index da573bd8387..9f9d0a7f08c 100644 --- a/libgomp/plugin/configfrag.ac +++ b/libgomp/plugin/configfrag.ac @@ -254,7 +254,7 @@ if test x"$enable_offload_targets" != x; then fi # 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" + offload_additional_options="$offload_additional_options -B$tgt_dir/\$(libexecdir:\$(exec_prefix)/%=%)/gcc/\$(target_alias)/\$(gcc_version) -B$tgt_dir/bin" offload_additional_lib_paths="$offload_additional_lib_paths:$tgt_dir/lib64:$tgt_dir/lib:$tgt_dir/lib32" else offload_additional_options="$offload_additional_options -B\$(libexecdir)/gcc/\$(target_alias)/\$(gcc_version) -B\$(bindir)"