summaryrefslogtreecommitdiffstats
path: root/rules/cross-gcc-first.make
blob: a3db5cdd038a0c012dd6f4a367a308958ed12003 (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
# -*-makefile-*-
#
# Copyright (C) 2006 by Robert Schwebel
#
# 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
#
CROSS_PACKAGES-$(PTXCONF_CROSS_GCC_FIRST) += cross-gcc-first

#
# Paths and names
#
CROSS_GCC_FIRST_VERSION		:= $(call remove_quotes,$(PTXCONF_CROSS_GCC_VERSION))
CROSS_GCC_FIRST_DL_VERSION	:= $(call remove_quotes,$(PTXCONF_CROSS_GCC_DL_VERSION))
CROSS_GCC_FIRST_MD5		:= $(call remove_quotes,$(PTXCONF_CROSS_GCC_MD5))
CROSS_GCC_FIRST			:= gcc-$(CROSS_GCC_FIRST_DL_VERSION)
ifeq ($(CROSS_GCC_FIRST_VERSION),$(CROSS_GCC_FIRST_DL_VERSION))
CROSS_GCC_FIRST_SUFFIX		:= tar.bz2
else
CROSS_GCC_FIRST_SUFFIX		:= tar.xz
endif
CROSS_GCC_FIRST_SOURCE		:= $(SRCDIR)/$(CROSS_GCC_FIRST).$(CROSS_GCC_FIRST_SUFFIX)
CROSS_GCC_FIRST_DIR		:= $(CROSS_BUILDDIR)/gcc-first-$(CROSS_GCC_FIRST_VERSION)
CROSS_GCC_FIRST_BUILDDIR	:= $(CROSS_GCC_FIRST_DIR)-build
CROSS_GCC_FIRST_URL		 = $(CROSS_GCC_URL)
CROSS_GCC_FIRST_BUILD_OOT	:= YES
CROSS_GCC_FIRST_DEVPKG		:= NO

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

CROSS_GCC_FIRST_ENV	:= $(HOST_ENV) MAKEINFO=:

#
# autoconf
#
CROSS_GCC_FIRST_CONF_TOOL	:= autoconf
CROSS_GCC_FIRST_CONF_OPT	 = \
	$(CROSS_GCC_AUTOCONF_COMMON) \
	--prefix=$(CROSS_GCC_FIRST_PREFIX) \
	\
	--disable-shared \
	--enable-languages=c \
	\
	--with-ld=$(PTXCONF_SYSROOT_CROSS)/bin/$(PTXCONF_GNU_TARGET)-ld \
	--with-as=$(PTXCONF_SYSROOT_CROSS)/bin/$(PTXCONF_GNU_TARGET)-as \
	--disable-checking \
	\
	--disable-libmudflap \
	--disable-libssp \
	--disable-libgomp \
	--disable-libquadmath \
	--disable-libatomic \
	--with-system-zlib

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

CROSS_GCC_FIRST_INSTALL_OPT := \
	install

$(STATEDIR)/cross-gcc-first.install:
	@$(call targetinfo)
	@$(call world/install, CROSS_GCC_FIRST)
	ln -sfv libgcc.a `$(CROSS_GCC_FIRST_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-gcc \
		-print-libgcc-file-name | \
		sed 's/libgcc/&_eh/'`
	ln -sfv libgcc.a `$(CROSS_GCC_FIRST_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-gcc \
		-print-libgcc-file-name | \
		sed 's/libgcc/&_s/'`

	@$(call touch)

# vim: syntax=make