From patchwork Fri Jan 24 14:59:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1228856 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=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-518221-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=KFKCIAJc; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4842P92fFvz9sRK for ; Sat, 25 Jan 2020 01:59:57 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=llPqWEZS0bMaCZJAXFosvN8sNmb1I8EoeMFbQVYbfXE8fPzJ6AiXu f9jkMOyXCyUurfcgPocnMWw0QlA1NDZhb0i67kKqL/V3AUJp8DDQAqPahI0XgNZO g/AjXOOXfPih1c43hz4ZmY775UYZrjNUFm5YwCJsJC5GqAd/DDAfAg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=5yeWzVWXN6qUT88/o23k/tG8Sqs=; b=KFKCIAJcow8H2QbFmsZn LFMIv+SEpW10XwEOyORHcepe0ae6B4ZTqtcAh2lNmF983jrZ+JAKji+N/QNsGJK8 Y5lXPMdi9k0iB1APeWZaXSJGC94T/zZyg+EGDBCG2kPqssHOeuVW4shbBAfnIN3J Lfiheuqm1VFoAyoaifugBlQ= Received: (qmail 88930 invoked by alias); 24 Jan 2020 14:59:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 88922 invoked by uid 89); 24 Jan 2020 14:59:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SUBJ_OBFU_PUNCT_FEW autolearn=ham version=3.3.1 spammy= X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Jan 2020 14:59:40 +0000 IronPort-SDR: TMGeorm+nuLeQxMD/FU+oJSxfjq3HgEu9ajFsCBFUJYOC4Ju+t0T3aLlU3skAlN/CGTuSxid/F /4O06HBbsFGX4+28Gl/xgyF6V/iZEBgfoyCg4qS/x2BiyZlfoJrBWd7J/v9V1PfOpdlAHpawrt 2jhqz6T5dMkdV12ui50UZr3bLl5t3tx0bFKHSB/svDib2uYk+wT1noV5NSlG5jXNBOTm2ZIbI9 7TTiimRZj/CbrPnhOrKfqr2RaMDvl/Sxo1k8LTusvdejbGC4R5dBT9txPy8JkIeOFMuveNWUGk XGM= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 24 Jan 2020 06:59:38 -0800 IronPort-SDR: V5G7sek9pXUKoec9PYPWl0gTIyR0Y2Ew6Rx/y3o0aMmlKvdUbqlW8cA+WGj1TZSDMvQ3QIwH1i JCBldmVd36Vg== From: Tobias Burnus Subject: [Patch] [libgomp, build] Skip plugin-{gcn, hsa} for (-m)x32 (PR bootstrap/93409) To: Andrew Stubbs , gcc-patches , Jakub Jelinek , =?utf-8?q?Martin_Li=C5=A1ka?= Message-ID: <2bf0822d-0113-52f9-c81d-8f6692c61bff@codesourcery.com> Date: Fri, 24 Jan 2020 15:59:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 X-IsSubscribed: yes 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 ;; *)