Page 1 of 1

Solaris/illumos builds and Studio dependency

Posted: 2022-10-25, 18:33
by ptribble
I guess this is one for athenian200, but here goes:

In platform/toolkit/library/moz.build (platform is a submodule, I believe) I see:

Code: Select all

if CONFIG['OS_ARCH'] == 'SunOS':
    OS_LIBS += [
        'elf',
        'demangle',
        'sendfile',
    ]
and I'm just wondering what demangle is doing there - that's the libdemangle from the Sun Studio compilers, and I'm pretty sure that compiling with a gcc toolchain won't use it. Indeed, if I run

Code: Select all

ldd -urv
on libxul.so then it shows that libdemangle isn't actually used.

I *think* removing demangle from there is safe (I wonder if the Solaris builds are the same). Just wondering if there was something I had missed.

(One of the reasons for looking at this is that there are very few things left on illumos that have any dependency on the old Studio toolchain, and I'm trying to eliminate that completely so we can just consign Studio to the dustbin of history.)

Re: Solaris/illumos builds and Studio dependency

Posted: 2022-10-25, 22:31
by athenian200
ptribble wrote:
2022-10-25, 18:33
I guess this is one for athenian200, but here goes:

In platform/toolkit/library/moz.build (platform is a submodule, I believe) I see:

Code: Select all

if CONFIG['OS_ARCH'] == 'SunOS':
    OS_LIBS += [
        'elf',
        'demangle',
        'sendfile',
    ]
and I'm just wondering what demangle is doing there - that's the libdemangle from the Sun Studio compilers, and I'm pretty sure that compiling with a gcc toolchain won't use it. Indeed, if I run

Code: Select all

ldd -urv
on libxul.so then it shows that libdemangle isn't actually used.

I *think* removing demangle from there is safe (I wonder if the Solaris builds are the same). Just wondering if there was something I had missed.

(One of the reasons for looking at this is that there are very few things left on illumos that have any dependency on the old Studio toolchain, and I'm trying to eliminate that completely so we can just consign Studio to the dustbin of history.)
Well, I was considering switching that over to whatever illumos uses now for demangling symbols at some point, but yes, technically I could just remove it. I also wasn't quite sure if it was used or not, and wasn't in a hurry to remove it without being sure of what it did and what the effect would be.

The thing that was confusing is that in the original Mozilla code I was looking at, libdemangle was meant to be used when GNU_CC was true, rather than when it was false. So in other words, it created the mistaken impression that GCC needs it, which is why I kept it in.

Re: Solaris/illumos builds and Studio dependency

Posted: 2022-10-27, 07:05
by ptribble
Thanks! I'll try removing it for my next build and see if anything bad happens.