From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050::465:202]) by sourceware.org (Postfix) with ESMTPS id 9462D385803B for ; Thu, 7 Jan 2021 16:11:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9462D385803B Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (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-202.mailbox.org (Postfix) with ESMTPS id 4DBWSG53GqzQlSw; Thu, 7 Jan 2021 17:11:10 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id bfxaUyy9jsRt; Thu, 7 Jan 2021 17:11:07 +0100 (CET) Date: Thu, 07 Jan 2021 17:11:04 +0100 From: Iain Buclaw Subject: Re: [PATCH] libphobos: Allow building libphobos using Solaris/x86 assembler To: Rainer Orth Cc: gcc-patches@gcc.gnu.org References: <20210105214349.3401864-1-ibuclaw@gdcproject.org> In-Reply-To: MIME-Version: 1.0 Message-Id: <1610035055.i2ssecfjha.astroid@galago.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-SPAM-Probability: X-Rspamd-Score: -2.63 / 15.00 / 15.00 X-Rspamd-Queue-Id: 9002F17B7 X-Rspamd-UID: 0b7b9b X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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-List-Received-Date: Thu, 07 Jan 2021 16:11:15 -0000 Excerpts from Rainer Orth's message of January 6, 2021 2:57 pm: > Hi Iain, >=20 >>> 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, thi= s >>> helped reduce the average symbol length by a factor of about 3, while >>> the longest symbol shrank from 416133 to 1142 characters. So the issue= s >>> 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= . >> >> great, thanks. I'll give this a whirl once today's regular bootstraps >> have finished. >=20 > here's what I found: the build itself worked just fine and the libphobos > test results are identical to those with gas. However, a few gdc tests > fail when Solaris/x86 as is used, for two reasons: >=20 > +UNRESOLVED: gdc.test/runnable/mangle.d compilation failed to produce e= xecutable > +UNRESOLVED: gdc.test/runnable/mangle.d -shared-libphobos compilation f= ailed to produce executable >=20 > Assembler: mangle.d > "/var/tmp//ccG72ALc.s", line 200 : Syntax error > Near line: " movzbl test_=D1=8D=D0=BB=D1=8C=D1=84=D0=B8=D0=B9= =D1=81=D0=BA=D0=B8=D0=B5_=D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5=D0=BD=D0=B0_9= , %eax" > [...] >=20 > +UNRESOLVED: gdc.test/runnable/testmodule.d compilation failed to produ= ce executable > +UNRESOLVED: gdc.test/runnable/testmodule.d -shared-libphobos compilati= on failed to produce executable >=20 > Assembler: testmodule.d > "/var/tmp//ccw9j5oa.s", line 20 : Syntax error > Near line: " call _D7dstress3run17unicode_06_=E5=93=AA=E9= =87=8C6=E5=93=AA=E9=87=8CFiZi" > [...] >=20 > +UNRESOLVED: gdc.test/runnable/ufcs.d compilation failed to produce exe= cutable > +UNRESOLVED: gdc.test/runnable/ufcs.d -shared-libphobos compilation fai= led to produce executable >=20 > Assembler: ufcs.d > "/var/tmp//ccWd6kud.s", line 7774 : Syntax error > Near line: " .globl _D4ufcs6=CE=B18503FiZv" > [...] >=20 > The Solaris assemblers don't support UTF-8 identifiers. Unless gdc can > encode them in some way for toolchains like this (no idea if this is > worth the effort), it may be possible to guard the tests with the ucn > effective-target keyword. >=20 > Apart from that, it seems strange that the failing tests should only > show up as UNSUPPORTED. I'd have expected the compilation to FAIL, but > IIRC the gdc testsuite has to ignore all output, so the test for excess > errors which would usually catch this is disabled effectively. >=20 Indeed, the testsuite is far too verbose. Although many tests have a TEST_OUTPUT directive, converting them to a Dejagnu style is probably too much effort for the gain. Those tests can just be explicitly disabled, I'll look into that. > The last failure is different and due to how COMDAT group handling is > done with Solaris as: >=20 > +UNRESOLVED: gdc.test/runnable/test42.d compilation failed to produce e= xecutable > +UNRESOLVED: gdc.test/runnable/test42.d -shared-libphobos compilation f= ailed to produce executable >=20 > which yields >=20 > Input string too long, limit 10240 >=20 > The offending input lines are (stripped for brevity) >=20 > .section .tdata._D6test42__T5Foo71VAyaa2623[...] > .group _D6test42__T5Foo71VAyaa2623_68656c6c6f616[...] >=20 > The first line is 10597 chars, the second even 15869. >=20 Is there a max symbol length macro available internally? Maybe could just compress symbols using MD5 if they exceed a certain length... Iain.