From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: Elia Pinto <gitter.spiros@gmail.com>
Cc: git@vger.kernel.org, jnareb@gmail.com
Subject: Re: [PATCH] configure.ac: Add --with-gcc-warnings configure option
Date: Tue, 06 Mar 2012 16:51:58 +0100 [thread overview]
Message-ID: <4F56329E.9050506@gmail.com> (raw)
In-Reply-To: <1331044385-14796-1-git-send-email-gitter.spiros@gmail.com>
On 03/06/2012 03:33 PM, Elia Pinto wrote:
> Introduce a new --with-gcc-warnings configure option
> using a new autoconf macro that check if the compiler
> know the option passed or not in a portable way, as
> it not depends from the gcc version or from the
> other compiler used.
>
> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
> ---
> This is the version 2 of the patch, in which i have
> slightly changed the commit message for
> clarify the purpose. To activate the
> patch is of course necessary to do a autoreconf -vfi after
> applying the patch.
>
>
> Makefile | 2 +-
> config.mak.in | 1 +
> configure.ac | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 120 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index be1957a..d0aef0f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -310,7 +310,7 @@ endif
>
> CFLAGS = -g -O2 -Wall
> LDFLAGS =
> -ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
> +ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) $(AM_CFLAGS)
>
Wouldn't it be better to use $(WARN_CFLAGS) here? It makes the purpose
of the variable clearer, and don't give the wrong impression that Automake
is involved (as the 'AM_' prefix might suggest).
> ALL_LDFLAGS = $(LDFLAGS)
> STRIP ?= strip
>
> diff --git a/config.mak.in b/config.mak.in
> index b2ba710..5b7dbfd 100644
> --- a/config.mak.in
> +++ b/config.mak.in
> @@ -2,6 +2,7 @@
> # @configure_input@
>
> CC = @CC@
> +AM_CFLAGS = @GIT_CFLAGS@
>
Accordingly here: s/AM_CFLAGS/WARN_CFLAGS/ and s/GIT_CFLAGS/WARN_CFLAGS/.
> +# GIT_CFLAGS_ADD(PARAMETER, [VARIABLE = GIT_CFLAGS])
> +# ------------------------------------------------
>
And here as well: s/GIT_CFLAGS/WARN_CFLAGS/. Ditto for the rest of the
M4 file.
Regards,
Stefano
next prev parent reply other threads:[~2012-03-06 15:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 14:33 [PATCH] configure.ac: Add --with-gcc-warnings configure option Elia Pinto
2012-03-06 15:51 ` Stefano Lattarini [this message]
2012-03-06 16:08 ` Elia Pinto
2012-03-06 16:12 ` Stefano Lattarini
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=4F56329E.9050506@gmail.com \
--to=stefano.lattarini@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitter.spiros@gmail.com \
--cc=jnareb@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.