Patchwork [5/7] rpm: Use link time check for libssp

login
register
mail settings
Submitter Khem Raj
Date June 4, 2012, 10:21 p.m.
Message ID <d454ef5eea88fa62fb45ab9a33eb31085941316a.1338848379.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/29219/
State New
Headers show

Comments

Khem Raj - June 4, 2012, 10:21 p.m.
-fstack-protector needs libssp to link with
so when checking for this option support we
need to find if libssp is staged in root file
system

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../rpm/rpm/fstack-protector-configure-check.patch |   13 +++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    1 +
 2 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch

Patch

diff --git a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
new file mode 100644
index 0000000..84d0430
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
@@ -0,0 +1,13 @@ 
+Index: rpm-5.4.0/configure.ac
+===================================================================
+--- rpm-5.4.0.orig/configure.ac	2012-06-01 11:41:19.741480143 -0700
++++ rpm-5.4.0/configure.ac	2012-06-01 11:41:51.773481676 -0700
+@@ -193,7 +193,7 @@
+  my_save_cflags="$CFLAGS"
+  CFLAGS=$c
+  AC_MSG_CHECKING([whether GCC supports $c])
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
+     [AC_MSG_RESULT([yes])]
+     [my_cflags=$c],
+     [AC_MSG_RESULT([no])]
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index f4938fd..a8bff65 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -74,6 +74,7 @@  SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
 	   file://rpm_fix_for_automake-1.12.patch \
 	   file://uclibc-support.patch \
 	   file://rpmatch.patch \
+	   file://fstack-protector-configure-check.patch \
 	  "
 
 #	   file://rpm-autoconf.patch \