From patchwork Wed May 11 12:38:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1629577 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kyvbq2Fsvz9sG0 for ; Wed, 11 May 2022 22:39:01 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DF113857425 for ; Wed, 11 May 2022 12:38:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id B3FC73857425 for ; Wed, 11 May 2022 12:38:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3FC73857425 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.91,217,1647331200"; d="scan'208,223";a="75728366" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 11 May 2022 04:38:45 -0800 IronPort-SDR: k+Hn+ZnNG+HCnURNqkAeNi+0t/vDtQlkfj9g/xLMI/S8C4w3K+go1t9SzCIzPc0JYXD6w0QCBF l17LuoGM1nZnbDEf5jybFT1M4mASsJqQGXhs0kHraJ2OzB5BcQs/uWlV/Xjv9xLgDn6NvZSn8n yoQX8wuKYHO4i+R13D/aDxfNSPIeLlB5XCkjTGV6LzT6c7JaR9bqJ87HQBbTMS2o0fTfTR/oXh eI8lTfHSXhrld3zUZ5Gyf6wYfGg04kvu4kSW2cQFQR0AL7jvzwlR21jF0meTlmlQQ9o/FvYr2H yZg= From: Thomas Schwinge To: , Andrew Stubbs , "Julian Brown" Subject: libgomp GCN plugin: Clean up always-empty 'PLUGIN_GCN_CPPFLAGS', 'PLUGIN_GCN_LDFLAGS' (was: libgomp GCN plugin: Clean up unused references to system-provided HSA Runtime library) In-Reply-To: <878rsittr3.fsf@dem-tschwing-1.ger.mentorg.com> References: <20161118102310.GP3541@tucnak.redhat.com> <20161122132744.lrxg63wvfa3qfvhf@virgil.suse.cz> <87o8hrindc.fsf@euler.schwinge.homeip.net> <878rsittr3.fsf@dem-tschwing-1.ger.mentorg.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Wed, 11 May 2022 14:38:39 +0200 Message-ID: <87zgjoqm5s.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, 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: , Cc: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi! On 2022-04-06T12:02:08+0200, I wrote: > On 2021-01-14T15:50:23+0100, I wrote: >> I'm raising here an issue with HSA libgomp plugin code changes from a >> while ago. While HSA is now no longer relevant for GCC master branch, >> the same code has also been copied into the GCN libgomp plugin. > > Here is another small clean-up patch (to enable further clean-up): > >> This is commit b8d89b03db5f212919e4571671ebb4f5f8b1e19d (r242749) "Remove >> build dependence on HSA run-time": >> >> On 2016-11-22T14:27:44+0100, Martin Jambor wrote: >>> --- a/libgomp/plugin/configfrag.ac >>> +++ b/libgomp/plugin/configfrag.ac >> >>> @@ -195,8 +183,8 @@ if test x"$enable_offload_targets" != x; then >>> tgt_name=hsa >>> PLUGIN_HSA=$tgt >>> PLUGIN_HSA_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS >>> - PLUGIN_HSA_LDFLAGS="$HSA_RUNTIME_LDFLAGS $HSA_KMT_LDFLAGS" >>> - PLUGIN_HSA_LIBS="-lhsa-runtime64 -lhsakmt" >>> + PLUGIN_HSA_LDFLAGS="$HSA_RUNTIME_LDFLAGS" >>> + PLUGIN_HSA_LIBS="-ldl" >> >> So this switched from directly linking against 'libhsa-runtime64.so' to a >> 'libdl'-based runtime linking variant. > > (Not intending to change anything regarding that.) > > Given the 'PLUGIN_HSA_LIBS' change cited above, OK to push the attached > "libgomp GCN plugin: Clean up unused references to system-provided HSA > Runtime library"? With that done, I've then pushed to master branch commit 91a6dcd14915181b4bce51cd44b56a3e9f9d35d8 "libgomp GCN plugin: Clean up always-empty 'PLUGIN_GCN_CPPFLAGS', 'PLUGIN_GCN_LDFLAGS'", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 91a6dcd14915181b4bce51cd44b56a3e9f9d35d8 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 6 Apr 2022 12:15:28 +0200 Subject: [PATCH] libgomp GCN plugin: Clean up always-empty 'PLUGIN_GCN_CPPFLAGS', 'PLUGIN_GCN_LDFLAGS' After recent commit d6adba307508c75f1ccb2121eb1a43c9ab1d4056 "libgomp GCN plugin: Clean up unused references to system-provided HSA Runtime library", these aren't set anymore. libgomp/ * plugin/Makefrag.am (libgomp_plugin_gcn_la_CPPFLAGS): Don't consider 'PLUGIN_GCN_CPPFLAGS'. (libgomp_plugin_gcn_la_LDFLAGS): Don't consider 'PLUGIN_GCN_LDFLAGS'. * plugin/configfrag.ac (PLUGIN_GCN_CPPFLAGS, PLUGIN_GCN_LDFLAGS): Remove. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/Makefile.in: Likewise. --- libgomp/Makefile.in | 10 ++++------ libgomp/configure | 10 ++-------- libgomp/plugin/Makefrag.am | 3 +-- libgomp/plugin/configfrag.ac | 4 ---- libgomp/testsuite/Makefile.in | 2 -- 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in index 22cb2136a08..1c2ac5695ab 100644 --- a/libgomp/Makefile.in +++ b/libgomp/Makefile.in @@ -434,8 +434,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PLUGIN_GCN = @PLUGIN_GCN@ -PLUGIN_GCN_CPPFLAGS = @PLUGIN_GCN_CPPFLAGS@ -PLUGIN_GCN_LDFLAGS = @PLUGIN_GCN_LDFLAGS@ PLUGIN_GCN_LIBS = @PLUGIN_GCN_LIBS@ PLUGIN_NVPTX = @PLUGIN_NVPTX@ PLUGIN_NVPTX_CPPFLAGS = @PLUGIN_NVPTX_CPPFLAGS@ @@ -574,12 +572,12 @@ libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c \ # AMD GCN plugin @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_version_info = -version-info $(libtool_VERSION) @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_SOURCES = plugin/plugin-gcn.c -@PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_GCN_CPPFLAGS) \ +@PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS) \ @PLUGIN_GCN_TRUE@ -D_GNU_SOURCE -@PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_LDFLAGS = \ -@PLUGIN_GCN_TRUE@ $(libgomp_plugin_gcn_version_info) \ -@PLUGIN_GCN_TRUE@ $(lt_host_flags) $(PLUGIN_GCN_LDFLAGS) +@PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_LDFLAGS = $(libgomp_plugin_gcn_version_info) \ +@PLUGIN_GCN_TRUE@ $(lt_host_flags) + @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_LIBADD = libgomp.la $(PLUGIN_GCN_LIBS) @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_LIBTOOLFLAGS = --tag=disable-static nodist_noinst_HEADERS = libgomp_f.h diff --git a/libgomp/configure b/libgomp/configure index cf1d1fbe195..e735e4c5f2a 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -674,8 +674,6 @@ offload_additional_options offload_targets offload_plugins PLUGIN_GCN_LIBS -PLUGIN_GCN_LDFLAGS -PLUGIN_GCN_CPPFLAGS PLUGIN_GCN HSA_RUNTIME_LIB HSA_RUNTIME_INCLUDE @@ -11431,7 +11429,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11434 "configure" +#line 11432 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11537,7 +11535,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11540 "configure" +#line 11538 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15275,14 +15273,10 @@ if test "x$with_hsa_runtime_lib" != x; then fi PLUGIN_GCN=0 -PLUGIN_GCN_CPPFLAGS= -PLUGIN_GCN_LDFLAGS= PLUGIN_GCN_LIBS= - - # Parse '--enable-offload-targets', figure out the corresponding libgomp # plugins, and configure to find the corresponding offload compilers. # 'offload_plugins' and 'offload_targets' will be populated in the same order. diff --git a/libgomp/plugin/Makefrag.am b/libgomp/plugin/Makefrag.am index 3fe50b61cfd..11929d4ff29 100644 --- a/libgomp/plugin/Makefrag.am +++ b/libgomp/plugin/Makefrag.am @@ -44,11 +44,10 @@ if PLUGIN_GCN libgomp_plugin_gcn_version_info = -version-info $(libtool_VERSION) toolexeclib_LTLIBRARIES += libgomp-plugin-gcn.la libgomp_plugin_gcn_la_SOURCES = plugin/plugin-gcn.c -libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_GCN_CPPFLAGS) \ +libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS) \ -D_GNU_SOURCE libgomp_plugin_gcn_la_LDFLAGS = $(libgomp_plugin_gcn_version_info) \ $(lt_host_flags) -libgomp_plugin_gcn_la_LDFLAGS += $(PLUGIN_GCN_LDFLAGS) libgomp_plugin_gcn_la_LIBADD = libgomp.la $(PLUGIN_GCN_LIBS) libgomp_plugin_gcn_la_LIBTOOLFLAGS = --tag=disable-static endif diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac index 52c3da09b43..94d357f9a26 100644 --- a/libgomp/plugin/configfrag.ac +++ b/libgomp/plugin/configfrag.ac @@ -121,12 +121,8 @@ if test "x$with_hsa_runtime_lib" != x; then fi PLUGIN_GCN=0 -PLUGIN_GCN_CPPFLAGS= -PLUGIN_GCN_LDFLAGS= PLUGIN_GCN_LIBS= AC_SUBST(PLUGIN_GCN) -AC_SUBST(PLUGIN_GCN_CPPFLAGS) -AC_SUBST(PLUGIN_GCN_LDFLAGS) AC_SUBST(PLUGIN_GCN_LIBS) # Parse '--enable-offload-targets', figure out the corresponding libgomp diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in index e48c3f2f9b0..f0c7da68601 100644 --- a/libgomp/testsuite/Makefile.in +++ b/libgomp/testsuite/Makefile.in @@ -212,8 +212,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PLUGIN_GCN = @PLUGIN_GCN@ -PLUGIN_GCN_CPPFLAGS = @PLUGIN_GCN_CPPFLAGS@ -PLUGIN_GCN_LDFLAGS = @PLUGIN_GCN_LDFLAGS@ PLUGIN_GCN_LIBS = @PLUGIN_GCN_LIBS@ PLUGIN_NVPTX = @PLUGIN_NVPTX@ PLUGIN_NVPTX_CPPFLAGS = @PLUGIN_NVPTX_CPPFLAGS@ -- 2.35.1