]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix -Wno-ignored-attributes configure check
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 17 Oct 2025 19:13:13 +0000 (16:13 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 20 Oct 2025 14:33:54 +0000 (11:33 -0300)
The configure check always fail with clang:

conftest.c:5:58: error: expected string literal as argument of 'alias' attribute
    5 | extern __typeof (__foo) foo __attribute__ ((weak, alias (__foo)));
      |                                                          ^
conftest.c:6:58: error: expected string literal as argument of 'alias' attribute
    6 | extern __typeof (__foo) bar __attribute__ ((weak, alias (foo)));
      |                                                          ^

Reviewed-by: Sam James <sam@gentoo.org>
configure
configure.ac

index 222f04db220ddf6849ccd8f40e431233cc9d52db..25413727e3928fddaf86f7c6b8947a2c2b12ee18 100755 (executable)
--- a/configure
+++ b/configure
@@ -7548,8 +7548,8 @@ conftest_code="
 void __foo (void)
 {
 }
-extern __typeof (__foo) foo __attribute__ ((weak, alias ("__foo")));
-extern __typeof (__foo) bar __attribute__ ((weak, alias ("foo")));
+extern __typeof (__foo) foo __attribute__ ((weak, alias (\"__foo\")));
+extern __typeof (__foo) bar __attribute__ ((weak, alias (\"foo\")));
 "
 
 cat > conftest.c <<EOF
index af57b0cbae8c1b22bfdc7a4e47d46c4e5064873a..78b6c70b4c94c5346b5b491645d4fef8588abb01 100644 (file)
@@ -1428,8 +1428,8 @@ conftest_code="
 void __foo (void)
 {
 }
-extern __typeof (__foo) foo __attribute__ ((weak, alias ("__foo")));
-extern __typeof (__foo) bar __attribute__ ((weak, alias ("foo")));
+extern __typeof (__foo) foo __attribute__ ((weak, alias (\"__foo\")));
+extern __typeof (__foo) bar __attribute__ ((weak, alias (\"foo\")));
 "
 LIBC_TRY_CC_AND_TEST_CC_COMMAND([if -Wno-ignored-attributes is required for aliases],
   [$conftest_code],