[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/cap/zx297520v3/sources/meta-openembedded/meta-initramfs/classes/klibc.bbclass b/cap/zx297520v3/sources/meta-openembedded/meta-initramfs/classes/klibc.bbclass
new file mode 100644
index 0000000..bba10f1
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-openembedded/meta-initramfs/classes/klibc.bbclass
@@ -0,0 +1,16 @@
+# klcc-cross depends on klibc
+DEPENDS =+ "klcc-cross"
+
+# Default for klcc is to build static binaries.
+# Set CC = "${TARGET_PREFIX}klcc -shared" to build the dynamic version.
+CC_forcevariable = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS}"
+CC_forcevariable_armv4_linux-gnueabi = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS} -march=armv4 -mthumb-interwork"
+CC_append_armv7ve = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
+CC_append_armv7a = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"
+
+# klcc uses own optimizations by default. See klcc(1) man file.
+export CFLAGS="${TUNE_CCARGS}"
+export CPPFLAGS="${TUNE_CCARGS}"
+export LDFLAGS="${TUNE_CCARGS}"
+
+OVERRIDES =. "libc-klibc:"