summaryrefslogtreecommitdiffstats
path: root/rules/glibc-first.make
blob: fdd46a66ab303dbf4b457eab1c41eac34b2d46d9 (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
106
107
108
109
110
111
# -*-makefile-*-
# $Id: template 6655 2007-01-02 12:55:21Z rsc $
#
# Copyright (C) 2006 by Robert Schwebel
#		2007, 2008 by Marc Kleine-Budde
#
# 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_FIRST) += glibc-first

#
# Paths and names
#
GLIBC_FIRST_BUILDDIR	= $(BUILDDIR)/$(GLIBC)-first-build

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(STATEDIR)/glibc-first.get: $(STATEDIR)/glibc.get
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/glibc-first.extract: $(STATEDIR)/glibc.extract
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

GLIBC_FIRST_PATH := PATH=$(CROSS_PATH)
GLIBC_FIRST_ENV := \
	CC=$(CROSS_CC) \
	CXX=false \
	BUILD_CC=$(HOSTCC) \
	\
	libc_cv_c_cleanup=yes \
	libc_cv_forced_unwind=yes \
	libc_cv_fpie=yes \
	libc_cv_ssp=yes \
	libc_cv_visibility_attribute=yes \
	libc_cv_broken_visibility_attribute=no \
	libc_cv_z_relro=yes \
	\
	ac_cv_sizeof_long_double=$(PTXCONF_SIZEOF_LONG_DOUBLE)

GLIBC_FIRST_MAKEVARS := AUTOCONF=no

GLIBC_FIRST_AUTOCONF = \
	$(GLIBC_AUTOCONF_COMMON) \
	--disable-debug \
	--disable-profile \

$(STATEDIR)/glibc-first.prepare:
	@$(call targetinfo)
	@$(call clean, $(GLIBC_FIRST_BUILDDIR))
	mkdir -p $(GLIBC_FIRST_BUILDDIR)
	cd $(GLIBC_FIRST_BUILDDIR) && \
		$(GLIBC_FIRST_ENV) $(GLIBC_FIRST_PATH) \
		$(GLIBC_DIR)/configure $(GLIBC_FIRST_AUTOCONF)
	@$(call touch)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

$(STATEDIR)/glibc-first.compile:
	@$(call targetinfo)
	cd $(GLIBC_FIRST_BUILDDIR) && $(GLIBC_FIRST_PATH) $(MAKE) $(PARALLELMFLAGS) lib
	@$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/glibc-first.install:
	@$(call targetinfo)
	cd $(GLIBC_FIRST_BUILDDIR) && \
		$(GLIBC_FIRST_PATH) $(MAKE) $(GLIBC_FIRST_MAKEVARS) \
		install_root=$(SYSROOT) install-lib-all install-headers
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/glibc-first.targetinstall:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

glibc-first_clean:
	rm -rf $(STATEDIR)/glibc-first.*
	rm -rf $(GLIBC_FIRST_BUILDDIR)

# vim: syntax=make