Linux-FSCrypt Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/2] fsverity-utils Makefile fixes
@ 2020-05-20 20:08 Jes Sorensen
  2020-05-20 20:08 ` [PATCH 1/2] Fix Makefile to delete objects from the library on make clean Jes Sorensen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jes Sorensen @ 2020-05-20 20:08 UTC (permalink / raw)
  To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen

From: Jes Sorensen <jsorensen@fb.com>

Hi

This addresses the comments to the previous version of these Makefile
changes.

Let me know if you have any additional issues with it?

I'd really love to see an official release soon that includes these
changes, which I can point to when submitting the RPM patches. Any
chance of doing 1.1 or something like that?

Cheers,
Jes


Jes Sorensen (2):
  Fix Makefile to delete objects from the library on make clean
  Let package manager override CFLAGS and CPPFLAGS

 Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

-- 
2.26.2


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

* [PATCH 1/2] Fix Makefile to delete objects from the library on make clean
  2020-05-20 20:08 [PATCH v2 0/2] fsverity-utils Makefile fixes Jes Sorensen
@ 2020-05-20 20:08 ` Jes Sorensen
  2020-05-20 20:08 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
  2020-05-20 21:03 ` [PATCH v2 0/2] fsverity-utils Makefile fixes Eric Biggers
  2 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2020-05-20 20:08 UTC (permalink / raw)
  To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen

From: Jes Sorensen <jsorensen@fb.com>

Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 1a7be53..e7fb5cf 100644
--- a/Makefile
+++ b/Makefile
@@ -180,8 +180,8 @@ help:
 	done
 
 clean:
-	rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) $(LIB_OBJS) $(ALL_PROG_OBJ) \
-		.build-config
+	rm -f $(DEFAULT_TARGETS) $(TEST_PROGRAMS) \
+		lib/*.o programs/*.o .build-config
 
 FORCE:
 
-- 
2.26.2


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

* [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS
  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 ` Jes Sorensen
  2020-05-20 21:06   ` Eric Biggers
  2020-05-20 21:03 ` [PATCH v2 0/2] fsverity-utils Makefile fixes Eric Biggers
  2 siblings, 1 reply; 7+ messages in thread
From: Jes Sorensen @ 2020-05-20 20:08 UTC (permalink / raw)
  To: ebiggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen

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.
 
-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)
 
 #### Other user settings
 
-- 
2.26.2


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

* Re: [PATCH v2 0/2] fsverity-utils Makefile fixes
  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:03 ` Eric Biggers
  2020-05-20 21:04   ` Jes Sorensen
  2 siblings, 1 reply; 7+ messages in thread
From: Eric Biggers @ 2020-05-20 21:03 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-fscrypt, kernel-team, Jes Sorensen

On Wed, May 20, 2020 at 04:08:09PM -0400, Jes Sorensen wrote:
> From: Jes Sorensen <jsorensen@fb.com>
> 
> Hi
> 
> This addresses the comments to the previous version of these Makefile
> changes.
> 
> Let me know if you have any additional issues with it?
> 
> I'd really love to see an official release soon that includes these
> changes, which I can point to when submitting the RPM patches. Any
> chance of doing 1.1 or something like that?
> 
> Cheers,
> Jes

I'll release v1.1 after I merge the libfsverity patches, but I need to look over
everything again first before committing to a stable API.  I'll try to get to it
this weekend; I'm also busy with a lot of other things.

Also, could you look over my patches and leave your Reviewed-by?  I expected
that you'd have a few more comments.

- Eric

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

* Re: [PATCH v2 0/2] fsverity-utils Makefile fixes
  2020-05-20 21:03 ` [PATCH v2 0/2] fsverity-utils Makefile fixes Eric Biggers
@ 2020-05-20 21:04   ` Jes Sorensen
  0 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2020-05-20 21:04 UTC (permalink / raw)
  To: Eric Biggers, Jes Sorensen; +Cc: linux-fscrypt, kernel-team

On 5/20/20 5:03 PM, Eric Biggers wrote:
> On Wed, May 20, 2020 at 04:08:09PM -0400, Jes Sorensen wrote:
>> From: Jes Sorensen <jsorensen@fb.com>
>>
>> Hi
>>
>> This addresses the comments to the previous version of these Makefile
>> changes.
>>
>> Let me know if you have any additional issues with it?
>>
>> I'd really love to see an official release soon that includes these
>> changes, which I can point to when submitting the RPM patches. Any
>> chance of doing 1.1 or something like that?
>>
>> Cheers,
>> Jes
> 
> I'll release v1.1 after I merge the libfsverity patches, but I need to look over
> everything again first before committing to a stable API.  I'll try to get to it
> this weekend; I'm also busy with a lot of other things.
> 
> Also, could you look over my patches and leave your Reviewed-by?  I expected
> that you'd have a few more comments.

Sounds good, I'll go over them again and add the Reviewed-by lines once
I'm through.

Cheers,
Jes

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

* Re: [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS
  2020-05-20 20:08 ` [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS Jes Sorensen
@ 2020-05-20 21:06   ` Eric Biggers
  2020-05-20 21:20     ` Jes Sorensen
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Biggers @ 2020-05-20 21:06 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-fscrypt, kernel-team, Jes Sorensen

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

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

* Re: [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS
  2020-05-20 21:06   ` Eric Biggers
@ 2020-05-20 21:20     ` Jes Sorensen
  0 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2020-05-20 21:20 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-fscrypt, kernel-team, Jes Sorensen

On 5/20/20 5:06 PM, Eric Biggers wrote:
> 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.

Good point, I'll send out a v3.

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

That should work I think, I read your response as agreeing with me,
hence leaving the change in place.

Cheers,
Jes

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

Linux-FSCrypt Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-fscrypt/0 linux-fscrypt/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-fscrypt linux-fscrypt/ https://lore.kernel.org/linux-fscrypt \
		linux-fscrypt@vger.kernel.org
	public-inbox-index linux-fscrypt

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-fscrypt


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git