Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gcc-patches@sources.redhat.com
Cc: Gerald Pfeifer <gerald@pfeifer.com>,
	Loren James Rittle <rittle@labs.mot.com>,
	binutils@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix)
Date: Wed, 24 Sep 2003 18:09:00 -0000	[thread overview]
Message-ID: <20030924163739.GA27896@nevyn.them.org> (raw)

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  <drow@mvista.com>

	* acx.m4 (AC_PROG_CPP_WERROR): New.

2003-09-24  Daniel Jacobowitz  <drow@mvista.com>

	* 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


             reply	other threads:[~2003-09-24 18:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-24 18:09 Daniel Jacobowitz [this message]
2003-09-24 18:10 ` Loren James Rittle
2003-09-24 21:42   ` Loren James Rittle
2003-09-24 18:33 ` DJ Delorie
2003-09-25 14:30   ` Daniel Jacobowitz

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=20030924163739.GA27896@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc-patches@sources.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gerald@pfeifer.com \
    --cc=rittle@labs.mot.com \
    /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