From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18719 invoked by alias); 24 Sep 2003 18:09:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10216 invoked from network); 24 Sep 2003 16:37:52 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 24 Sep 2003 16:37:52 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 1A2Ce3-0007Gv-RM; Wed, 24 Sep 2003 12:37:39 -0400 Date: Wed, 24 Sep 2003 18:09:00 -0000 From: Daniel Jacobowitz To: gcc-patches@sources.redhat.com Cc: Gerald Pfeifer , Loren James Rittle , binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix) Message-ID: <20030924163739.GA27896@nevyn.them.org> Mail-Followup-To: gcc-patches@sources.redhat.com, Gerald Pfeifer , Loren James Rittle , binutils@sources.redhat.com, gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2003-09/txt/msg00527.txt.bz2 What are your thoughts on this patch? The basic idea is to reject (as autoconf 2.13 did) headers which cause the preprocessor to generate warnings. The basis of AC_PROG_CPP_WERROR is in the autoconf CVS. The bit to use _AC_CHECK_HEADER_OLD isn't, of course. It occured to me while I was running this through final testing that this patch won't solve the problem forever; eventually autoconf will check for headers in preference using $CC rather than $CPP. At that point we'll need something like AC_PROG_CC_WERROR also to reject C fragments which warn. I'm still talking to Paul about that... Gerald or Loren, could you make sure this fixes your boostrap troubles on FreeBSD? You'll need autoconf 2.57 to regenerate configure. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-09-24 Daniel Jacobowitz * acx.m4 (AC_PROG_CPP_WERROR): New. 2003-09-24 Daniel Jacobowitz * configure.in: Use AC_PROG_CPP_WERROR. * configure: Regenerated. Index: libiberty/configure.in =================================================================== RCS file: /big/fsf/rsync/gcc-cvs/gcc/libiberty/configure.in,v retrieving revision 1.71 diff -u -p -r1.71 configure.in --- libiberty/configure.in 27 Aug 2003 21:14:28 -0000 1.71 +++ libiberty/configure.in 24 Sep 2003 16:10:23 -0000 @@ -101,6 +101,7 @@ AC_CHECK_TOOL(RANLIB, ranlib, :) GCC_NO_EXECUTABLES AC_PROG_CC +AC_PROG_CPP_WERROR if test x$GCC = xyes; then ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic' Index: config/acx.m4 =================================================================== RCS file: /big/fsf/rsync/gcc-cvs/gcc/config/acx.m4,v retrieving revision 1.3 diff -u -p -r1.3 acx.m4 --- config/acx.m4 18 May 2003 15:43:43 -0000 1.3 +++ config/acx.m4 24 Sep 2003 16:27:31 -0000 @@ -140,3 +140,18 @@ else $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL + +### +# AC_PROG_CPP_WERROR +# Used for autoconf 2.5x to force AC_PREPROC_IFELSE to reject code which +# triggers warnings from the preprocessor. Will be in autoconf 2.58. +# For now, using this also overrides header checks to use only the +# preprocessor (matches 2.13 behavior; matching 2.58's behavior is a +# bit harder from here). +# Eventually autoconf will default to checking headers with the compiler +# instead, and we'll have to do this differently. + +AC_DEFUN([AC_PROG_CPP_WERROR], +[AC_REQUIRE([AC_PROG_CPP])dnl +m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD])) +ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR