From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1602 invoked by alias); 8 Aug 2007 20:55:19 -0000 Received: (qmail 1307 invoked by uid 22791); 8 Aug 2007 20:55:14 -0000 X-Spam-Check-By: sourceware.org Received: from pauline.vellum.cz (HELO pauline.vellum.cz) (89.250.243.234) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 20:55:06 +0000 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by pauline.vellum.cz (8.12.11.20060308/8.12.11) with ESMTP id l78Kt3BA001171 for ; Wed, 8 Aug 2007 22:55:03 +0200 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.1/8.13.8) with ESMTP id l78Kt39E003130 for ; Wed, 8 Aug 2007 22:55:03 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.1/8.14.1/Submit) id l78Kt3Dk003129 for gdb-patches@sourceware.org; Wed, 8 Aug 2007 22:55:03 +0200 Date: Wed, 08 Aug 2007 20:55:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Fix compilation on the recent glibc CVS snapshot Message-ID: <20070808205502.GA3058@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline User-Agent: Mutt/1.5.14 (2007-02-12) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00159.txt.bz2 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=iso-2022-jp Content-Disposition: inline Content-length: 1281 Hi, recent glibc change: 2007-05-24 Ulrich Drepper * io/fcntl.h: When compiling with fortification, include bits/fcntl2.h. * io/bits/fcntl2.h: New file. started to sanity check the parameters of the open(2) syscall by providing #define open(fname, flags, ...) which errors out the GDB CVS snapshot compilation by: gcc -c -O2 -m64 -ggdb2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -I. -I.././gdb -I.././gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd -I.././gdb/../bfd -I.././gdb/../include -DMI_OUT=1 -DTUI=1 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror serial.c serial.c: In function ‘serial_open’: serial.c:216: error: expected identifier before ‘(’ token make[2]: *** [serial.o] Error 1 make[2]: Leaving directory `/root/redhat/sources/gdb' GCC needs these options to make the problem reproducible: -O -pedantic -Wp,-D_FORTIFY_SOURCE=2 Successful compilation requirs also the BFD patch posted as: http://sourceware.org/ml/binutils/2007-08/msg00114.html Regards, Jan --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="gdb-cvs-glibc-open-fcntl2-compat.patch" Content-length: 523 2007-08-08 Jan Kratochvil * serial.c (serial_open): Fix OPEN parameter macro expansion. --- gdb/serial.c 8 Apr 2007 15:20:07 -0000 1.29 +++ gdb/serial.c 8 Aug 2007 20:32:10 -0000 @@ -213,7 +213,8 @@ serial_open (const char *name) scb->bufp = scb->buf; scb->error_fd = -1; - if (scb->ops->open (scb, open_name)) + /* `...->open (...)' would get expanded by an the open(2) syscall macro. */ + if ((*scb->ops->open) (scb, open_name)) { xfree (scb); return NULL; --x+6KMIRAuhnl3hBn--