aboutsummaryrefslogtreecommitdiffstats
path: root/classes/dietlibc.bbclass
diff options
context:
space:
mode:
authorwoglinde <heinold@inf.fu-berlin.de>2009-02-03 13:50:02 +0100
committerwoglinde <heinold@inf.fu-berlin.de>2009-02-03 13:51:50 +0100
commit33fc8a1cc2854a225d5da0174efc8eb6325c2f3a (patch)
tree0f764dd19f1fc5acf284a234e11a41e77f1a0f24 /classes/dietlibc.bbclass
parent0a33914e7db6715664090702ff32992041cea49b (diff)
downloadopenembedded-33fc8a1cc2854a225d5da0174efc8eb6325c2f3a.tar.gz
openembedded-33fc8a1cc2854a225d5da0174efc8eb6325c2f3a.tar.bz2
openembedded-33fc8a1cc2854a225d5da0174efc8eb6325c2f3a.zip
dietlibc: introduce dietlibc to openembedded
Diffstat (limited to 'classes/dietlibc.bbclass')
-rw-r--r--classes/dietlibc.bbclass30
1 files changed, 30 insertions, 0 deletions
diff --git a/classes/dietlibc.bbclass b/classes/dietlibc.bbclass
new file mode 100644
index 0000000000..7c7b5fec81
--- /dev/null
+++ b/classes/dietlibc.bbclass
@@ -0,0 +1,30 @@
+DEPENDS =+ "dietlibc"
+
+def dietlibc_after_parse(d):
+ import bb
+ # Remove the NLS
+ cfg = oe_filter_out('--(dis|en)able-nls', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
+ # Remove shared and static and set it right
+ cfg += " --disable-nls --disbale-shared --enable-static"
+ bb.data.setVar('EXTRA_OECONF', cfg, d)
+ cfg = bb.data.getVar('EXTRA_OEMAKE', d, 1) or ""
+ cfg = oe_filter_out("\'CC=", bb.data.getVar('EXTRA_OEMAKE', d, 1) or "", d)
+ cfgtmp = "\'CC=diet ${CCACHE}"
+ cfgtmp += cfg
+ bb.data.setVar('EXTRA_OEMAKE', cfgtmp, d)
+
+python () {
+ dietlibc_after_parse(d)
+}
+
+set_dietlibc_env () {
+ export CC="diet ${CC}"
+}
+
+do_compile_prepend() {
+ set_dietlibc_env
+}
+
+do_configure_prepend() {
+ set_dietlibc_env
+}