As reported in PR93409, the build of libgomp/plugin/plugin-gcn.c fails with a bunch of error messages when building with --with-multilib-list=m32,m64,mx32

The reason is that the GCN plugin assumes 64bit pointers. As with HSA, the build is only enabled for x86-64 and "-m32" is excluded. — However, it seems as if it makes sense to exclude also "-mx32".

This patch was tested with -m32/-m64 multilib as I do not have a -mx32 setup.
OK for the trunk?

Tobias

PS: PowerPC support for ROCm was recently added, cf. https://www.phoronix.com/scan.php?page=news_item&px=AMDKFD-Compute-POWERPC — And, if I understood it correctly, 32bit support would be possible but requires work on multiple ends and no one works on it.

	PR bootstrap/93409
	* plugin/configfrag.ac (enable_offload_targets): Skip
	HSA and GCN plugin besides -m32 also for -mx32.
	* configure: Regenerate.

diff --git a/libgomp/configure b/libgomp/configure
index 04a6fd96610..404b677e5f1 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -14991,7 +14991,7 @@ fi
 
 # Plugins for offload execution, configure.ac fragment.  -*- mode: autoconf -*-
 #
-# Copyright (C) 2014-2019 Free Software Foundation, Inc.
+# Copyright (C) 2014-2020 Free Software Foundation, Inc.
 #
 # Contributed by Mentor Embedded.
 #
@@ -15320,7 +15320,7 @@ rm -f core conftest.err conftest.$ac_objext \
 	case "${target}" in
 	  x86_64-*-*)
 	    case " ${CC} ${CFLAGS} " in
-	      *" -m32 "*)
+	      *" -m32 "*|*" -mx32 "*)
 	        PLUGIN_HSA=0
 		;;
 	      *)
@@ -15360,7 +15360,7 @@ rm -f core conftest.err conftest.$ac_objext \
 	case "${target}" in
 	  x86_64-*-*)
 	    case " ${CC} ${CFLAGS} " in
-	      *" -m32 "*)
+	      *" -m32 "*|*" -mx32 "*)
 		PLUGIN_GCN=0
 		;;
 	      *)
diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac
index 9a424aa1c9c..fc91702a434 100644
--- a/libgomp/plugin/configfrag.ac
+++ b/libgomp/plugin/configfrag.ac
@@ -211,7 +211,7 @@ if test x"$enable_offload_targets" != x; then
 	case "${target}" in
 	  x86_64-*-*)
 	    case " ${CC} ${CFLAGS} " in
-	      *" -m32 "*)
+	      *" -m32 "*|*" -mx32 "*)
 	        PLUGIN_HSA=0
 		;;
 	      *)
@@ -251,7 +251,7 @@ if test x"$enable_offload_targets" != x; then
 	case "${target}" in
 	  x86_64-*-*)
 	    case " ${CC} ${CFLAGS} " in
-	      *" -m32 "*)
+	      *" -m32 "*|*" -mx32 "*)
 		PLUGIN_GCN=0
 		;;
 	      *)

Reply via email to