Skip to contentSkip to conversation

libselinux: drop long deprecated `-Wstrict-overflow=5` flag

PATCH Superseded Sergei Trofimovich 3 participants 5 messages Jun 1 – Jun 5 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libselinux: drop long deprecated `-Wstrict-overflow=5` flag

gcc-17 formally deprecated -Wstrict-overflow options in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b31a43560e88600d412318f75a43ac8e562ba8c5.

I only noticed it because gcc-17 deprecated it slightly incorrectly and started to fail libselinux build: https://gcc.gnu.org/PR125558

While it's a gcc bug gcc devs suggested removing use of the flag. This change does the removal.

---
 libselinux/src/Makefile   | 2 +-
 libselinux/utils/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
libselinux/src/Makefile +1 -1
index c62ad1ed..373a6251 100644
@@ -65,7 +65,7 @@ EXTRA_CFLAGS = -Wlogical-op -Wpacked-bitfield-compat -Wsync-nand \
 	-Wcoverage-mismatch -Wcpp -Wformat-contains-nul -Wnormalized=nfc -Wsuggest-attribute=const \
 	-Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines -Wjump-misses-init \
 	-Wno-suggest-attribute=pure -Wno-suggest-attribute=const -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
-	-Wstrict-overflow=5 -fno-semantic-interposition
+	-fno-semantic-interposition
 else
 EXTRA_CFLAGS = -Wunused-command-line-argument
 endif
libselinux/utils/Makefile +1 -1
index 20dc44eb..ddbd2445 100644
@@ -33,7 +33,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
           -Wno-format-nonliteral -Wframe-larger-than=$(MAX_STACK_SIZE) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
           -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \
           -fasynchronous-unwind-tables -fdiagnostics-show-option \
-          -Werror -Wno-aggregate-return -Wno-redundant-decls -Wstrict-overflow=5 \
+          -Werror -Wno-aggregate-return -Wno-redundant-decls \
           $(EXTRA_CFLAGS)
 
 override CFLAGS += $(LFS_CFLAGS)
Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 9 lines · Sergei Trofimovich

gcc-17 formally deprecated -Wstrict-overflow options in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b31a43560e88600d412318f75a43ac8e562ba8c5.

I only noticed it because gcc-17 deprecated it slightly incorrectly and started to fail libselinux build: https://gcc.gnu.org/PR125558

While it's a gcc bug gcc devs suggested removing use of the flag. This change does the removal.

Please add a Signed-off-by: line with your name and email. git commit --amend -s will do this for you.

Quoted 35 lines
---
 libselinux/src/Makefile   | 2 +-
 libselinux/utils/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
libselinux/src/Makefile +1 -1
index c62ad1ed..373a6251 100644
@@ -65,7 +65,7 @@ EXTRA_CFLAGS = -Wlogical-op -Wpacked-bitfield-compat -Wsync-nand \
        -Wcoverage-mismatch -Wcpp -Wformat-contains-nul -Wnormalized=nfc -Wsuggest-attribute=const \
        -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines -Wjump-misses-init \
        -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
-       -Wstrict-overflow=5 -fno-semantic-interposition
+       -fno-semantic-interposition
 else
 EXTRA_CFLAGS = -Wunused-command-line-argument
 endif
libselinux/utils/Makefile +1 -2
index 20dc44eb..ddbd2445 100644
@@ -33,7 +33,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
           -Wno-format-nonliteral -Wframe-larger-than=$(MAX_STACK_SIZE) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
           -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \
           -fasynchronous-unwind-tables -fdiagnostics-show-option \
-          -Werror -Wno-aggregate-return -Wno-redundant-decls -Wstrict-overflow=5 \
+          -Werror -Wno-aggregate-return -Wno-redundant-decls \
           $(EXTRA_CFLAGS)
 
 override CFLAGS += $(LFS_CFLAGS)
--

2.54.0

#2 lore raw

PATCH v2 1/1 libselinux: drop long deprecated `-Wstrict-overflow=5` flag

gcc-17 formally deprecated -Wstrict-overflow options in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b31a43560e88600d412318f75a43ac8e562ba8c5.

I only noticed it because gcc-17 deprecated it slightly incorrectly and started to fail libselinux build: https://gcc.gnu.org/PR125558

While it's a gcc bug gcc devs suggested removing use of the flag. This change does the removal.

---
 libselinux/src/Makefile   | 2 +-
 libselinux/utils/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
libselinux/src/Makefile +1 -1
index c62ad1ed..373a6251 100644
@@ -65,7 +65,7 @@ EXTRA_CFLAGS = -Wlogical-op -Wpacked-bitfield-compat -Wsync-nand \
 	-Wcoverage-mismatch -Wcpp -Wformat-contains-nul -Wnormalized=nfc -Wsuggest-attribute=const \
 	-Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines -Wjump-misses-init \
 	-Wno-suggest-attribute=pure -Wno-suggest-attribute=const -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
