[yocto] [PATCH][meta-selinux] libselinux: workaround gcc errors with '-O2'
Mark Hatle
mark.hatle at windriver.com
Tue Nov 18 19:08:07 PST 2014
From: Wenzong Fan <wenzong.fan at windriver.com>
While building libselinux with oe-core toolchain and DEBUG_OPTIMIZATION
enabled, the '-O' option may cause errors:
{standard input}: Assembler messages:
{standard input}:1910: Error: invalid operands \
(.text and *UND* sections) for `-'
Similar issue [YOCTO #5512]
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
recipes-security/selinux/libselinux.inc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/recipes-security/selinux/libselinux.inc b/recipes-security/selinux/libselinux.inc
index d571a7c..d2d01df 100644
--- a/recipes-security/selinux/libselinux.inc
+++ b/recipes-security/selinux/libselinux.inc
@@ -23,6 +23,11 @@ EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre'"
+# workaround gcc errors about:
+# {standard input}: Assembler messages:
+# {standard input}:1910: Error: invalid operands (.text and *UND* sections) for `-'
+CFLAGS += "-O2"
+
do_compile_append() {
oe_runmake pywrap -j1 \
INCLUDEDIR='${STAGING_INCDIR}' \
--
1.9.3
More information about the yocto
mailing list