bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: noloader@gmail.com
Cc: platform-testers@gnu.org, Gnulib bugs <bug-gnulib@gnu.org>,
	grep-devel@gnu.org
Subject: Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30
Date: Thu, 17 Sep 2020 11:23:41 -0700	[thread overview]
Message-ID: <d7a05adc-b1d7-3b6b-d211-ebed1020b2d2@cs.ucla.edu> (raw)
In-Reply-To: <CAH8yC8n4tmO6__C=zP0JZRmc5_ddg7L6uGAuLfjV_Bm+i3oYsA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

On 9/17/20 7:52 AM, Jeffrey Walton wrote:

> grep-3.4-almost.19-ff30 fails to build on Ubuntu 4, triplet i686-pc-linux-gnu.

I installed the attached patch to Gnulib, which I hope works around this issue 
once grep is updated to the latest Gnulib. cc'ing to bug-gnulib.

The comment in the old version didn't match the code (glibc has the same 
mismatch). This patch updates the comment to match the new code.

[-- Attachment #2: 0001-libc-config-port-__THROW-to-Ubuntu-4.patch --]
[-- Type: text/x-patch, Size: 2512 bytes --]

From 8125325281a491de9e0a6edc3c4d40d77c026114 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 17 Sep 2020 09:45:21 -0700
Subject: [PATCH] libc-config: port __THROW to Ubuntu 4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lib/cdefs.h (__THROW): Do not use __attribute__ ((__nothrow__))
for GCC 3.3.  Problem reported by Jeffrey Walton in:
https://lists.gnu.org/r/bug-gnulib/2019-07/msg00058.html
The GCC 3.3.4 documentation says the attribute should work, but
apparently it does not work on Ubuntu 4’s GCC 3.3.  There seems
little point or desire to research this circa-2004 platform further,
so just avoid the attribute there.
---
 ChangeLog   | 11 +++++++++++
 lib/cdefs.h |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e5b50bf55..b484c8dec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	libc-config: port __THROW to Ubuntu 4
+	* lib/cdefs.h (__THROW): Do not use __attribute__ ((__nothrow__))
+	for GCC 3.3.  Problem reported by Jeffrey Walton in:
+	https://lists.gnu.org/r/bug-gnulib/2019-07/msg00058.html
+	The GCC 3.3.4 documentation says the attribute should work, but
+	apparently it does not work on Ubuntu 4’s GCC 3.3.  There seems
+	little point or desire to research this circa-2004 platform further,
+	so just avoid the attribute there.
+
 2020-09-17  Jim Meyering  <meyering@fb.com>
 
 	test-dfa-match.sh: port timeout work-around to newer Busybox
diff --git a/lib/cdefs.h b/lib/cdefs.h
index 1ae9ffc77..b4ac4df66 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -75,11 +75,11 @@
 
 /* GCC can always grok prototypes.  For C++ programs we add throw()
    to help it optimize the function calls.  But this works only with
-   gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
+   gcc 2.8.x and egcs.  For gcc 3.4 and up we even mark C functions
    as non-throwing using a function attribute since programs can use
    the -fexceptions options for C code as well.  */
 # if !defined __cplusplus \
-     && (__GNUC_PREREQ (3, 3) || __glibc_clang_has_attribute (__nothrow__))
+     && (__GNUC_PREREQ (3, 4) || __glibc_clang_has_attribute (__nothrow__))
 #  define __THROW	__attribute__ ((__nothrow__ __LEAF))
 #  define __THROWNL	__attribute__ ((__nothrow__))
 #  define __NTH(fct)	__attribute__ ((__nothrow__ __LEAF)) fct
-- 
2.17.1


       reply	other threads:[~2020-09-17 18:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2imce1gpu.fsf@meyering.net>
     [not found] ` <CAH8yC8n4tmO6__C=zP0JZRmc5_ddg7L6uGAuLfjV_Bm+i3oYsA@mail.gmail.com>
2020-09-17 18:23   ` Paul Eggert [this message]
2020-09-17 20:53 ` grep-3.4-almost.19-ff30 on Solaris 10 Bruno Haible
2020-09-18  2:26   ` Paul Eggert
2020-09-18  9:01     ` Bruno Haible
2020-09-18 16:06       ` Paul Eggert
2020-09-19  0:25         ` gl_SILENT Bruno Haible
2020-09-17 21:07 ` [platform-testers] new snapshot available: grep-3.4-almost.19-ff30 Jeffrey Walton
2020-09-18 17:36   ` Paul Eggert
     [not found] ` <CAH8yC8mn1YMN+fgzJBKEk9+y0qTqfO2zHbWUyO2ekVq-PimX3Q@mail.gmail.com>
2020-09-17 14:40   ` Jim Meyering
2020-09-17 22:46   ` Bruno Haible
2020-09-19 13:12   ` Bruno Haible
2020-09-19 14:21     ` Jeffrey Walton
2020-09-19 19:15       ` Bruno Haible
2020-09-20 19:28     ` Bruno Haible
     [not found] <CMM.0.95.0.1600356616.beebe@gamma.math.utah.edu>
2020-09-17 19:22 ` Paul Eggert
2020-09-17 21:31 ` Paul Eggert

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7a05adc-b1d7-3b6b-d211-ebed1020b2d2@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bug-gnulib@gnu.org \
    --cc=grep-devel@gnu.org \
    --cc=noloader@gmail.com \
    --cc=platform-testers@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).