summaryrefslogtreecommitdiffstats
path: root/rules/glibc-crt.make
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2006-08-29 11:36:25 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2006-08-29 11:36:25 +0000
commita09127b31e4a718afef553b7aff77ab6a20cdfe2 (patch)
tree5fd3a1bb5643dfacfe402405331a6e31604d8d92 /rules/glibc-crt.make
parentcdacb263f0026bc24caefe75a68adddbc0e613f2 (diff)
downloadOSELAS.Toolchain-a09127b31e4a718afef553b7aff77ab6a20cdfe2.tar.gz
OSELAS.Toolchain-a09127b31e4a718afef553b7aff77ab6a20cdfe2.tar.xz
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@768 f8d472c7-5700-0410-ac5a-87979cec3adf
Diffstat (limited to 'rules/glibc-crt.make')
-rw-r--r--rules/glibc-crt.make120
1 files changed, 120 insertions, 0 deletions
diff --git a/rules/glibc-crt.make b/rules/glibc-crt.make
new file mode 100644
index 0000000..f3c7212
--- /dev/null
+++ b/rules/glibc-crt.make
@@ -0,0 +1,120 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel <r.schwebel@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLIBC_CRT) += glibc-crt
+
+#
+# Paths and names
+#
+GLIBC_CRT_DIR = $(BUILDDIR)/$(GLIBC)-crt
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+glibc-crt_get: $(STATEDIR)/glibc-crt.get
+
+$(STATEDIR)/glibc-crt.get: $(STATEDIR)/glibc.get
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+glibc-crt_extract: $(STATEDIR)/glibc-crt.extract
+
+$(STATEDIR)/glibc-crt.extract: $(glibc-crt_extract_deps_default) $(STATEDIR)/glibc.extract
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_CRT_DIR))
+ mkdir -p $(GLIBC_CRT_DIR)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+glibc-crt_prepare: $(STATEDIR)/glibc-crt.prepare
+
+GLIBC_CRT_PATH := PATH=$(CROSS_PATH)
+GLIBC_CRT_ENV := \
+ BUILD_CC=$(HOSTCC) \
+ libc_cv_forced_unwind=yes \
+ libc_cv_c_cleanup=yes
+
+#
+# libc_cv_forced_unwind=yes
+# libc_cv_c_cleanup=yes
+#
+# is needed for nptl (mkl)
+#
+
+
+#
+# autoconf
+#
+GLIBC_CRT_AUTOCONF = $(GLIBC_AUTOCONF)
+
+$(STATEDIR)/glibc-crt.prepare: $(glibc-crt_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_CRT_DIR)/config.cache)
+ cd $(GLIBC_CRT_DIR) && \
+ $(GLIBC_CRT_PATH) $(GLIBC_CRT_ENV) \
+ $(GLIBC_DIR)/configure $(GLIBC_CRT_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+glibc-crt_compile: $(STATEDIR)/glibc-crt.compile
+
+$(STATEDIR)/glibc-crt.compile: $(glibc-crt_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_CRT_DIR) && $(GLIBC_CRT_ENV) $(GLIBC_CRT_PATH) $(MAKE) csu/subdir_lib
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+glibc-crt_install: $(STATEDIR)/glibc-crt.install
+
+$(STATEDIR)/glibc-crt.install: $(glibc-crt_install_deps_default)
+ @$(call targetinfo, $@)
+ for file in crt1.o crti.o crtn.o; do \
+ $(INSTALL) -m 644 -D $(GLIBC_CRT_DIR)/csu/$$file \
+ $(SYSROOT)/usr/lib/$$file; \
+ done
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+glibc-crt_targetinstall: $(STATEDIR)/glibc-crt.targetinstall
+
+$(STATEDIR)/glibc-crt.targetinstall: $(glibc-crt_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+glibc-crt_clean:
+ rm -rf $(STATEDIR)/glibc-crt.*
+ rm -rf $(GLIBC_CRT_DIR)
+
+# vim: syntax=make