From patchwork Thu May 12 11:32:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 53838 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 1E492384B122 for ; Thu, 12 May 2022 11:33:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 213B4385041D for ; Thu, 12 May 2022 11:32:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 213B4385041D 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,219,1647331200"; d="scan'208,223";a="75808760" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 12 May 2022 03:32:40 -0800 IronPort-SDR: eqw1s6P37OgHk+278BYHeRRAZn+PyI7sUQDRbPD6KD9AxPmhoVRJ7yqWyj7iJYxfKyD7gYhHwc ZASiQuVDUbwvGofG5PR64lLmvanTrrTxhxkfFZPSDXK0pRmtqWaMil5JAx/IdJK1I1YwwNTSlg 1fQCfUherQ8loHPwY0OBCkE2g1Pjv5xSpPQ23i/styQREUuqNeoiYnFSivRrccLyMwdv+sLb3C MC8TOInI2I+b2qW2DJu8dps1tJo+ec1gjuNv4xgk/hEHkM53HlQe9P5cgyr1E/ZHOqdIMWRG63 59w= From: Thomas Schwinge To: Subject: libgomp plugins: Don't 'AC_SUBST' and 'AC_DEFINE_UNQUOTED' for 'PLUGIN_GCN', 'PLUGIN_NVPTX' (was: [PATCH 7/10] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin) In-Reply-To: <20140923191931.2177e60f@octopus> References: <20140923191931.2177e60f@octopus> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Thu, 12 May 2022 13:32:30 +0200 Message-ID: <875ymbt29d.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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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 , Andrew Stubbs , Julian Brown Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! On 2014-09-23T19:19:31+0100, Julian Brown wrote: > This patch contains the bulk of the OpenACC 2.0 runtime support, > building around, or on top of, the OpenMP 4.0 support (as previously > posted or already extant upstream) where we could. [...] > --- a/libgomp/Makefile.am > +++ b/libgomp/Makefile.am > +if PLUGIN_NVPTX For this 'if' here (later moved into 'libgomp/plugin/Makefrag.am'), we do need the 'AM_CONDITIONAL'... > --- a/libgomp/Makefile.in > +++ b/libgomp/Makefile.in > +PLUGIN_NVPTX = @PLUGIN_NVPTX@ ..., but this here (and similar elsewhere) due to 'AC_SUBST'... > --- a/libgomp/config.h.in > +++ b/libgomp/config.h.in > +/* Define to 1 if the NVIDIA plugin is built, 0 if not. */ > +#undef PLUGIN_NVPTX ..., and this here due to 'AC_DEFINE_UNQUOTED' have always been unused, so we may clean those up: > --- a/libgomp/configure.ac > +++ b/libgomp/configure.ac > +AC_SUBST(PLUGIN_NVPTX) > +AM_CONDITIONAL([PLUGIN_NVPTX], [test $PLUGIN_NVPTX = 1]) > +AC_DEFINE_UNQUOTED([PLUGIN_NVPTX], [$PLUGIN_NVPTX], > + [Define to 1 if the NVIDIA plugin is built, 0 if not.]) Later also cargo-culted for other libgomp plugins, where the same "unused" reasoning applies likewise. Pushed to master branch commit edbd2b1caaa79d68467418a4571c3b09f9602805 "libgomp plugins: Don't 'AC_SUBST' and 'AC_DEFINE_UNQUOTED' for 'PLUGIN_GCN', 'PLUGIN_NVPTX'", 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 edbd2b1caaa79d68467418a4571c3b09f9602805 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 5 May 2022 23:10:23 +0200 Subject: [PATCH] libgomp plugins: Don't 'AC_SUBST' and 'AC_DEFINE_UNQUOTED' for 'PLUGIN_GCN', 'PLUGIN_NVPTX' Nothing ever used these. libgomp/ * plugin/configfrag.ac: Don't 'AC_SUBST' and 'AC_DEFINE_UNQUOTED' for 'PLUGIN_GCN', 'PLUGIN_NVPTX'. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. * testsuite/Makefile.in: Likewise. --- libgomp/Makefile.in | 2 -- libgomp/config.h.in | 6 ------ libgomp/configure | 18 ++---------------- libgomp/plugin/configfrag.ac | 6 ------ libgomp/testsuite/Makefile.in | 2 -- 5 files changed, 2 insertions(+), 32 deletions(-) diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in index f2712aa5133..1d55f4b65e2 100644 --- a/libgomp/Makefile.in +++ b/libgomp/Makefile.in @@ -431,9 +431,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PLUGIN_GCN = @PLUGIN_GCN@ PLUGIN_GCN_LIBS = @PLUGIN_GCN_LIBS@ -PLUGIN_NVPTX = @PLUGIN_NVPTX@ PLUGIN_NVPTX_CPPFLAGS = @PLUGIN_NVPTX_CPPFLAGS@ PLUGIN_NVPTX_LDFLAGS = @PLUGIN_NVPTX_LDFLAGS@ PLUGIN_NVPTX_LIBS = @PLUGIN_NVPTX_LIBS@ diff --git a/libgomp/config.h.in b/libgomp/config.h.in index e702625ab6e..5611ed925ad 100644 --- a/libgomp/config.h.in +++ b/libgomp/config.h.in @@ -170,12 +170,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if the GCN plugin is built, 0 if not. */ -#undef PLUGIN_GCN - -/* Define to 1 if the NVIDIA plugin is built, 0 if not. */ -#undef PLUGIN_NVPTX - /* Define to 1 if the NVIDIA plugin should dlopen libcuda.so.1, 0 if it should be linked against it. */ #undef PLUGIN_NVPTX_DYNAMIC diff --git a/libgomp/configure b/libgomp/configure index 3de8eb2641f..be675a6b8ab 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -674,11 +674,9 @@ offload_additional_options offload_targets offload_plugins PLUGIN_GCN_LIBS -PLUGIN_GCN PLUGIN_NVPTX_LIBS PLUGIN_NVPTX_LDFLAGS PLUGIN_NVPTX_CPPFLAGS -PLUGIN_NVPTX CUDA_DRIVER_LIB CUDA_DRIVER_INCLUDE libtool_VERSION @@ -11414,7 +11412,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11417 "configure" +#line 11415 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11520,7 +11518,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11523 "configure" +#line 11521 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15220,12 +15218,10 @@ PLUGIN_NVPTX_DYNAMIC=0 - PLUGIN_GCN=0 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. @@ -15373,11 +15369,6 @@ else fi -cat >>confdefs.h <<_ACEOF -#define PLUGIN_NVPTX $PLUGIN_NVPTX -_ACEOF - - cat >>confdefs.h <<_ACEOF #define PLUGIN_NVPTX_DYNAMIC $PLUGIN_NVPTX_DYNAMIC _ACEOF @@ -15391,11 +15382,6 @@ else fi -cat >>confdefs.h <<_ACEOF -#define PLUGIN_GCN $PLUGIN_GCN -_ACEOF - - # Check for functions needed. for ac_func in getloadavg clock_gettime strtoull diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac index 9eeac4562e4..1a61db94381 100644 --- a/libgomp/plugin/configfrag.ac +++ b/libgomp/plugin/configfrag.ac @@ -86,14 +86,12 @@ PLUGIN_NVPTX_CPPFLAGS= PLUGIN_NVPTX_LDFLAGS= PLUGIN_NVPTX_LIBS= PLUGIN_NVPTX_DYNAMIC=0 -AC_SUBST(PLUGIN_NVPTX) AC_SUBST(PLUGIN_NVPTX_CPPFLAGS) AC_SUBST(PLUGIN_NVPTX_LDFLAGS) AC_SUBST(PLUGIN_NVPTX_LIBS) PLUGIN_GCN=0 PLUGIN_GCN_LIBS= -AC_SUBST(PLUGIN_GCN) AC_SUBST(PLUGIN_GCN_LIBS) # Parse '--enable-offload-targets', figure out the corresponding libgomp @@ -221,10 +219,6 @@ fi AC_DEFINE_UNQUOTED(OFFLOAD_PLUGINS, "$offload_plugins", [Define to offload plugins, separated by commas.]) AM_CONDITIONAL([PLUGIN_NVPTX], [test $PLUGIN_NVPTX = 1]) -AC_DEFINE_UNQUOTED([PLUGIN_NVPTX], [$PLUGIN_NVPTX], - [Define to 1 if the NVIDIA plugin is built, 0 if not.]) AC_DEFINE_UNQUOTED([PLUGIN_NVPTX_DYNAMIC], [$PLUGIN_NVPTX_DYNAMIC], [Define to 1 if the NVIDIA plugin should dlopen libcuda.so.1, 0 if it should be linked against it.]) AM_CONDITIONAL([PLUGIN_GCN], [test $PLUGIN_GCN = 1]) -AC_DEFINE_UNQUOTED([PLUGIN_GCN], [$PLUGIN_GCN], - [Define to 1 if the GCN plugin is built, 0 if not.]) diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in index 32be337b8fc..2d1bf8f20d7 100644 --- a/libgomp/testsuite/Makefile.in +++ b/libgomp/testsuite/Makefile.in @@ -209,9 +209,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PLUGIN_GCN = @PLUGIN_GCN@ PLUGIN_GCN_LIBS = @PLUGIN_GCN_LIBS@ -PLUGIN_NVPTX = @PLUGIN_NVPTX@ PLUGIN_NVPTX_CPPFLAGS = @PLUGIN_NVPTX_CPPFLAGS@ PLUGIN_NVPTX_LDFLAGS = @PLUGIN_NVPTX_LDFLAGS@ PLUGIN_NVPTX_LIBS = @PLUGIN_NVPTX_LIBS@ -- 2.35.1