From patchwork Thu Aug 8 13:10:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 1970556 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=SpYM8lvq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WfnTz3pR5z1yfC for ; Thu, 8 Aug 2024 23:10:45 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DEA1385DDE4 for ; Thu, 8 Aug 2024 13:10:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on20601.outbound.protection.outlook.com [IPv6:2a01:111:f403:2409::601]) by sourceware.org (Postfix) with ESMTPS id 0C96A385842A for ; Thu, 8 Aug 2024 13:10:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C96A385842A Authentication-Results: sourceware.org; dmarc=fail (p=reject dis=none) header.from=nvidia.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nvidia.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0C96A385842A Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2409::601 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1723122617; cv=pass; b=jk5B46/nyD0uMLGgktsm9IdJvAGlglrzaEkJYFM6skOEgOdZEoqZdBv1+jjrIoDbWAWAi7Kiawp6Q2leUtJlPCioKRbXnjrFVwpbRa+sJci6f57JB9vblvwsOAx2IbOqrz2o/XLGLT4RACx0mv3vvcd+2P7kheXZ51iypZdH7nA= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1723122617; c=relaxed/simple; bh=3TklBBcA6Q0E0oC63uEdHvipmssKfIoHg1dXAeKMEnQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=XnaTOCrqdM2Y0DBeRbwEhqd6WOvcBYPc+alXj+BS/14df8G1hASjIBbnDq+iR8RVzhQhbClF6+CRdj0kl1CDq8Z9Ta8Yoe8/DuYbvORmFRyYQqOJLSVIDVmz7z0wvQm6demMnjm+XsrDHWlsddC563ulYcbxD/7CbVzckflrEIw= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Jdh5ggHPjN2cDDa+jrfd4+TcXndbFY3/YAPzzTJhUP8SzjP+nDu6KcALjUb9u7cfr2v8MMOTtKhJ+vzmNuIovkMNgMKfhKI04uRBa891GbSMQ6MrJWSuMYxZLiTiMsL2p0LEg+a9/AbS9MLJnOqHfXfm5t6WibCXTzUVaWAATsjg2biuuKhhefPLXnNwgO9AgrSTfqnxIeJg55Xf1OfS9oQPkvZ/GUAA4nMotvQjjkT437ovzB9nWziPg06QIAb79uuX8pxcpVGmj1OHiqQz0N+7TeSQf7TEWAC+8JFCaC7RhF9LjCZaPj6M79uyBZ7+NeESH+IjhXkHqJ3c+Mk0Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qUP8QODzz2MCFB6YrsOrH4lG7RGcnJ0lYUsVG7hWzxc=; b=bpNVcEFavibTTwlGYO4cu2qwqatW+Nyp0iqpoi8YndlV/3uBt0kHtv+nt9K/qpfO6us/z6AZXI9Y05xL5PIdQXS7KoIBz7bPWnLwBKc4TSLKMu22pOwqFZSHm4KNjZ9gUFaERI8gDdTFgpBPl/fWxAGs7/y5naf1sceHk4cIHGJ3sQccZL2SLkYcX6VfcrA0MCXnKLPom10PHhvVLjklFsx2QdGfEUvsQrG9Oh6fjpcbQ3hd5HNJ1ZnLOI9fOpzZpknWdzPcJ9eiHx7IsgiI0N/s0Y5YmIpfvdhFYNnk++ylj3AmuxUvb76PU3A4fXkya8UNzBE7mH/afxPKXh2OgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qUP8QODzz2MCFB6YrsOrH4lG7RGcnJ0lYUsVG7hWzxc=; b=SpYM8lvqrHAqVBBvBGcC5fO3ilPvteqR1tPphBZaNB+WYVnbvYpqGuVmESVBni8XKQNiDV47SiCyacQw1JYUsTqgYMky41jJl4jlA9YgmPWn2aBjFxtZWd3AQ5j5xYQQ9Fx2cVboaL2C6YRphglTtRBK0VYf4hTIOvbGKGYCjbWwkVXQAs4CbxqQO/5QQcq3JCNve9oerR/IPCsyZ1N6UoySC9vLmWDBdZEspJANOJ4z+miTXbWHj8khaB8TQD4IX6mi0BXDZxa1G/fa5XMyJqyCK1T+xwU+j4QvA6N/YXGrPMEs4WhJl3Y7reRPZvi9Hfa+paxfZSVfccs7u4Rdow== Received: from IA1PR12MB9031.namprd12.prod.outlook.com (2603:10b6:208:3f9::19) by CH2PR12MB4072.namprd12.prod.outlook.com (2603:10b6:610:7e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.12; Thu, 8 Aug 2024 13:10:08 +0000 Received: from IA1PR12MB9031.namprd12.prod.outlook.com ([fe80::1fb7:5076:77b5:559c]) by IA1PR12MB9031.namprd12.prod.outlook.com ([fe80::1fb7:5076:77b5:559c%3]) with mapi id 15.20.7849.008; Thu, 8 Aug 2024 13:10:08 +0000 From: Prathamesh Kulkarni To: "rguenther@suse.de" , "gcc-patches@gcc.gnu.org" Subject: [nvptx] Pass -m32/-m64 to host_compiler if it has multilib support Thread-Topic: [nvptx] Pass -m32/-m64 to host_compiler if it has multilib support Thread-Index: Adrpjl/INOEJ85hEQVG2vAYH4ni3zA== Date: Thu, 8 Aug 2024 13:10:08 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR12MB9031:EE_|CH2PR12MB4072:EE_ x-ms-office365-filtering-correlation-id: b1f4adce-f178-4667-c6e9-08dcb7ab6d9f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: YRw8YKoW1F62nvlzRf8Lf/7o9fZlNXexf5eL5h+qAgsBbaYHbjNGHTalK6wN91bxzNGZNYtDoYEp2XQTog/FILme6yue4Wp012ioDqdPLkWzDU+0YMAOUZ3uJPIn2pQCRVFtDeOe1rBYiqrf69fIsEgGN1k0h2yM4TmruW955Yo4QYAcAbVj5A8Yu3Ci0R7nnqaVvpkb73oX+PVzLAi6Fc7+grdu4pv2ACFvNQ2tuC/AKa8kscZ4PtSDuDEUjOGXPaUU8YBp3U6m0EolJB6h+Qg1A76EeNfiV6yPH5f5rfyQcTf5EhbYkYWng0kZ7h9ZOEZdvE5eP6eHwGJGbUblooN7Iq2wIpPDNPCsLiByPMcTd8q3fWE6QOM3CO0Wyx8qh0GtB5cCI0cNBs4IYAytREYToOW9Pf9Zjy8XtRjTLE/8M9ml1KecLGzYZTPNnJnPg6XIDPVvLL0zDOm2Cvv/gOrlfxyAk+5Pt6YRHGXUMpfS/UWqkM+BaA9+BvFmNlUhbV859v5iuwBOKvxmNY9Ld8a/9RQ+s/VmQA9m2IkHMKCHSxa9nv5X82hlT53sCXDeiwE2A3sSk4sOb22qPweVaNaiYIMpGOTTn6o9yryki3TJHyAjnDUtoF7JGoTdb6upmS6YapRBrSLc5rqTIXuINji1ybAj8Q1s8e6SEWEIinlDJ8xHPgmxGlXm/uxe3umTsFcSCtF2Bz5ggAtL3JCZ+dBrvrqDRjvEZIypxgjjAYeq7I6byDlKU4qcN9fZJse5QpDcqhTP7jt7DF5EOySe+KSSmCuiGblrDC+Oab12T9s+6Z52S/rNbH6htNbeAkUkTTSuOTzpPaAatTrF3dSpX7MU70fiYqAll2E26SaUGgrl/ocJRQk6ZPrP3nid6YvySdEjDscaZBi34RANDOPMaGh1kLqpzjIaaKcovKoWbSt24SYC0TbRvJO704q5YDTA/sFWFf8HJYmAQqksoTQE+r8LciBUNSHu67tWC3NKPuFSywTeaHZCOcWQt0VLBeJuav0HKLUsjnaOO0srIzGFQKsUWa20vZoDU8B/55x4n+eVuNo1fE7mKeq4Xxsu3W6Ss7FsL/PxNtNCgni80wa34i1Udc8nPhmrq8t47Wj8sFzXou8BKyzbaDjNJK6mQU4XsbB3KHCcvSm8MQs3uxmMcaSkQc19uKwzAtr4rMMooObfMP/9baB7HCpWCuCo/1jBZerRVkrvVU6OccKgy5LmJ60un9hg2oWIpN6jVN5C2A6gWrIX828d6SjB5fupaGdQcsC5iSqIWrX/J1x3Dq18V0mgU5zykAkwTSBcNqTmWg4hLdvT2hlZ50X8aHFiFJzw6I9bgPjRGofbl2P6jYITtu0HbYCgRc0TYDBfuH5XvPn6qbHTuZURrb7TVRaRMgOMao5hpsKNlJAlxLy1INTy8A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB9031.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: t/cmRj5N1JJK+3TUPG9tkb804SqrG9vBY+gxIU8ovsRlvKnJnptw7q+fFz77yz8u3uxrm9ku4oem7p27CnTYTUfJaRgXC6ef1d0ii7gVsEUwPUg0mbs2WdbaLv7FsFp19m5lR5kYKBRCTmV6BkPh1FutQzkl11VublSed2UcpTRRhF/1DPGDm0ysBAQyEQ8GEv7UcrtAz8vQLRSv/8L0xnODXN91ulLUYiUgmnBeW0o676swhAiIERqTprqhRoRs/ZMcvpDAwjROdpSdtW1cC6mu92yrdIljM+06+fUJy8YNX/TqR3+91T1ffh9MFjahCRVkKp7j3VktD5fHDe0Ii/pOOF1lUQlpxBMbe6JOX3QkT8qb1ZphTYoeqw5B74CU0+eIpCEzUzfJQYjpLjeH4/q7mq0cWLdd9efSU4m9YdZ/sUbnFt/rL0otzduGPWFhbW2/Lbm3ga/KE01oCHb1ew7khiGs3ltfIxuVPC0IjPQerI+LZ0Fnt+IaIYYDXNJszAGI/hFx00xRpy2fWPyT1apg9VpIt3l3Yo96NmkO7ja3BSvxnPBTrotYpQ9d0chBZ58XAgMry3eHa0cdwGG37A1ye2s7icBMWx1ncbAvpj96anhYDphgTRpyuJLvFvnYWHPCcTa6Fj2wgap08HAWJ4k3BkKQNYziCcQo/hT28L2JcdGQsz2A8MIZBOTVpGG+3pxNsmU2JJuNkRrojpYYswGjDfHK0HtLf2JlP55HbjkvLytHi2N2AaqkMJZRMEuUkjhCeF2652WkhZuJKFHja7YEeotVEvCobGawCcLtM63j3MIup5H/IaAaL12rpm3NfreL8ZU0c7JUJF1KryjvE0MVA0HfJOPckV38MhBMya0ucjJ8q+tSGORMk5+yWY81ZNm0kKEQ1awBJFPZdrEwdwmYZqCOKpQWhRDELkJHUZWk0JHnBqI4snO1dqfbdO9eIgvpFw7BRwsGtd9PtuLAqhhlJ5MCbViVMtM84iOt4fGVvFi0coFXDrEvsbcyd0kkYN5diOL/zbJu10PzD5EMuYbW2CET0BTKkJ1NHvSoTnrFd9hzd8ba8MSBncrixc2b6gMyYdClIPxzoX/9ZE8AnVNlvUrrn93K2FISjE5feGWWLpXaA0Y7hTmaqeGZ5yCp24f9lZKBb1DVSVDbGXt+Lop38zQf2i2dBdz4GdSq+nrSDhI2GK78nthR2ZV/SCu7HyhtbZ+DmB56RBIAd79b2WYh1Ci4h76J055Ff5Cd5xH3EI+OBQOUZpvLpvfehh/FLka/Ge6RGwMv5J4ofHAW8g0sLU0+10QOLDjOqDJVcP1xBqAwdM+9WH3p3rONrVecB0WxbZ2tPQgewoZ29CSb+w5LN8YHCN9ijPPeCz3BV7mX5D7rcaOyYzDIvluKGJhYtKeQpl5QFbZR4IH1ZAdreUuYdo9nURn5RgnPRPrwYN/3I7zNzS4UoYZuxbpCQsoamZ8WH49thxyjI+YP0DzQYDJ5mpqGWTqzccrN95Qqj1fqn4fLJngWh8Kmp3Y1BmsyGUh6drPvbQZxsh3yJiAHlkQPOOAu7d4NCH4XmKw0t+sm9FJJEM2/LBZZwTc4NSDH MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB9031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1f4adce-f178-4667-c6e9-08dcb7ab6d9f X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2024 13:10:08.5716 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Kxse0kM6m04JiyhTBr6d2luAU+DM6fcNBrUB5+Spis1ooUAeFa+iNcfJR1pbThDaEy7boRNwIpPM/IUf1H6UrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4072 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi Richard, After differing NUM_POLY_INT_COEFFS fix for AArch64/nvptx offloading, the following minimal test: int main() { int x; #pragma omp target map(x) x = 5; return x; } compiled with -fopenmp -foffload=nvptx-none now fails with: gcc: error: unrecognized command-line option '-m64' nvptx mkoffload: fatal error: ../install/bin/gcc returned 1 exit status compilation terminated. As mentioned in RFC email, this happens because nvptx/mkoffload.cc:compile_native passes -m64/-m32 to host compiler depending on whether offload_abi is OFFLOAD_ABI_LP64 or OFFLOAD_ABI_ILP32, and aarch64 backend doesn't recognize these options. Based on your suggestion in: https://gcc.gnu.org/pipermail/gcc/2024-July/244470.html, The attached patch generates new macro HOST_MULTILIB derived from $enable_as_accelerator_for, and in mkoffload.cc it gates passing -m32/-m64 to host_compiler on HOST_MULTILIB. I verified that the macro is set to 0 for aarch64 host (and thus avoids above unrecognized command line option error), and is set to 1 for x86_64 host. Does the patch look OK ? Signed-off-by: Prathamesh Kulkarni Thanks, Prathamesh [nvptx] Pass -m32/-m64 to host_compiler if it has multilib support. gcc/ChangeLog: * configure.ac: Generate new macro HOST_MULTILIB. * config.in: Regenerate. * configure: Likewise. * config/nvptx/mkoffload.cc (compile_native): Gate appending "-m32"/"-m64" to argv_obstack on HOST_MULTILIB. (main): Likewise. Signed-off-by: Prathamesh Kulkarni Signed-off-by: Prathamesh Kulkarni Signed-off-by: Prathamesh Kulkarni Signed-off-by: Prathamesh Kulkarni Signed-off-by: Prathamesh Kulkarni Signed-off-by: Prathamesh Kulkarni Signed-off-by: Prathamesh Kulkarni diff --git a/gcc/config.in b/gcc/config.in index 7fcabbe5061..3c509356f0a 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -2270,6 +2270,12 @@ #endif +/* Define if host has multilib support. */ +#ifndef USED_FOR_TARGET +#undef HOST_MULTILIB +#endif + + /* Define which stat syscall is able to handle 64bit indodes. */ #ifndef USED_FOR_TARGET #undef HOST_STAT_FOR_64BIT_INODES diff --git a/gcc/config/nvptx/mkoffload.cc b/gcc/config/nvptx/mkoffload.cc index 503b1abcefd..f7d29bd5215 100644 --- a/gcc/config/nvptx/mkoffload.cc +++ b/gcc/config/nvptx/mkoffload.cc @@ -607,17 +607,18 @@ compile_native (const char *infile, const char *outfile, const char *compiler, obstack_ptr_grow (&argv_obstack, ptx_dumpbase); obstack_ptr_grow (&argv_obstack, "-dumpbase-ext"); obstack_ptr_grow (&argv_obstack, ".c"); - switch (offload_abi) - { - case OFFLOAD_ABI_LP64: - obstack_ptr_grow (&argv_obstack, "-m64"); - break; - case OFFLOAD_ABI_ILP32: - obstack_ptr_grow (&argv_obstack, "-m32"); - break; - default: - gcc_unreachable (); - } + if (HOST_MULTILIB) + switch (offload_abi) + { + case OFFLOAD_ABI_LP64: + obstack_ptr_grow (&argv_obstack, "-m64"); + break; + case OFFLOAD_ABI_ILP32: + obstack_ptr_grow (&argv_obstack, "-m32"); + break; + default: + gcc_unreachable (); + } obstack_ptr_grow (&argv_obstack, infile); obstack_ptr_grow (&argv_obstack, "-c"); obstack_ptr_grow (&argv_obstack, "-o"); @@ -761,17 +762,18 @@ main (int argc, char **argv) if (verbose) obstack_ptr_grow (&argv_obstack, "-v"); obstack_ptr_grow (&argv_obstack, "-xlto"); - switch (offload_abi) - { - case OFFLOAD_ABI_LP64: - obstack_ptr_grow (&argv_obstack, "-m64"); - break; - case OFFLOAD_ABI_ILP32: - obstack_ptr_grow (&argv_obstack, "-m32"); - break; - default: - gcc_unreachable (); - } + if (HOST_MULTILIB) + switch (offload_abi) + { + case OFFLOAD_ABI_LP64: + obstack_ptr_grow (&argv_obstack, "-m64"); + break; + case OFFLOAD_ABI_ILP32: + obstack_ptr_grow (&argv_obstack, "-m32"); + break; + default: + gcc_unreachable (); + } if (fopenmp) obstack_ptr_grow (&argv_obstack, "-mgomp"); diff --git a/gcc/configure b/gcc/configure index 557ea5fa3ac..cdfa06f0c80 100755 --- a/gcc/configure +++ b/gcc/configure @@ -931,6 +931,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1115,6 +1116,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1367,6 +1369,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1504,7 +1515,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1657,6 +1668,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -6227,7 +6239,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -6273,7 +6285,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -6297,7 +6309,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -6342,7 +6354,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -6366,7 +6378,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -8308,6 +8320,21 @@ $as_echo "#define ACCEL_COMPILER 1" >>confdefs.h program_transform_name=`echo $program_transform_name | sed $sedscript` accel_dir_suffix=/accel/${target_noncanonical} real_target_noncanonical=${enable_as_accelerator_for} + + case $real_target_noncanonical in + aarch64*) + host_multilib=0 + ;; + *) + host_multilib=1 + ;; + esac + + +cat >>confdefs.h <<_ACEOF +#define HOST_MULTILIB $host_multilib +_ACEOF + fi @@ -21406,7 +21433,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 21409 "configure" +#line 21436 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -21512,7 +21539,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 21515 "configure" +#line 21542 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index eaa01d0d7e5..c20646c2f80 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1153,6 +1153,18 @@ if test x"$enable_as_accelerator_for" != x; then program_transform_name=`echo $program_transform_name | sed $sedscript` accel_dir_suffix=/accel/${target_noncanonical} real_target_noncanonical=${enable_as_accelerator_for} + + case $real_target_noncanonical in + aarch64*) + host_multilib=0 + ;; + *) + host_multilib=1 + ;; + esac + + AC_DEFINE_UNQUOTED(HOST_MULTILIB, $host_multilib, + [Define if host has multilib support.]) fi AC_SUBST(enable_as_accelerator) AC_SUBST(real_target_noncanonical)