public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>, Andrew Stubbs <ams@codesourcery.com>,
	"Julian Brown" <julian@codesourcery.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Subject: libgomp: Remove unused '--with-hsa-runtime', '--with-hsa-runtime-include', '--with-hsa-runtime-lib' (was: libgomp GCN plugin: Clean up unused references to system-provided HSA Runtime library)
Date: Wed, 11 May 2022 14:40:50 +0200	[thread overview]
Message-ID: <87wnesqm25.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <878rsittr3.fsf@dem-tschwing-1.ger.mentorg.com>

[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]

Hi!

On 2022-04-06T12:02:08+0200, Thomas Schwinge <thomas@codesourcery.com> 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 <mjambor@suse.cz> 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 876ac21b7e796f9efb859dfb46ae2a4126b0b782
"libgomp: Remove unused '--with-hsa-runtime',
'--with-hsa-runtime-include', '--with-hsa-runtime-lib'",
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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-libgomp-Remove-unused-with-hsa-runtime-with-hsa-runt.patch --]
[-- Type: text/x-diff, Size: 7382 bytes --]

From 876ac21b7e796f9efb859dfb46ae2a4126b0b782 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Wed, 6 Apr 2022 12:26:13 +0200
Subject: [PATCH] libgomp: Remove unused '--with-hsa-runtime',
 '--with-hsa-runtime-include', '--with-hsa-runtime-lib'

With recent commit 2e309a4eff80e55b53d32d26926a2a94eabfea21 "libgomp testsuite:
Don't amend 'LD_LIBRARY_PATH' for system-provided HSA Runtime library",
and commit d6adba307508c75f1ccb2121eb1a43c9ab1d4056 "libgomp GCN plugin:
 Clean up unused references to system-provided HSA Runtime library", the last
uses of '--with-hsa-runtime' etc. are gone.

	gcc/
	* doc/install.texi: Don't document '--with-hsa-runtime',
	'--with-hsa-runtime-include', '--with-hsa-runtime-lib'.
	libgomp/
	* plugin/configfrag.ac: Remove '--with-hsa-runtime',
	'--with-hsa-runtime-include', '--with-hsa-runtime-lib' processing.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.
---
 gcc/doc/install.texi          | 12 --------
 libgomp/Makefile.in           |  2 --
 libgomp/configure             | 55 ++---------------------------------
 libgomp/plugin/configfrag.ac  | 29 ------------------
 libgomp/testsuite/Makefile.in |  2 --
 5 files changed, 2 insertions(+), 98 deletions(-)

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 76392302653..042241e9fad 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2329,18 +2329,6 @@ those are in separate optional packages and where the presence or absence
 of those optional packages should determine the actual supported offloading
 target set rather than the GCC configure-time selection.
 
-@item --with-hsa-runtime=@var{pathname}
-@itemx --with-hsa-runtime-include=@var{pathname}
-@itemx --with-hsa-runtime-lib=@var{pathname}
-
-If you configure GCC with offloading which uses an HSA run-time such as
-AMDGCN but do not have the HSA run-time library installed in a standard
-location then you can explicitly specify the directory where they are
-installed.  The @option{--with-hsa-runtime=@/@var{hsainstalldir}} option
-is a shorthand for
-@option{--with-hsa-runtime-lib=@/@var{hsainstalldir}/lib} and
-@option{--with-hsa-runtime-include=@/@var{hsainstalldir}/include}.
-
 @item --enable-cet
 @itemx --disable-cet
 Enable building target run-time libraries with control-flow
diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
index 1c2ac5695ab..f2712aa5133 100644
--- a/libgomp/Makefile.in
+++ b/libgomp/Makefile.in
@@ -385,8 +385,6 @@ FC = @FC@
 FCFLAGS = @FCFLAGS@
 FGREP = @FGREP@
 GREP = @GREP@
-HSA_RUNTIME_INCLUDE = @HSA_RUNTIME_INCLUDE@
-HSA_RUNTIME_LIB = @HSA_RUNTIME_LIB@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/libgomp/configure b/libgomp/configure
index e735e4c5f2a..3de8eb2641f 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -675,8 +675,6 @@ offload_targets
 offload_plugins
 PLUGIN_GCN_LIBS
 PLUGIN_GCN
-HSA_RUNTIME_LIB
-HSA_RUNTIME_INCLUDE
 PLUGIN_NVPTX_LIBS
 PLUGIN_NVPTX_LDFLAGS
 PLUGIN_NVPTX_CPPFLAGS
