libsemanage: drop flag: -Wno-unused-but-set-variable
PATCH 1/1 libsemanage: drop flag: -Wno-unused-but-set-variable
The flag: -Wno-unused-but-set-variable isn't supported on older versions of gcc such as gcc-4.1.2 which is the native compiler for RHEL-5.9. Drop this warning flag for both the native and target builds.
--- ...semanage-drop-Wno-unused-but-set-variable.patch | 17 +++++++++++++++++ recipes-security/selinux/libsemanage_2.1.9.bb | 6 ++++-- recipes-security/selinux/libsemanage_git.bb | 6 ++++-- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch
recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch new file +17 -0
@@ -0,0 +1,17 @@ +Subject: libselinux: drop flag: -Wno-unused-but-set-variable + +Upstream status: inappropriate (older compilers only). + +Signed-off-by: Randy MacLeod <[email protected]> + +--- libsemanage-2.1.9.orig/src/Makefile ++++ libsemanage-2.1.9/src/Makefile +@@ -57,7 +57,7 @@ + LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo + CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute + +-SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \ ++SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-shadow \ + -Wno-unused-parameter + + override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE
recipes-security/selinux/libsemanage_2.1.9.bb +4 -2
@@ -1,4 +1,4 @@ -PR = "r0" +PR = "r1" include selinux_20120924.inc include ${BPN}.inc
@@ -11,4 +11,6 @@ SRC_URI[sha256sum] = "6f01d17f9751412f7b76e6e7daafeb2faf301b9bfeea83506160c81bec SRC_URI += "\ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + "
recipes-security/selinux/libsemanage_git.bb +4 -2
@@ -1,4 +1,4 @@ -PR = "r4" +PR = "r5" PV = "2.1.6+git${SRCPV}" include selinux_git.inc
@@ -10,4 +10,6 @@ SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-semanage.conf-for-cross-compile.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + "
Signature · 1 line
1.7.4.1
Quoted 3 lines · Randy MacLeod
The flag: -Wno-unused-but-set-variable isn't supported on older versions of gcc such as gcc-4.1.2 which is the native compiler for RHEL-5.9. Drop this warning flag for both the native and target builds.
why drop from target build ?
Quoted 75 lines
Signed-off-by Randy MacLeod <[email protected]>---
...semanage-drop-Wno-unused-but-set-variable.patch | 17 +++++++++++++++++ recipes-security/selinux/libsemanage_2.1.9.bb | 6 ++++-- recipes-security/selinux/libsemanage_git.bb | 6 ++++-- 3 files changed, 25 insertions(+), 4 deletions(-)create mode 100644
recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patchrecipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch new file +17
-0@@ -0,0 +1,17 @@ +Subject: libselinux: drop flag: -Wno-unused-but-set-variable + +Upstream status: inappropriate (older compilers only). + +Signed-off-by: Randy MacLeod <[email protected]> + +--- libsemanage-2.1.9.orig/src/Makefile ++++ libsemanage-2.1.9/src/Makefile +@@ -57,7 +57,7 @@ + LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo + CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute + +-SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \ ++SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-shadow \ + -Wno-unused-parameter + + override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCErecipes-security/selinux/libsemanage_2.1.9.bb +1
-1@@ -1,4 +1,4 @@ -PR = "r0" +PR = "r1"include selinux_20120924.inc
include ${BPN}.increcipes-security/selinux/libsemanage_2.1.9.bb +3
-1@@ -11,4 +11,6 @@ SRC_URI[sha256sum] = "6f01d17f9751412f7b76e6e7daafeb2faf301b9bfeea83506160c81bec SRC_URI += "\ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + "recipes-security/selinux/libsemanage_git.bb +1
-1@@ -1,4 +1,4 @@ -PR = "r4" +PR = "r5"PV = "2.1.6+git${SRCPV}"
include selinux_git.inc
recipes-security/selinux/libsemanage_git.bb +3
-1@@ -10,4 +10,6 @@ SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-semanage.conf-for-cross-compile.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + "Signature · 6 lines
1.7.4.1 _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
Quoted 9 lines · Khem Raj
Quoted 3 lines · Randy MacLeod
The flag: -Wno-unused-but-set-variable isn't supported on older versions of gcc such as gcc-4.1.2 which is the native compiler for RHEL-5.9. Drop this warning flag for both the native and target builds.
why drop from target build ?
I thought I'd have to create a separate -native recipe and that didn't seem to be worthwhile for this warning flag.
On the other hand, the recipe is tiny so I could fix it up if you think it's important. Oh and I should fix the _git version of libselinux too.
// Randy
Quoted 77 lines
Quoted 76 lines
Signed-off-by Randy MacLeod <[email protected]>---
...semanage-drop-Wno-unused-but-set-variable.patch | 17 +++++++++++++++++ recipes-security/selinux/libsemanage_2.1.9.bb | 6 ++++-- recipes-security/selinux/libsemanage_git.bb | 6 ++++-- 3 files changed, 25 insertions(+), 4 deletions(-)create mode 100644
recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patchrecipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch new file +17
-0@@ -0,0 +1,17 @@ +Subject: libselinux: drop flag: -Wno-unused-but-set-variable + +Upstream status: inappropriate (older compilers only). + +Signed-off-by: Randy MacLeod <[email protected]> + +--- libsemanage-2.1.9.orig/src/Makefile ++++ libsemanage-2.1.9/src/Makefile +@@ -57,7 +57,7 @@ + LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo + CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute + +-SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \ ++SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-shadow \ + -Wno-unused-parameter + + override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCErecipes-security/selinux/libsemanage_2.1.9.bb +1
-1@@ -1,4 +1,4 @@ -PR = "r0" +PR = "r1"include selinux_20120924.inc
include ${BPN}.increcipes-security/selinux/libsemanage_2.1.9.bb +3
-1@@ -11,4 +11,6 @@ SRC_URI[sha256sum] = "6f01d17f9751412f7b76e6e7daafeb2faf301b9bfeea83506160c81bec SRC_URI += "\ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + "recipes-security/selinux/libsemanage_git.bb +1
-1@@ -1,4 +1,4 @@ -PR = "r4" +PR = "r5"PV = "2.1.6+git${SRCPV}"
include selinux_git.inc
recipes-security/selinux/libsemanage_git.bb +3
-2@@ -10,4 +10,6 @@ SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-semanage.conf-for-cross-compile.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + " --1.7.4.1
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River Direct: 613.963.1350
Quoted 9 lines · Randy MacLeod
Quoted 8 lines · Khem Raj
Quoted 3 lines · Randy MacLeod
The flag: -Wno-unused-but-set-variable isn't supported on older versions of gcc such as gcc-4.1.2 which is the native compiler for RHEL-5.9. Drop this warning flag for both the native and target builds.
Quoted 8 lines
Quoted 1 line
why drop from target build ?
I thought I'd have to create a separate -native recipe and that didn't seem to be worthwhile for this warning flag.
On the other hand, the recipe is tiny so I could fix it up if you think it's important. Oh and I should fix the
_gitversion of libselinux too.
You can selectively add the patch to the SRC_URI only in the class-native case.
SRC_URI_append_class-native = " ...."
I believe that will work as expected.
--Mark
Quoted 80 lines
// Randy
Quoted 77 lines
Quoted 76 lines
Signed-off-by Randy MacLeod <[email protected]>---
...semanage-drop-Wno-unused-but-set-variable.patch | 17 +++++++++++++++++ recipes-security/selinux/libsemanage_2.1.9.bb | 6 ++++-- recipes-security/selinux/libsemanage_git.bb | 6 ++++-- 3 files changed, 25 insertions(+), 4 deletions(-)create mode 100644
recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patchrecipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch new file +17
-0@@ -0,0 +1,17 @@ +Subject: libselinux: drop flag: -Wno-unused-but-set-variable + +Upstream status: inappropriate (older compilers only). + +Signed-off-by: Randy MacLeod <[email protected]> + +--- libsemanage-2.1.9.orig/src/Makefile ++++ libsemanage-2.1.9/src/Makefile +@@ -57,7 +57,7 @@ + LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo + CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute + +-SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \ ++SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-shadow \ + -Wno-unused-parameter + + override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCErecipes-security/selinux/libsemanage_2.1.9.bb +1
-1@@ -1,4 +1,4 @@ -PR = "r0" +PR = "r1"include selinux_20120924.inc
include ${BPN}.increcipes-security/selinux/libsemanage_2.1.9.bb +3
-1@@ -11,4 +11,6 @@ SRC_URI[sha256sum] = "6f01d17f9751412f7b76e6e7daafeb2faf301b9bfeea83506160c81bec SRC_URI += "\ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + "recipes-security/selinux/libsemanage_git.bb +1
-1@@ -1,4 +1,4 @@ -PR = "r4" +PR = "r5"PV = "2.1.6+git${SRCPV}"
include selinux_git.inc
recipes-security/selinux/libsemanage_git.bb +3
-2@@ -10,4 +10,6 @@ SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ file://libsemanage-semanage.conf-for-cross-compile.patch \ file://libsemanage-fix-path-len-limit.patch \ - file://libsemanage-fix-path-nologin.patch" + file://libsemanage-fix-path-nologin.patch \ + file://libsemanage-drop-Wno-unused-but-set-variable.patch \ + " --1.7.4.1
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto