This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Andreas Jaeger <aj@suse.de> writes: > I just noticed that -Wall is set in libgfortran/configure - but the > files itself are not using -Wall. The problem is that FCFLAGS is > passed from the top-level directory and therefore this is preferred to > the define in libgfortran/Makefile. > > FCFLAGS/CFLAGS are the wrong variable to use - we should use > AM_FCFLAGS/AM_CFLAGS. > > Ok to commit the appended patch if everything passes to both 4.0 and > mainline? I did some local tests with it but will do a fresh complete > build / regression first. I have one further proposal: Let's enable some more warnings for libgfortran. I send separatly patches to fix warnings generated by "-Wstrict-prototypes", so this one can be easily added to AM_CFLAGS. Here's an updated patch - bootstrapped/regtesting in process on Linux/x86-64. Ok to commit? I propose to commit to 4.0 as well without the -Wstrict-prototypes addition. Ok? Andreas * Makefile.am: Remove AM_CFLAGS here. * configure.ac: Define AM_CFLAGS and AM_FCFLAGS so that warnings are set. Set additionally -Wstrict-prototypes for CFLAGS. * Makefile.in: Regenerated * configure: Regenerated. ============================================================ Index: libgfortran/configure.ac --- libgfortran/configure.ac 29 Apr 2005 14:24:02 -0000 1.24 +++ libgfortran/configure.ac 15 May 2005 12:11:49 -0000 @@ -109,12 +109,15 @@ m4_define([_AC_ARG_VAR_PRECIOUS],[]) AC_PROG_CC m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) -AC_SUBST(CFLAGS) - # Add -Wall if we are using GCC. if test "x$GCC" = "xyes"; then - CFLAGS="$CFLAGS -Wall" + AM_FCFLAGS="-Wall" + ## We like to use C99 routines when available. This makes sure that + ## __STDC_VERSION__ is set such that libc includes make them available. + AM_CFLAGS="-std=gnu99 -Wall -Wstrict-prototypes" fi +AC_SUBST(AM_FCFLAGS) +AC_SUBST(AM_CFLAGS) # Find other programs we need. AC_CHECK_TOOL(AS, as) ============================================================ Index: libgfortran/Makefile.am --- libgfortran/Makefile.am 10 May 2005 22:06:54 -0000 1.33 +++ libgfortran/Makefile.am 15 May 2005 12:11:49 -0000 @@ -1,8 +1,6 @@ ## Process this file with automake to produce Makefile.in -## We like to use C99 routines when available. This makes sure that -## __STDC_VERSION__ is set such that libc includes make them available. -AM_CFLAGS = -std=gnu99 + ACLOCAL_AMFLAGS = -I ../config ## May be used by toolexeclibdir. @@ -193,7 +191,7 @@ i_dotprod_c= \ generated/dotprod_i4.c \ generated/dotprod_i8.c \ generated/dotprod_r4.c \ -generated/dotprod_r8.c +generated/dotprod_r8.c i_dotprodl_c= \ generated/dotprod_l4.c \ @@ -530,4 +528,3 @@ $(gfor_built_specific2_src): m4/specific endif EXTRA_DIST = $(m4_files) - ============================================================ Index: libgfortran/aclocal.m4 --- libgfortran/aclocal.m4 10 May 2005 22:06:55 -0000 1.9 +++ libgfortran/aclocal.m4 15 May 2005 12:11:49 -0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.9.2 -*- Autoconf -*- +# generated automatically by aclocal 1.9.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. @@ -40,7 +40,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.2])]) + [AM_AUTOMAKE_VERSION([1.9.3])]) # AM_AUX_DIR_EXPAND ============================================================ Index: libgfortran/Makefile.in --- libgfortran/Makefile.in 10 May 2005 22:06:54 -0000 1.34 +++ libgfortran/Makefile.in 15 May 2005 12:11:50 -0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.2 from Makefile.am. +# Makefile.in generated by automake 1.9.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -206,6 +206,8 @@ distuninstallcheck_listfiles = find . -t distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_FCFLAGS = @AM_FCFLAGS@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ @@ -213,7 +215,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ -CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -300,7 +301,6 @@ target_os = @target_os@ target_vendor = @target_vendor@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ -AM_CFLAGS = -std=gnu99 ACLOCAL_AMFLAGS = -I ../config gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la @@ -480,7 +480,7 @@ i_dotprod_c = \ generated/dotprod_i4.c \ generated/dotprod_i8.c \ generated/dotprod_r4.c \ -generated/dotprod_r8.c +generated/dotprod_r8.c i_dotprodl_c = \ generated/dotprod_l4.c \ -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |