blob: f5977870744658829a926832d7ddba5fd61d9f14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# -*-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-build
# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------
$(STATEDIR)/glibc-crt.get: $(STATEDIR)/glibc.get
@$(call targetinfo)
@$(call touch)
# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------
$(STATEDIR)/glibc-crt.extract: $(STATEDIR)/glibc.extract
@$(call targetinfo)
@$(call touch)
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
GLIBC_CRT_PATH := PATH=$(CROSS_PATH)
GLIBC_CRT_ENV := \
BUILD_CC=$(HOSTCC) \
\
ac_cv_path_GREP=grep \
ac_cv_sizeof_long_double=$(PTXCONF_SIZEOF_LONG_DOUBLE) \
libc_cv_c_cleanup=yes \
libc_cv_forced_unwind=yes
#
# autoconf
#
GLIBC_CRT_AUTOCONF = $(GLIBC_AUTOCONF)
$(STATEDIR)/glibc-crt.prepare:
@$(call targetinfo)
@$(call clean, $(GLIBC_CRT_DIR))
mkdir -p $(GLIBC_CRT_DIR)
cd $(GLIBC_CRT_DIR) && eval \
$(GLIBC_CRT_PATH) $(GLIBC_CRT_ENV) \
$(GLIBC_DIR)/configure $(GLIBC_CRT_AUTOCONF)
@$(call touch)
# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------
$(STATEDIR)/glibc-crt.compile:
@$(call targetinfo)
cd $(GLIBC_CRT_DIR) && $(GLIBC_CRT_PATH) \
$(MAKE) $(PARALLELMFLAGS) csu/subdir_lib
@$(call touch)
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
$(STATEDIR)/glibc-crt.install:
@$(call targetinfo)
mkdir -p $(SYSROOT)/usr/lib
for file in {S,}crt1.o crt{i,n}.o; do \
$(INSTALL) -m 644 $(GLIBC_CRT_DIR)/csu/$$file \
$(SYSROOT)/usr/lib/$$file || exit 1; \
done
@$(call touch)
# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------
$(STATEDIR)/glibc-crt.targetinstall:
@$(call targetinfo)
@$(call touch)
# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------
glibc-crt_clean:
rm -rf $(STATEDIR)/glibc-crt.*
rm -rf $(GLIBC_CRT_DIR)
# vim: syntax=make
|