summaryrefslogtreecommitdiffstats
path: root/rules/newlib.make
blob: 056508702e9836b252aa965436dfc109c032afd7 (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
# -*-makefile-*-
#
# Copyright (C) 2007 by Sascha Hauer
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_NEWLIB) += newlib

#
# Paths and names
#
NEWLIB_VERSION	:= $(call remove_quotes,$(PTXCONF_NEWLIB_DL_VERSION))
NEWLIB_MD5	:= $(call remove_quotes,$(PTXCONF_NEWLIB_MD5))
NEWLIB		:= newlib-$(NEWLIB_VERSION)
NEWLIB_SUFFIX	:= tar.gz
NEWLIB_URL	:= https://sourceware.org/pub/newlib/$(NEWLIB).$(NEWLIB_SUFFIX)
NEWLIB_SOURCE	:= $(SRCDIR)/$(NEWLIB).$(NEWLIB_SUFFIX)
NEWLIB_DIR	:= $(BUILDDIR_DEBUG)/$(NEWLIB)
NEWLIB_BUILDDIR	:= $(BUILDDIR)/$(NEWLIB)-build

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

NEWLIB_PATH := PATH=$(CROSS_PATH)
NEWLIB_ENV := CC_FOR_BUILD=$(HOSTCC)

#
# autoconf
#
NEWLIB_CONF_TOOL	:= autoconf
NEWLIB_CONF_OPT		:= \
	--prefix= \
	--target=$(PTXCONF_GNU_TARGET) \
	--disable-shared \
	--disable-newlib-supplied-syscalls \
	--with-newlib

$(STATEDIR)/newlib.prepare:
	@$(call targetinfo)
#	# unknown options a propagated to newlib/configure
	@sed -i "s:^\(enable_option_checking\)=.*:\1=no:" \
		$(NEWLIB_DIR)/configure
	@$(call world/prepare, NEWLIB)
	@$(call touch)

# vim: syntax=make