summaryrefslogtreecommitdiffstats
path: root/meta-systemd/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-08-04 20:05:33 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-08-08 09:02:51 +0200
commitada707b4e1e0959acd292577c0a4f423a03e308c (patch)
tree22110999fdda29622ec024e110aec831319c5071 /meta-systemd/recipes-core
parent6fd1caa623563f728d87434f5684cf1d3c9b6c53 (diff)
downloadmeta-openembedded-ada707b4e1e0959acd292577c0a4f423a03e308c.tar.gz
systemd: Use cross cpp
While building for non x86 arch (ppc) found that build was using host's cpp which was not generating exact syscall list for ppc since it was using the include files from host With this patch will use $(CPP) instead of hardcoding cpp in makefile.am and then set CPP properly in recipe Fixes build failures on cross builds Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-systemd/recipes-core')
-rw-r--r--meta-systemd/recipes-core/systemd/systemd/use-cross-cpp.patch30
-rw-r--r--meta-systemd/recipes-core/systemd/systemd_git.bb2
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-systemd/recipes-core/systemd/systemd/use-cross-cpp.patch b/meta-systemd/recipes-core/systemd/systemd/use-cross-cpp.patch
new file mode 100644
index 000000000..8a4371ec7
--- /dev/null
+++ b/meta-systemd/recipes-core/systemd/systemd/use-cross-cpp.patch
@@ -0,0 +1,30 @@
1hardcoding cpp does not work when cross compiling systemd.
2since it will use the include headers from host system and
3syscalls are different for different architectures.
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Upstream-Status: Pending
8
9Index: systemd-187/Makefile.am
10===================================================================
11--- systemd-187.orig/Makefile.am 2012-07-29 16:39:57.628405921 -0700
12+++ systemd-187/Makefile.am 2012-07-29 16:40:37.248405921 -0700
13@@ -1026,7 +1026,7 @@
14 src/core/syscall-to-name.h
15
16 src/core/syscall-list.txt: Makefile
17- $(AM_V_GEN)cpp $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9]/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
18+ $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9]/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
19
20 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
21 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
22@@ -2199,7 +2199,7 @@
23
24 src/udev/keymap/keys.txt: Makefile
25 $(AM_V_at)mkdir -p src/udev/keymap
26- $(AM_V_GEN)cpp $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
27+ $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
28
29 src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
30 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
index 5d1c28b31..b1cc9c394 100644
--- a/meta-systemd/recipes-core/systemd/systemd_git.bb
+++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
@@ -27,6 +27,7 @@ SRCREV = "3fd89536883ea9e24e69f28de0d11cd7cffb42ce"
27 27
28SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \ 28SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
29 file://use-rootlibdir.patch \ 29 file://use-rootlibdir.patch \
30 file://use-cross-cpp.patch \
30 file://gtk-doc.make \ 31 file://gtk-doc.make \
31 file://touchscreen.rules \ 32 file://touchscreen.rules \
32 file://modprobe.rules \ 33 file://modprobe.rules \
@@ -62,6 +63,7 @@ EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
62 63
63# There's no docbook-xsl-native, so for the xsltproc check to false 64# There's no docbook-xsl-native, so for the xsltproc check to false
64do_configure_prepend() { 65do_configure_prepend() {
66 export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
65 sed -i /xsltproc/d configure.ac 67 sed -i /xsltproc/d configure.ac
66 68
67 cp ${WORKDIR}/gtk-doc.make ${S}/docs/ 69 cp ${WORKDIR}/gtk-doc.make ${S}/docs/