@@ -834,9 +832,6 @@ enable_maintainer_mode
 with_cuda_driver
 with_cuda_driver_include
 with_cuda_driver_lib
-with_hsa_runtime
-with_hsa_runtime_include
-with_hsa_runtime_lib
 enable_linux_futex
 enable_tls
 enable_symvers
@@ -1519,16 +1514,6 @@ Optional Packages:
   --with-cuda-driver-lib=PATH
                           specify directory for the installed CUDA driver
                           library
-  --with-hsa-runtime=PATH specify prefix directory for installed HSA run-time
-                          package. Equivalent to
-                          --with-hsa-runtime-include=PATH/include plus
-                          --with-hsa-runtime-lib=PATH/lib
-  --with-hsa-runtime-include=PATH
-                          specify directory for installed HSA run-time include
-                          files
-  --with-hsa-runtime-lib=PATH
-                          specify directory for the installed HSA run-time
-                          library
   --with-gcc-major-version-only
                           use only GCC major number in filesystem paths
 
@@ -11429,7 +11414,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11432 "configure"
+#line 11417 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11535,7 +11520,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11538 "configure"
+#line 11523 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15236,42 +15221,6 @@ PLUGIN_NVPTX_DYNAMIC=0
 
 
 
-# Look for HSA run-time, its includes and libraries
-
-HSA_RUNTIME_INCLUDE=
-HSA_RUNTIME_LIB=
-
-
-
-
-# Check whether --with-hsa-runtime was given.
-if test "${with_hsa_runtime+set}" = set; then :
-  withval=$with_hsa_runtime;
-fi
-
-
-# Check whether --with-hsa-runtime-include was given.
-if test "${with_hsa_runtime_include+set}" = set; then :
-  withval=$with_hsa_runtime_include;
-fi
-
-
-# Check whether --with-hsa-runtime-lib was given.
-if test "${with_hsa_runtime_lib+set}" = set; then :
-  withval=$with_hsa_runtime_lib;
-fi
-
-if test "x$with_hsa_runtime" != x; then
-  HSA_RUNTIME_INCLUDE=$with_hsa_runtime/include
-  HSA_RUNTIME_LIB=$with_hsa_runtime/lib
-fi
-if test "x$with_hsa_runtime_include" != x; then
-  HSA_RUNTIME_INCLUDE=$with_hsa_runtime_include
-fi
-if test "x$with_hsa_runtime_lib" != x; then
-  HSA_RUNTIME_LIB=$with_hsa_runtime_lib
-fi
-
 PLUGIN_GCN=0
 PLUGIN_GCN_LIBS=
 
diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac
index 94d357f9a26..9eeac4562e4 100644
--- a/libgomp/plugin/configfrag.ac
+++ b/libgomp/plugin/configfrag.ac
@@ -91,35 +91,6 @@ AC_SUBST(PLUGIN_NVPTX_CPPFLAGS)
 AC_SUBST(PLUGIN_NVPTX_LDFLAGS)
 AC_SUBST(PLUGIN_NVPTX_LIBS)
 
-# Look for HSA run-time, its includes and libraries
-
-HSA_RUNTIME_INCLUDE=
-HSA_RUNTIME_LIB=
-AC_SUBST(HSA_RUNTIME_INCLUDE)
-AC_SUBST(HSA_RUNTIME_LIB)
-
-AC_ARG_WITH(hsa-runtime,
-	[AS_HELP_STRING([--with-hsa-runtime=PATH],
-		[specify prefix directory for installed HSA run-time package.
-		 Equivalent to --with-hsa-runtime-include=PATH/include
-		 plus --with-hsa-runtime-lib=PATH/lib])])
-AC_ARG_WITH(hsa-runtime-include,
-	[AS_HELP_STRING([--with-hsa-runtime-include=PATH],
-		[specify directory for installed HSA run-time include files])])
-AC_ARG_WITH(hsa-runtime-lib,
-	[AS_HELP_STRING([--with-hsa-runtime-lib=PATH],
-		[specify directory for the installed HSA run-time library])])
-if test "x$with_hsa_runtime" != x; then
-  HSA_RUNTIME_INCLUDE=$with_hsa_runtime/include
-  HSA_RUNTIME_LIB=$with_hsa_runtime/lib
-fi
-if test "x$with_hsa_runtime_include" != x; then
-  HSA_RUNTIME_INCLUDE=$with_hsa_runtime_include
-fi
-if test "x$with_hsa_runtime_lib" != x; then
-  HSA_RUNTIME_LIB=$with_hsa_runtime_lib
-fi
-
 PLUGIN_GCN=0
 PLUGIN_GCN_LIBS=
 AC_SUBST(PLUGIN_GCN)
diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
index f0c7da68601..32be337b8fc 100644
--- a/libgomp/testsuite/Makefile.in
+++ b/libgomp/testsuite/Makefile.in
@@ -163,8 +163,6 @@ FC = @FC@
 FCFLAGS = @FCFLAGS@
 FGREP = @FGREP@
 GREP = @GREP@
-HSA_RUNTIME_INCLUDE = @HSA_RUNTIME_INCLUDE@
-HSA_RUNTIME_LIB = @HSA_RUNTIME_LIB@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-- 
2.35.1


  parent reply	other threads:[~2022-05-11 12:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-13 23:20 [PATCH 0/4] Merge from HSA branch to trunk Martin Jambor
2016-11-13 23:20 ` [PATCH 1/4] Remove build dependence on HSA run-time Martin Jambor
2016-11-18 10:23   ` Jakub Jelinek
2016-11-22 13:27     ` Martin Jambor
2016-11-22 14:13       ` Jakub Jelinek
2021-01-14 14:50       ` Thomas Schwinge
2021-01-19 11:37         ` Martin Jambor
2021-01-19 12:49           ` Martin Liška
2021-03-25 13:40           ` Thomas Schwinge
2022-04-06  9:20         ` libgomp testsuite: Don't amend 'LD_LIBRARY_PATH' for system-provided HSA Runtime library (was: [PATCH 1/4] Remove build dependence on HSA run-time) Thomas Schwinge
2022-04-06  9:24           ` Jakub Jelinek
2022-04-06  9:54             ` libgomp testsuite: Don't amend 'LD_LIBRARY_PATH' for system-provided HSA Runtime library Thomas Schwinge
2022-04-28 13:48           ` [PING] libgomp testsuite: Don't amend 'LD_LIBRARY_PATH' for system-provided HSA Runtime library (was: [PATCH 1/4] Remove build dependence on HSA run-time) Thomas Schwinge
2022-05-05 19:20             ` [PING^2] " Thomas Schwinge
2022-04-06 10:02         ` libgomp GCN plugin: Clean up unused references to " Thomas Schwinge
2022-04-28 13:50           ` [PING] " Thomas Schwinge
2022-04-28 14:18           ` Andrew Stubbs
2022-05-11 12:38           ` 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) Thomas Schwinge
2022-05-11 12:40           ` Thomas Schwinge [this message]
2016-11-13 23:20 ` [PATCH 4/4] Back-end and IPA bits of hsa branch merge Martin Jambor
     [not found]   ` <yxfpftb48jra.fsf@hertz.schwinge.homeip.net>
2020-06-17 21:57     ` [HSA] Avoid ICE when "HSA does not implement indirect calls" (was: [PATCH 4/4] Back-end and IPA bits of hsa branch merge) Thomas Schwinge
2016-11-13 23:20 ` [PATCH 3/4] OpenMP lowering changes from the hsa branch Martin Jambor
2016-11-18 10:39   ` Jakub Jelinek
2016-03-16 14:13     ` [omp] Create openmp -fopt-info optimization group Martin Jambor
2017-02-21  8:09       ` [gomp4] add -finform-parallelism Cesar Philippidis
2017-02-22  8:28         ` Thomas Schwinge
2017-02-23 15:06           ` Cesar Philippidis
2016-11-22 13:43     ` [PATCH 3/4] OpenMP lowering changes from the hsa branch Martin Jambor
2017-02-22  7:58       ` Rename the "openmp" group of optimizations to "omp" (was: [PATCH 3/4] OpenMP lowering changes from the hsa branch) Thomas Schwinge
2017-02-22  8:17         ` Miscellaneous optimization group fixes (was: Rename the "openmp" group of optimizations to "omp") Thomas Schwinge
2017-02-22  9:53           ` Martin Jambor
2017-02-28  8:52             ` Rename the "openmp" group of optimizations to "omp" (was: Miscellaneous optimization group fixes) Thomas Schwinge
2017-02-28  9:04             ` Miscellaneous optimization group fixes Thomas Schwinge
2016-11-13 23:20 ` [PATCH 2/4] HSA specific built-ins Martin Jambor
2016-11-18 10:27   ` Jakub Jelinek
2016-11-22 13:30     ` Martin Jambor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnesqm25.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=ams@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=julian@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).