fsverity-utils Makefile fixes
Subsystems (2)
v2 cover fsverity-utils Makefile fixes
From: Jes Sorensen <[email protected]>
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(-)
Signature · 1 line
2.26.2
PATCH v2 1/2 Fix Makefile to delete objects from the library on make clean
From: Jes Sorensen <[email protected]>
--- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -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:
Signature · 1 line
2.26.2
PATCH v2 2/2 Let package manager override CFLAGS and CPPFLAGS
In reply to Jes SorensenFrom: Jes Sorensen <[email protected]>
Package managers such as RPM wants to build everything with their preferred flags, and we shouldn't hard override flags.
--- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Makefile +3 -4
@@ -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
Signature · 1 line
2.26.2
Eric Biggers
maintainerRe: [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS
Quoted 15 lines · Jes Sorensen
From: Jes Sorensen <[email protected]>
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 <[email protected]>--- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)Makefile +0
-0
Makefile cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \ · line 33
Quoted 2 lines
Makefile +0
-0@@ -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.
Makefile cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \ · line 42
Quoted 13 lines
Makefile +3
-4-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
Re: [PATCH 2/2] Let package manager override CFLAGS and CPPFLAGS
Quoted 11 lines · Eric Biggers
Quoted 10 lines · Jes Sorensen
From: Jes Sorensen <[email protected]>
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 <[email protected]>--- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Quoted 9 lines
Makefile cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \ · line 33
Quoted 7 lines
Makefile +0
-0@@ -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.
Quoted 11 lines
Quoted 11 lines
Makefile +2
-3-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)
Quoted 6 lines
Makefile cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \ · line 42
Quoted 2 lines
Makefile +1
-1-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
Eric Biggers
maintainerQuoted 7 lines · Jes Sorensen
From: Jes Sorensen <[email protected]>
Hi
This addresses the comments to the previous version of these
Makefilechanges.
Quoted 8 lines
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
Quoted 17 lines · Eric Biggers
Quoted 7 lines · Jes Sorensen
From: Jes Sorensen <[email protected]>
Hi
This addresses the comments to the previous version of these
Makefilechanges.Quoted 8 lines
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
Quoted 6 lines
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