[Git][ghc/ghc][master] rts: remove obsolete HAS_VISIBILITY_HIDDEN logic
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: ef705655 by Cheng Shao at 2025-09-19T18:27:41-04:00 rts: remove obsolete HAS_VISIBILITY_HIDDEN logic This patch removes obsolete HAS_VISIBILITY_HIDDEN logic throughout the rts, given __attribute__((visibility("hidden"))) is uniformly supported by C toolchains of all platforms we currently support. - - - - - 5 changed files: - − m4/fp_visibility_hidden.m4 - rts/BeginPrivate.h - rts/EndPrivate.h - rts/configure.ac - rts/include/Rts.h Changes: ===================================== m4/fp_visibility_hidden.m4 deleted ===================================== @@ -1,16 +0,0 @@ -# FP_VISIBILITY_HIDDEN -# ---------------------------------- -# Is the visibility hidden attribute supported? -AC_DEFUN([FP_VISIBILITY_HIDDEN], -[ - AC_MSG_CHECKING([whether __attribute__((visibility("hidden"))) is supported]) - echo '__attribute__((visibility("hidden"))) void foo(void) {}' > conftest.c - if $CC -Wall -Werror -c conftest.c > /dev/null 2>&1 - then - AC_MSG_RESULT([yes]) - AC_DEFINE(HAS_VISIBILITY_HIDDEN, 1, [Has visibility hidden]) - else - AC_MSG_RESULT([no]) - fi - rm -f conftest.c conftest.o -]) ===================================== rts/BeginPrivate.h ===================================== @@ -1,10 +1 @@ -/* We don't use symbol visibility pragmas on FreeBSD, because it causes - "undefined reference" errors at link-time. The true reasons are - unknown, however FreeBSD 8.x includes GCC 4.2.1 in the base system, - which might be buggy. */ -/* On Windows, with gcc 4.5.0-1, using visibility hidden gives: - error: visibility attribute not supported in this configuration; ignored - */ -#if defined(HAS_VISIBILITY_HIDDEN) && !defined(freebsd_HOST_OS) #pragma GCC visibility push(hidden) -#endif ===================================== rts/EndPrivate.h ===================================== @@ -1,3 +1 @@ -#if defined(HAS_VISIBILITY_HIDDEN) && !defined(freebsd_HOST_OS) #pragma GCC visibility pop -#endif ===================================== rts/configure.ac ===================================== @@ -204,8 +204,6 @@ if test "$CABAL_FLAG_leading_underscore" = 1; then AC_DEFINE([LEADING_UNDERSCORE], [1], [Define to 1 if C symbols have a leading underscore added by the compiler.]) fi -FP_VISIBILITY_HIDDEN - FP_MUSTTAIL dnl ** check for librt ===================================== rts/include/Rts.h ===================================== @@ -63,11 +63,7 @@ extern "C" { // Symbols that are extern, but private to the RTS, are declared // with visibility "hidden" to hide them outside the RTS shared // library. -#if defined(HAS_VISIBILITY_HIDDEN) #define RTS_PRIVATE GNUC3_ATTRIBUTE(visibility("hidden")) -#else -#define RTS_PRIVATE /* disabled: RTS_PRIVATE */ -#endif #if __GNUC__ >= 4 #define RTS_UNLIKELY(p) __builtin_expect((p),0) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ef7056554df5603ec4d1e33193abe953... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ef7056554df5603ec4d1e33193abe953... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)