]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libga68: Remove redundant CHECK_ATTRIBUTE_VISIBILITY macro
authorPietro Monteiro <pietro@sociotechnical.xyz>
Tue, 5 May 2026 00:54:45 +0000 (20:54 -0400)
committerPietro Monteiro <pietro@sociotechnical.xyz>
Fri, 8 May 2026 04:22:49 +0000 (00:22 -0400)
Use the shared macro from config/visibility.m4.

libga68/ChangeLog:

* Makefile.in: Regenerate.
* acinclude.m4: Delete LIBGA68_CHECK_ATTRIBUTE_VISIBILITY.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* configure.ac: Use GCC_CHECK_ATTRIBUTE_VISIBILITY instead of
LIBGA68_CHECK_ATTRIBUTE_VISIBILITY.

Signed-off-by: Pietro Monteiro <pietro@sociotechnical.xyz>
libga68/Makefile.in
libga68/acinclude.m4
libga68/aclocal.m4
libga68/configure
libga68/configure.ac

index 09899a8ffe2953a50536faa3e4e225fcceb618bf..28e03a5c612337b1cd477cad782b9916a75944a1 100644 (file)
@@ -125,6 +125,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
+       $(top_srcdir)/../config/visibility.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
        $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
        $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
index 5fb7e6ea754dbce79ffcbe07b98627b52a754171..6c8576d71f53998b69d6dc091f4dcf128786b380 100644 (file)
@@ -9,18 +9,3 @@ dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
 
 m4_include([m4/autoconf.m4])
-
-dnl Check whether the target supports hidden visibility.
-AC_DEFUN([LIBGA68_CHECK_ATTRIBUTE_VISIBILITY], [
-  AC_CACHE_CHECK([whether the target supports hidden visibility],
-                libga68_cv_have_attribute_visibility, [
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -Werror"
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void __attribute__((visibility("hidden"))) foo(void) { }]], [])],
-                   [libga68_cv_have_attribute_visibility=yes],
-                   [libga68_cv_have_attribute_visibility=no])
-  CFLAGS="$save_CFLAGS"])
-  if test $libga68_cv_have_attribute_visibility = yes; then
-    AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1,
-      [Define to 1 if the target supports __attribute__((visibility(...))).])
-  fi])
index 830fb238bbea5e7c2e03635b846ca2fbfd8d2c05..1fc086f52a7d293becbbabb9ffee6fb091226c2f 100644 (file)
@@ -1196,6 +1196,7 @@ m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/no-executables.m4])
 m4_include([../config/override.m4])
+m4_include([../config/visibility.m4])
 m4_include([../libtool.m4])
 m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
index fd27bd6ab6cd9ff8e02abf02010b587b56f8d088..731476fc909578aa3933f887e6b11415f69e5efe 100755 (executable)
@@ -13227,7 +13227,7 @@ CC_FOR_BUILD=${CC_FOR_BUILD:-gcc}
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5
 $as_echo_n "checking whether the target supports hidden visibility... " >&6; }
-if ${libga68_cv_have_attribute_visibility+:} false; then :
+if ${gcc_cv_have_attribute_visibility+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13245,16 +13245,16 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  libga68_cv_have_attribute_visibility=yes
+  gcc_cv_have_attribute_visibility=yes
 else
-  libga68_cv_have_attribute_visibility=no
+  gcc_cv_have_attribute_visibility=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   CFLAGS="$save_CFLAGS"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libga68_cv_have_attribute_visibility" >&5
-$as_echo "$libga68_cv_have_attribute_visibility" >&6; }
-  if test $libga68_cv_have_attribute_visibility = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_have_attribute_visibility" >&5
+$as_echo "$gcc_cv_have_attribute_visibility" >&6; }
+  if test $gcc_cv_have_attribute_visibility = yes; then
 
 $as_echo "#define HAVE_ATTRIBUTE_VISIBILITY 1" >>confdefs.h
 
index 91b5753723db232b952e8452844c2af7ab803a2d..d84088febe8a99f1b0c22c0627beff8682b5a49a 100644 (file)
@@ -171,7 +171,7 @@ CC_FOR_BUILD=${CC_FOR_BUILD:-gcc}
 AC_SUBST(CC_FOR_BUILD)
 
 # Check whether the target supports hidden visibility.
-LIBGA68_CHECK_ATTRIBUTE_VISIBILITY
+GCC_CHECK_ATTRIBUTE_VISIBILITY
 
 # Search for needed functions in host libraries.
 AC_SEARCH_LIBS([malloc], [c])