From: Florian Weimer <fweimer@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH wwwdocs] gcc-14: Some very common historic Autoconf probes that no longer work
Date: Sat, 17 Feb 2024 10:53:40 +0100 [thread overview]
Message-ID: <87r0hb4dsr.fsf@oldenburg.str.redhat.com> (raw)
---
htdocs/gcc-14/porting_to.html | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html
index 123b5e9f..ab65c5e7 100644
--- a/htdocs/gcc-14/porting_to.html
+++ b/htdocs/gcc-14/porting_to.html
@@ -437,6 +437,49 @@ issues addressed in more recent versions.) Versions before 2.69 may
have generic probes (for example for standard C support) that rely on
C features that were removed in C99 and thus fail with GCC 14.
+<p>
+Older Autoconf versions (for example, Autoconf 2.13) generate core
+probes that are incompatible with C99. These include the basic
+compiler functionality check:
+
+<pre>
+#include "confdefs.h"
+main(){return(0);}
+</pre>
+
+And a check for standard C compatibility:
+
+<pre>
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+</pre>
+
+(Several variants with different line breaks and whitespace were in
+use.) If it is not possible to port the configure script to current
+Autoconf, these issues can be patched directly:
+
+<pre>
+#include "confdefs.h"
+<ins>int</ins> main(){return(0);}
+</pre>
+
+And for the second probe:
+
+<pre>
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) <ins>return 2</ins>;
+<ins>return 0</ins>; }
+</pre>
+
+There is a long tail of less frequent issues, involving keyword
+checking (for <code>inline</code>), and checks for <code>dlopen</code>
+and <code>mmap</code>. A <code>setvbuf</code> probe was previously
+expected to fail at run time because it triggered undefined behavior,
+now it fails because of a compilation error.
+
<h4 id="errors-as-warnings">Turning errors back into warnings</h4>
<p>
base-commit: 1fcd61437d6a3d7bf24b993b09d525486dc9a2e5
next reply other threads:[~2024-02-17 9:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-17 9:53 Florian Weimer [this message]
2024-02-17 21:33 ` Sam James
2024-03-10 23:20 ` Gerald Pfeifer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0hb4dsr.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).