From 33fc8a1cc2854a225d5da0174efc8eb6325c2f3a Mon Sep 17 00:00:00 2001 From: woglinde Date: Tue, 3 Feb 2009 13:50:02 +0100 Subject: dietlibc: introduce dietlibc to openembedded --- classes/dietlibc.bbclass | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 classes/dietlibc.bbclass (limited to 'classes') 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 +} -- cgit 1.2.3-korg