All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Jes Sorensen <jes.sorensen@gmail.com>
Cc: linux-fscrypt@vger.kernel.org, kernel-team@fb.com,
	Jes Sorensen <jsorensen@fb.com>
Subject: Re: [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS
Date: Wed, 20 May 2020 14:06:22 -0700	[thread overview]
Message-ID: <20200520210622.GB218475@gmail.com> (raw)
In-Reply-To: <20200520200811.257542-3-Jes.Sorensen@gmail.com>

On Wed, May 20, 2020 at 04:08:11PM -0400, Jes Sorensen wrote:
> From: Jes Sorensen <jsorensen@fb.com>
> 
> Package managers such as RPM wants to build everything with their
> preferred flags, and we shouldn't hard override flags.
> 
> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
> ---
>  Makefile | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index e7fb5cf..7bcd5e4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -32,15 +32,14 @@ cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \
>  #### Common compiler flags.  You can add additional flags by defining CFLAGS
>  #### and/or CPPFLAGS in the environment or on the 'make' command line.

The above comment is still being made outdated.  IMO, just remove it.

>  
> -override CFLAGS := -O2 -Wall -Wundef				\
> +CFLAGS := -O2 -Wall -Wundef				\
>  	$(call cc-option,-Wdeclaration-after-statement)		\
>  	$(call cc-option,-Wmissing-prototypes)			\
>  	$(call cc-option,-Wstrict-prototypes)			\
>  	$(call cc-option,-Wvla)					\
> -	$(call cc-option,-Wimplicit-fallthrough)		\
> -	$(CFLAGS)
> +	$(call cc-option,-Wimplicit-fallthrough)
>  
> -override CPPFLAGS := -D_FILE_OFFSET_BITS=64 $(CPPFLAGS)
> +CPPFLAGS := -D_FILE_OFFSET_BITS=64 $(CPPFLAGS)

On the other thread you ageed that CPPFLAGS should be left as-is, but here you
removed 'override'.  I think always using -D_FILE_OFFSET_BITS=64 is what we
want, since it avoids incorrect builds on 32-bit platforms.  Right?

- Eric

  reply	other threads:[~2020-05-20 21:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 20:08 [PATCH v2 0/2] fsverity-utils Makefile fixes Jes Sorensen
2020-05-20 20:08 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
2020-05-20 20:08 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
2020-05-20 21:06   ` Eric Biggers [this message]
2020-05-20 21:20     ` Jes Sorensen
2020-05-20 21:03 ` [PATCH v2 0/2] fsverity-utils Makefile fixes Eric Biggers
2020-05-20 21:04   ` Jes Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2020-05-20 21:25 [PATCH v3 " Jes Sorensen
2020-05-20 21:25 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
2020-05-15 20:56 [PATCH 0/2] fsverity-utils Makefile fixes Jes Sorensen
2020-05-15 20:56 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
2020-05-20  2:54   ` Eric Biggers
2020-05-20 20:00     ` Jes Sorensen

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=20200520210622.GB218475@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=jes.sorensen@gmail.com \
    --cc=jsorensen@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-fscrypt@vger.kernel.org \
    /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.