libnetservices: Set -fvisibility=hidden (on non-legacy GCC.)

Otherwise, the symbols will be re-exported into whatever shared
libraries the static library is linked into, and potentially conflict
with other applications that also linked against some other version
of the same library and symbols.

Fixes #17134, or at least the crash portion. I couldn't get any
audio or video to play here, they seemed to just cause WebKit to
stutter and hang a lot when trying to load pages with them. Maybe
that's expected behavior, though?
This commit is contained in:
Augustin Cavalier 2021-09-07 19:32:37 -04:00
parent 5c7bfa02d0
commit 3cf06bfc6b

View File

@ -54,6 +54,13 @@ for architectureObject in [ MultiArchSubDirSetup ] {
: <$(architecture)>libshared.a
;
} else {
if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 0 {
# In order to not have conflicts between libraries built against
# different versions of libnetservices.a, prevent symbols from
# being re-exported from the static library.
SubDirC++Flags -fvisibility=hidden ;
}
StaticLibrary [ MultiArchDefaultGristFiles libnetservices.a ] :
$(sources)
Geolocation.cpp