[oe-commits] Roman I Khimov : pacemaker: fix headers define extraction and uclibc build

git version control git at git.openembedded.org
Fri Apr 9 11:14:22 UTC 2010


Module: openembedded.git
Branch: shr/unstable
Commit: 8a9cae9876019daab44e068b5611a1a9ab34b7bf
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=8a9cae9876019daab44e068b5611a1a9ab34b7bf

Author: Roman I Khimov <khimov at altell.ru>
Date:   Wed Apr  7 19:44:50 2010 +0400

pacemaker: fix headers define extraction and uclibc build

Header define extraction routine tries to execute test binary which
may or may not work depending on target architecture. Redo it using
preprocessor only.

Fix uclibc build also, doesn't link properly without fstack-protector.

Signed-off-by: Roman I Khimov <khimov at altell.ru>

---

 .../pacemaker-1.0.8/fix-header-defs-lookup.patch   |   16 ++++++++++++++++
 recipes/pacemaker/pacemaker_1.0.8.bb               |    4 ++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/recipes/pacemaker/pacemaker-1.0.8/fix-header-defs-lookup.patch b/recipes/pacemaker/pacemaker-1.0.8/fix-header-defs-lookup.patch
new file mode 100644
index 0000000..02ce26e
--- /dev/null
+++ b/recipes/pacemaker/pacemaker-1.0.8/fix-header-defs-lookup.patch
@@ -0,0 +1,16 @@
+Index: Pacemaker-1-0-Pacemaker-1.0.8/configure.ac
+===================================================================
+--- Pacemaker-1-0-Pacemaker-1.0.8.orig/configure.ac	2010-04-06 13:08:53.000000000 +0400
++++ Pacemaker-1-0-Pacemaker-1.0.8/configure.ac	2010-04-06 13:08:58.000000000 +0400
+@@ -106,9 +106,8 @@
+ 	  Cfile=/tmp/extract_define.$2.${$}
+ 	  printf "#include <stdio.h>\n" > ${Cfile}.c
+ 	  printf "#include <%s>\n" $1 >> ${Cfile}.c
+-	  printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c
+-	  $CC $CFLAGS ${Cfile}.c -o ${Cfile}
+-	  value=`${Cfile}`
++	  printf "\"%s\":%s\n" $2 $2 >> ${Cfile}.c
++	  value=`$CC $CFLAGS -E ${Cfile}.c | grep \"$2\" | cut -f 2 -d ':' | sed 's,^",,' | sed 's,"$,,'`
+ 	  AC_MSG_RESULT($value)
+ 	  printf $value
+ 	  rm -f ${Cfile}.c ${Cfile}
diff --git a/recipes/pacemaker/pacemaker_1.0.8.bb b/recipes/pacemaker/pacemaker_1.0.8.bb
index 265ea30..50f2608 100644
--- a/recipes/pacemaker/pacemaker_1.0.8.bb
+++ b/recipes/pacemaker/pacemaker_1.0.8.bb
@@ -16,10 +16,13 @@ DEPENDS = " \
 	"
 RDEPENDS_${PN} += "openais"
 
+PR = "r1"
+
 SRC_URI = " \
 	http://hg.clusterlabs.org/pacemaker/stable-1.0/archive/Pacemaker-${PV}.tar.bz2;name=tar \
 	file://pacemaker-remove-native-includes.patch;patch=1 \
 	file://pacemaker-dont-use-help2man.patch;patch=1 \
+	file://fix-header-defs-lookup.patch;patch=1 \
 	file://volatiles \
 	"
 SRC_URI[tar.md5sum] = "088569ca893fe9f2239b68abe2856132"
@@ -31,6 +34,7 @@ S = "${WORKDIR}/Pacemaker-1-0-Pacemaker-${PV}"
 EXTRA_OECONF = "--with-ais --without-heartbeat --disable-fatal-warnings --disable-pretty"
 
 CFLAGS += "-I${STAGING_INCDIR}/heartbeat"
+CFLAGS_libc-uclibc += "-I${STAGING_INCDIR}/heartbeat -fstack-protector-all"
 
 do_install_append() {
 	install -d ${D}${sysconfdir}/default/volatiles





More information about the Openembedded-commits mailing list