[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/Makefile b/ap/libc/glibc/Makefile
new file mode 100644
index 0000000..31f6b5c
--- /dev/null
+++ b/ap/libc/glibc/Makefile
@@ -0,0 +1,39 @@
+
+#include $(COMMON_BASE_MK)
+
+NAME=glibc
+SRC_DIR=glibc-2.22
+INSTALL_DIR=$(STAGEDIR)/libc
+BUILD_DIR=build
+GEN_MAKEFILE=$(BUILD_DIR)/Makefile
+
+CONFIG_OPTS = --target=arm-linux --host=arm-linux
+CONFIG_OPTS += --enable-kernel=3.4.0
+CONFIG_OPTS += ac_cv_path_BASH_SHELL=/bin/bash
+CONFIG_OPTS += libc_cv_forced_unwind=yes
+CONFIG_OPTS += libc_cv_ssp=no
+CONFIG_OPTS += --enable-shared
+CONFIG_OPTS += --without-fp
+CONFIG_OPTS += --without-cvs
+CONFIG_OPTS += --disable-profile
+CONFIG_OPTS += --without-gd
+CONFIG_OPTS += --enable-obsolete-rpc
+CONFIG_OPTS += --with-headers=$(STAGEDIR)/include
+
+#CONFIG_OPTS = --static
+
+
+all: $(GEN_MAKEFILE)
+ -make -C build all
+ sed -i 's/__libc_subfreE(__st/__libc_subfreeres :/' build/shlib.lds
+ make -C build all
+ make -C build install
+
+$(GEN_MAKEFILE):
+ echo "zgp " $(LD_LIBRARY_PATH)
+ mkdir -p $(BUILD_DIR)
+ cd $(BUILD_DIR); ../$(SRC_DIR)/configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
+
+clean:
+ -rm -fr $(BUILD_DIR)
+