-	-Wstrict-overflow=5 -fno-semantic-interposition
+	-fno-semantic-interposition
 else
 EXTRA_CFLAGS = -Wunused-command-line-argument
 endif
libselinux/utils/Makefile +1 -1
index 20dc44eb..ddbd2445 100644
@@ -33,7 +33,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
           -Wno-format-nonliteral -Wframe-larger-than=$(MAX_STACK_SIZE) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
           -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \
           -fasynchronous-unwind-tables -fdiagnostics-show-option \
-          -Werror -Wno-aggregate-return -Wno-redundant-decls -Wstrict-overflow=5 \
+          -Werror -Wno-aggregate-return -Wno-redundant-decls \
           $(EXTRA_CFLAGS)
 
 override CFLAGS += $(LFS_CFLAGS)
Signature · 1 line
2.54.0
maintainer Acked-by on v2 1/1
#3 lore raw
Quoted 11 lines · Sergei Trofimovich

gcc-17 formally deprecated -Wstrict-overflow options in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b31a43560e88600d412318f75a43ac8e562ba8c5.

I only noticed it because gcc-17 deprecated it slightly incorrectly and started to fail libselinux build: https://gcc.gnu.org/PR125558

While it's a gcc bug gcc devs suggested removing use of the flag. This change does the removal.

Will defer merging until after the code reformat but shouldn't conflict since these are just Makefile changes.

Quoted 34 lines
---
 libselinux/src/Makefile   | 2 +-
 libselinux/utils/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
libselinux/src/Makefile +1 -1
index c62ad1ed..373a6251 100644
@@ -65,7 +65,7 @@ EXTRA_CFLAGS = -Wlogical-op -Wpacked-bitfield-compat -Wsync-nand \
        -Wcoverage-mismatch -Wcpp -Wformat-contains-nul -Wnormalized=nfc -Wsuggest-attribute=const \
        -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines -Wjump-misses-init \
        -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
-       -Wstrict-overflow=5 -fno-semantic-interposition
+       -fno-semantic-interposition
 else
 EXTRA_CFLAGS = -Wunused-command-line-argument
 endif
libselinux/utils/Makefile +1 -2
index 20dc44eb..ddbd2445 100644
@@ -33,7 +33,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
           -Wno-format-nonliteral -Wframe-larger-than=$(MAX_STACK_SIZE) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
           -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \
           -fasynchronous-unwind-tables -fdiagnostics-show-option \
-          -Werror -Wno-aggregate-return -Wno-redundant-decls -Wstrict-overflow=5 \
+          -Werror -Wno-aggregate-return -Wno-redundant-decls \
           $(EXTRA_CFLAGS)
 
 override CFLAGS += $(LFS_CFLAGS)
--

2.54.0

#4 lore raw
Quoted 12 lines · Stephen Smalley
Quoted 10 lines · Sergei Trofimovich

gcc-17 formally deprecated -Wstrict-overflow options in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b31a43560e88600d412318f75a43ac8e562ba8c5.

I only noticed it because gcc-17 deprecated it slightly incorrectly and started to fail libselinux build: https://gcc.gnu.org/PR125558

While it's a gcc bug gcc devs suggested removing use of the flag. This change does the removal.

Quoted 7 lines
Quoted 1 line

Will defer merging until after the code reformat but shouldn't conflict since these are just Makefile changes.

Merged.
Thanks,
Jim

Quoted 35 lines
Quoted 34 lines
---
 libselinux/src/Makefile   | 2 +-
 libselinux/utils/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
libselinux/src/Makefile +1 -1
index c62ad1ed..373a6251 100644
@@ -65,7 +65,7 @@ EXTRA_CFLAGS = -Wlogical-op -Wpacked-bitfield-compat -Wsync-nand \
        -Wcoverage-mismatch -Wcpp -Wformat-contains-nul -Wnormalized=nfc -Wsuggest-attribute=const \
        -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines -Wjump-misses-init \
        -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
-       -Wstrict-overflow=5 -fno-semantic-interposition
+       -fno-semantic-interposition
 else
 EXTRA_CFLAGS = -Wunused-command-line-argument
 endif
libselinux/utils/Makefile +1 -2
index 20dc44eb..ddbd2445 100644
@@ -33,7 +33,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
           -Wno-format-nonliteral -Wframe-larger-than=$(MAX_STACK_SIZE) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
           -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \
           -fasynchronous-unwind-tables -fdiagnostics-show-option \
-          -Werror -Wno-aggregate-return -Wno-redundant-decls -Wstrict-overflow=5 \
+          -Werror -Wno-aggregate-return -Wno-redundant-decls \
           $(EXTRA_CFLAGS)
 
 override CFLAGS += $(LFS_CFLAGS)
--

2.54.0