aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-03-07 08:58:47 +0800
committerH.J. Lu <hjl.tools@gmail.com>2025-03-07 09:34:34 +0800
commit9b91484bee8f6f1bf1e2d26a8df461b553784528 (patch)
tree964a161290261066dd75d986920d4f04837d71d5 /configure.ac
parent4e68a5ca5da468c7e8a710a94455d5b27722f8e6 (diff)
downloadglibc-9b91484bee8f6f1bf1e2d26a8df461b553784528.tar.xz
glibc-9b91484bee8f6f1bf1e2d26a8df461b553784528.zip
elf: Check if __attribute__ ((aligned (65536))) is supported
The BZ #32763 tests fail to build for MicroBlaze (which defines MAX_OFILE_ALIGNMENT to (32768*8) in GCC, so __attribute__ ((aligned (65536))) is unsupported). Add a configure-time check to enable BZ #32763 tests only if __attribute__ ((aligned (65536))) is supported. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7d04b54c98..5f6f0b72bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1824,6 +1824,17 @@ if test $libc_cv_builtin_trap = yes; then
AC_DEFINE([HAVE_BUILTIN_TRAP])
fi
+dnl Check if
+AC_CACHE_CHECK([whether the compiler supports __attribute__ ((aligned (65536)))],
+ libc_cv_aligned_65536, [
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+char bss[0xb5dce8] __attribute__ ((aligned (65536)));
+])],
+ [libc_cv_aligned_65536=yes],
+ [libc_cv_aligned_65536=no])
+])
+LIBC_CONFIG_VAR([aligned-65536], [$libc_cv_aligned_65536])
+
dnl C++ feature tests.
AC_LANG_PUSH([C++])