Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix)
@ 2003-09-24 18:09 Daniel Jacobowitz
  2003-09-24 18:10 ` Loren James Rittle
  2003-09-24 18:33 ` DJ Delorie
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-09-24 18:09 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gerald Pfeifer, Loren James Rittle, binutils, gdb-patches

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix)
  2003-09-24 18:09 [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix) Daniel Jacobowitz
@ 2003-09-24 18:10 ` Loren James Rittle
  2003-09-24 21:42   ` Loren James Rittle
  2003-09-24 18:33 ` DJ Delorie
  1 sibling, 1 reply; 5+ messages in thread
From: Loren James Rittle @ 2003-09-24 18:10 UTC (permalink / raw)
  To: drow; +Cc: gcc-patches, gerald, binutils, gdb-patches

In article <20030924163739.GA27896@nevyn.them.org>,
Daniel Jacobowitz<drow@mvista.com> writes:

> 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.

ACK that it fixes the problem.  Configure now finds:

ac_cv_header_malloc_h=no

> [...] I'm still talking to Paul about that...

Daniel, thanks.

> Gerald or Loren, could you make sure this fixes your boostrap troubles on
> FreeBSD?  You'll need autoconf 2.57 to regenerate configure.

Running full bootstrap over lunch.

Loren


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix)
  2003-09-24 18:09 [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix) Daniel Jacobowitz
  2003-09-24 18:10 ` Loren James Rittle
@ 2003-09-24 18:33 ` DJ Delorie
  2003-09-25 14:30   ` Daniel Jacobowitz
  1 sibling, 1 reply; 5+ messages in thread
From: DJ Delorie @ 2003-09-24 18:33 UTC (permalink / raw)
  To: drow; +Cc: gcc-patches, gerald, rittle, binutils, gdb-patches


This is OK if it passes the freebsd bootstraps.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix)
  2003-09-24 18:10 ` Loren James Rittle
@ 2003-09-24 21:42   ` Loren James Rittle
  0 siblings, 0 replies; 5+ messages in thread
From: Loren James Rittle @ 2003-09-24 21:42 UTC (permalink / raw)
  To: drow; +Cc: gcc-patches, gerald, binutils, gdb-patches


>> Gerald or Loren, could you make sure this fixes your boostrap troubles on
>> FreeBSD?  You'll need autoconf 2.57 to regenerate configure.

I wrote:
> Running full bootstrap over lunch.

DJ wrote:
> This is OK if it passes the freebsd bootstraps.

Bootstrap without requiring --disable-werror into libjava, thus good
to go. - Regards, Loren


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix)
  2003-09-24 18:33 ` DJ Delorie
@ 2003-09-25 14:30   ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-09-25 14:30 UTC (permalink / raw)
  To: gcc-patches, binutils, gdb-patches

On Wed, Sep 24, 2003 at 02:33:30PM -0400, DJ Delorie wrote:
> 
> This is OK if it passes the freebsd bootstraps.

Thanks, checked in to fix the bootstrap problems.  I'm still pursuing a
final solution.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-09-25 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-24 18:09 [toplevel/libiberty] Reject configure files which warn (*BSD malloc.h bootstrap fix) Daniel Jacobowitz
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox