bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110451] autoconf 2.71 generated configure file does not enable C co


From: Zack Weinberg
Subject: [sr #110451] autoconf 2.71 generated configure file does not enable C compiler flag for C99 on Solaris 10
Date: Sun, 28 Feb 2021 13:57:23 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of sr #110451 (project autoconf):

                  Status:                    None => Need Info              

    _______________________________________________________

Follow-up Comment #2:

The root cause seems to be that AC_PROG_CC(_C99) *intentionally* doesn't use
-xc99 with Sun's compilers.  The test for C99 compliance was made pickier in
Autoconf 2.70, and -D_STDC_C99, which it does use, is no longer enough for
Sun's compiler to pass the test.  Commentary in c.m4 says


# Solaris       -D_STDC_C99=
#   Note: acc's -xc99 option uses linker magic to define the external
#   symbol __xpg4 as if by "int __xpg4 = 1;", which enables C99
#   behavior for C library functions.  This is not wanted here,
#   because it means that a single module compiled with -xc99 alters
#   C runtime behavior for the entire program, not for just the
#   module.  Instead, define the (private) symbol _STDC_C99, which
#   suppresses a bogus failure in <stdbool.h>.  The resulting compiler
#   passes the test case here, and that's good enough.
#   For more, please see the thread starting at:
#   https://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html


It's possible that this decision should be revisited; current-generation C
programs may well want the C99-compliant library.  On the other hand, the
library compatibility issues raised in that old thread are serious.  I would
prefer for you and other active users of Solaris to make the call.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110451>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]