From patchwork Tue Jan 5 21:43:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1422734 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=lLnpHFUz; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D9QxP6Rxmz9sSC for ; Wed, 6 Jan 2021 08:44:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 001C3388187C; Tue, 5 Jan 2021 21:44:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 001C3388187C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1609883045; bh=nA1hjiBRzJnKb1jpIXBu7bFBXq2EGh3BA4ywILvW92E=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lLnpHFUz/7ThwDAzyl8khjupeAOwlfasenE7UM6TTlkn6ft8kb3YOTElJmSJ26Lpp S5c7+N/HaqoxhZamO3FycoP1ZPO7F7bO3VQg+mnrcYTQMrqesUupKwa6zUqRTVKKkK ZEtl2K6gB8wjXVpRg7gi0CsKdgXHqdvz0IYaPUyE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050::465:102]) by sourceware.org (Postfix) with ESMTPS id E7F21383E82B for ; Tue, 5 Jan 2021 21:43:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E7F21383E82B Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4D9QxB0FsDzQkLK; Tue, 5 Jan 2021 22:43:58 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id n5CtxP-ktUdC; Tue, 5 Jan 2021 22:43:52 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [PATCH] libphobos: Allow building libphobos using Solaris/x86 assembler Date: Tue, 5 Jan 2021 22:43:49 +0100 Message-Id: <20210105214349.3401864-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -0.53 / 15.00 / 15.00 X-Rspamd-Queue-Id: 0C4B61778 X-Rspamd-UID: 15649a X-Spam-Status: No, score=-15.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch removes the disabling of libphobos when the Solaris/x86 assembler is being used. Since r11-6373, D symbols are now compressed using back references, this helped reduce the average symbol length by a factor of about 3, while the longest symbol shrank from 416133 to 1142 characters. So the issues that were seen on Solaris/x86 should no longer be a problem. However, I have only used x86_64-apple-darwin10 for testing, as libphobos couldn't be built on that target for the same reason, except it was the system linker segfaulting due to long symbol names. It would be good to know if Solaris has also benefitted from the change. Regards Iain. --- libphobos/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (x86_64-*-solaris2.* | i?86-*-solaris2.*): Remove disabling of libphobos when using Solaris/x86 assembler. * libdruntime/Makefile.in: Regenerate. --- libphobos/Makefile.in | 2 +- libphobos/configure | 12 ------------ libphobos/configure.ac | 12 ------------ libphobos/libdruntime/Makefile.in | 2 +- 4 files changed, 2 insertions(+), 26 deletions(-) diff --git a/libphobos/Makefile.in b/libphobos/Makefile.in index a1395929819..d42248405a2 100644 --- a/libphobos/Makefile.in +++ b/libphobos/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # Makefile for the toplevel directory of the D Standard library. -# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # GCC is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/configure b/libphobos/configure index a7fb5edb90f..d6e1d7463bb 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -15422,18 +15422,6 @@ $as_echo_n "checking for host support for libphobos... " >&6; } . ${srcdir}/configure.tgt case ${host} in x86_64-*-solaris2.* | i?86-*-solaris2.*) - # libphobos doesn't compile with the Solaris/x86 assembler due to a - # relatively low linelength limit. - as_prog=`$CC -print-prog-name=as` - if test -n "$as_prog" && $as_prog -v /dev/null 2>&1 | grep GNU > /dev/null 2>&1; then - druntime_cv_use_gas=yes; - else - druntime_cv_use_gas=no; - fi - rm -f a.out - if test x$druntime_cv_use_gas = xno; then - LIBPHOBOS_SUPPORTED=no - fi # 64-bit D execution fails with Solaris ld without -z relax=transtls support. if test "$druntime_ld_gld" = "no" && test "$druntime_ld_relax_transtls" = "no"; then LIBPHOBOS_SUPPORTED=no diff --git a/libphobos/configure.ac b/libphobos/configure.ac index cc9af29754f..254871f0a6c 100644 --- a/libphobos/configure.ac +++ b/libphobos/configure.ac @@ -185,18 +185,6 @@ AC_MSG_CHECKING([for host support for libphobos]) . ${srcdir}/configure.tgt case ${host} in x86_64-*-solaris2.* | i?86-*-solaris2.*) - # libphobos doesn't compile with the Solaris/x86 assembler due to a - # relatively low linelength limit. - as_prog=`$CC -print-prog-name=as` - if test -n "$as_prog" && $as_prog -v /dev/null 2>&1 | grep GNU > /dev/null 2>&1; then - druntime_cv_use_gas=yes; - else - druntime_cv_use_gas=no; - fi - rm -f a.out - if test x$druntime_cv_use_gas = xno; then - LIBPHOBOS_SUPPORTED=no - fi # 64-bit D execution fails with Solaris ld without -z relax=transtls support. if test "$druntime_ld_gld" = "no" && test "$druntime_ld_relax_transtls" = "no"; then LIBPHOBOS_SUPPORTED=no diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in index 99ee8b92afa..1163207a138 100644 --- a/libphobos/libdruntime/Makefile.in +++ b/libphobos/libdruntime/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # Makefile for the D runtime library. -# Copyright (C) 2012-2020 Free Software Foundation, Inc. +# Copyright (C) 2012-2021 Free Software Foundation, Inc. # # GCC is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by