Solaris/illumos builds and Studio dependency

For contributed third party builds not necessarily configured like the main product.
e.g. AVX builds, SSE builds, Pandora builds.
User avatar
ptribble
Moongazer
Moongazer
Posts: 8
Joined: 2021-03-14, 12:10
Contact:

Solaris/illumos builds and Studio dependency

Unread post by ptribble » 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.)

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1478
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Solaris/illumos builds and Studio dependency

Unread post by athenian200 » 2022-10-25, 22:31

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.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
ptribble
Moongazer
Moongazer
Posts: 8
Joined: 2021-03-14, 12:10
Contact:

Re: Solaris/illumos builds and Studio dependency

Unread post by ptribble » 2022-10-27, 07:05

Thanks! I'll try removing it for my next build and see if anything bad happens.

Locked