Excerpts from Rainer Orth's message of January 6, 2021 2:57 pm:
> Hi Iain,
> 
>>> 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.
>>
>> great, thanks.  I'll give this a whirl once today's regular bootstraps
>> have finished.
> 
> 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:
> 
> +UNRESOLVED: gdc.test/runnable/mangle.d   compilation failed to produce 
> executable
> +UNRESOLVED: gdc.test/runnable/mangle.d -shared-libphobos   compilation 
> failed to produce executable
> 
> Assembler: mangle.d
>         "/var/tmp//ccG72ALc.s", line 200 : Syntax error
>         Near line: "    movzbl  test_эльфийские_письмена_9, %eax"
> [...]
> 
> +UNRESOLVED: gdc.test/runnable/testmodule.d   compilation failed to produce 
> executable
> +UNRESOLVED: gdc.test/runnable/testmodule.d -shared-libphobos   compilation 
> failed to produce executable
> 
> Assembler: testmodule.d
>         "/var/tmp//ccw9j5oa.s", line 20 : Syntax error
>         Near line: "    call    _D7dstress3run17unicode_06_哪里6哪里FiZi"
> [...]
> 
> +UNRESOLVED: gdc.test/runnable/ufcs.d   compilation failed to produce 
> executable
> +UNRESOLVED: gdc.test/runnable/ufcs.d -shared-libphobos   compilation failed 
> to produce executable
> 
> Assembler: ufcs.d
>         "/var/tmp//ccWd6kud.s", line 7774 : Syntax error
>         Near line: "    .globl  _D4ufcs6α8503FiZv"
> [...]
> 
> 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.
> 
> 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.
> 

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:
> 
> +UNRESOLVED: gdc.test/runnable/test42.d   compilation failed to produce 
> executable
> +UNRESOLVED: gdc.test/runnable/test42.d -shared-libphobos   compilation 
> failed to produce executable
> 
> which yields
> 
> Input string too long, limit 10240
> 
> The offending input lines are (stripped for brevity)
> 
>       .section        .tdata._D6test42__T5Foo71VAyaa2623[...]
>       .group  _D6test42__T5Foo71VAyaa2623_68656c6c6f616[...]
> 
> The first line is 10597 chars, the second even 15869.
> 

Is there a max symbol length macro available internally?  Maybe could
just compress symbols using MD5 if they exceed a certain length...

Iain.

Reply via email to