summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfig/binutils.kconfig11
-rw-r--r--kconfig/gmp.kconfig82
-rw-r--r--kconfig/gmphost.kconfig50
-rw-r--r--kconfig/mpc.kconfig (renamed from kconfig/mpchost.kconfig)39
-rw-r--r--kconfig/mpfr.kconfig80
-rw-r--r--kconfig/mpfrhost.kconfig54
-rw-r--r--kconfig/toolchain.kconfig6
-rw-r--r--mk/binutils.mk49
-rw-r--r--mk/gmp.mk43
-rw-r--r--mk/gmphost.mk58
-rw-r--r--mk/mpc.mk45
-rw-r--r--mk/mpchost.mk70
-rw-r--r--mk/mpfr.mk44
-rw-r--r--mk/mpfrhost.mk69
-rw-r--r--mk/toolchain.mk16
15 files changed, 363 insertions, 353 deletions
diff --git a/kconfig/binutils.kconfig b/kconfig/binutils.kconfig
index 6a3c4cd..c668144 100644
--- a/kconfig/binutils.kconfig
+++ b/kconfig/binutils.kconfig
@@ -21,12 +21,18 @@
# \brief binutils.kconfig of Embtoolkit
# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date May 2009
-################################################################################
+###############################################################################
+
+config EMBTK_HAVE_BINUTILS
+ bool
+ select EMBTK_BINUTILS_PKG_IS_TARBZ2
+ default y
choice
prompt "Version of binutils you wish"
+ depends on EMBTK_HAVE_BINUTILS
help
- Here you can choose which version on binutils your toochain
+ Here you can choose which version of binutils your toochain
will use.
config EMBTK_BINUTILS_VERSION_2_21_1
bool "binutils-2.21.1"
@@ -37,6 +43,7 @@ choice
config EMBTK_BINUTILS_VERSION_2_20
bool "binutils-2.20"
select EMBTK_BINUTILS_PKG_IS_TARBZ2
+ depends on EMBTK_OLDPACKAGES
config EMBTK_BINUTILS_VERSION_2_19_1
bool "binutils-2.19.1"
select EMBTK_BINUTILS_PKG_IS_TARBZ2
diff --git a/kconfig/gmp.kconfig b/kconfig/gmp.kconfig
new file mode 100644
index 0000000..fa6b713
--- /dev/null
+++ b/kconfig/gmp.kconfig
@@ -0,0 +1,82 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file gmp.kconfig
+# \brief gmp.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date May 2009
+################################################################################
+
+config EMBTK_HAVE_GMP
+ bool
+ select EMBTK_GMP_PKG_IS_TARBZ2
+
+config EMBTK_HOST_HAVE_GMP
+ bool
+ select EMBTK_GMP_PKG_IS_TARBZ2
+ default y
+
+choice
+ prompt "Version of gmp you wish"
+ depends on EMBTK_HOST_HAVE_GMP || EMBTK_HAVE_GMP
+ help
+ GMP is a free library for arbitrary precision arithmetic,
+ operating on signed integers, rational numbers, and floating
+ point numbers.
+
+ config EMBTK_GMP_VERSION_4_3_2
+ bool "gmp-4.3.2"
+ config EMBTK_GMP_VERSION_4_3_1
+ bool "gmp-4.3.1"
+ depends on EMBTK_OLDPACKAGES
+ config EMBTK_GMP_VERSION_4_3_0
+ bool "gmp-4.3.0"
+ depends on EMBTK_OLDPACKAGES
+ config EMBTK_GMP_VERSION_4_2_4
+ bool "gmp-4.2.4"
+endchoice
+
+config EMBTK_GMP_VERSION_STRING
+ string
+ default "4.3.2" if EMBTK_GMP_VERSION_4_3_2
+ default "4.3.1" if EMBTK_GMP_VERSION_4_3_1
+ default "4.3.0" if EMBTK_GMP_VERSION_4_3_0
+ default "4.2.4" if EMBTK_GMP_VERSION_4_2_4
+
+config EMBTK_GMP_NEED_PATCH
+ bool
+ select EMBTK_GMP_HOST_NEED_PATCH
+config EMBTK_GMP_NEED_AUTORECONF
+ bool
+ select EMBTK_GMP_HOST_NEED_AUTORECONF
+config EMBTK_GMP_PKG_IS_TARGZ
+ bool
+ select EMBTK_GMP_HOST_PKG_IS_TARGZ
+config EMBTK_GMP_PKG_IS_TARBZ2
+ bool
+ select EMBTK_GMP_HOST_PKG_IS_TARBZ2
+
+config EMBTK_GMP_HOST_NEED_PATCH
+ bool
+config EMBTK_GMP_HOST_NEED_AUTORECONF
+ bool
+config EMBTK_GMP_HOST_PKG_IS_TARGZ
+ bool
+config EMBTK_GMP_HOST_PKG_IS_TARBZ2
+ bool
diff --git a/kconfig/gmphost.kconfig b/kconfig/gmphost.kconfig
deleted file mode 100644
index ca75069..0000000
--- a/kconfig/gmphost.kconfig
+++ /dev/null
@@ -1,50 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
-#
-# This program is free software; you can distribute it and/or modify it
-# under the terms of the GNU General Public License
-# (Version 2 or later) published by the Free Software Foundation.
-#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
-################################################################################
-#
-# \file gmphost.kconfig
-# \brief gmphost.kconfig of Embtoolkit
-# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# \date May 2009
-################################################################################
-
-choice
- prompt "Version of gmp you wish"
- help
- GMP is a free library for arbitrary precision arithmetic,
- operating on signed integers, rational numbers,
- and floating point numbers.
- GMP is necessary in order to build MPFR.
-
- config EMBTK_GMP_HOST_VERSION_4_3_2
- bool "gmp-4.3.2"
- config EMBTK_GMP_HOST_VERSION_4_3_1
- bool "gmp-4.3.1"
- depends on EMBTK_OLDPACKAGES
- config EMBTK_GMP_HOST_VERSION_4_3_0
- bool "gmp-4.3.0"
- depends on EMBTK_OLDPACKAGES
- config EMBTK_GMP_HOST_VERSION_4_2_4
- bool "gmp-4.2.4"
-endchoice
-
-config EMBTK_GMP_HOST_VERSION_STRING
-string
-default "4.3.2" if EMBTK_GMP_HOST_VERSION_4_3_2
-default "4.3.1" if EMBTK_GMP_HOST_VERSION_4_3_1
-default "4.3.0" if EMBTK_GMP_HOST_VERSION_4_3_0
-default "4.2.4" if EMBTK_GMP_HOST_VERSION_4_2_4
diff --git a/kconfig/mpchost.kconfig b/kconfig/mpc.kconfig
index a617bc2..01deba9 100644
--- a/kconfig/mpchost.kconfig
+++ b/kconfig/mpc.kconfig
@@ -23,26 +23,51 @@
# \date Jan 2010
################################################################################
+config EMBTK_HAVE_MPC
+ bool
+ select EMBTK_MPC_PKG_IS_TARGZ
+
+config EMBTK_HOST_HAVE_MPC
+ bool
+ select EMBTK_MPC_PKG_IS_TARGZ
+ default y
choice
prompt "Version of mpc you wish"
+ depends on EMBTK_HOST_HAVE_MPC || EMBTK_HAVE_MPC
help
Mpc is a C library for the arithmetic of complex numbers with
arbitrarily high precision and correct rounding of the result.
MPC is mandatory to build GCC
- config EMBTK_MPC_HOST_VERSION_0_8_2
+ config EMBTK_MPC_VERSION_0_8_2
bool "mpc-0.8.2"
- config EMBTK_MPC_HOST_VERSION_0_8_1
+ config EMBTK_MPC_VERSION_0_8_1
bool "mpc-0.8.1"
endchoice
-#Version string
-config EMBTK_MPC_HOST_VERSION_STRING
+config EMBTK_MPC_VERSION_STRING
string
- default "0.8.2" if EMBTK_MPC_HOST_VERSION_0_8_2
- default "0.8.1" if EMBTK_MPC_HOST_VERSION_0_8_1
+ default "0.8.2" if EMBTK_MPC_VERSION_0_8_2
+ default "0.8.1" if EMBTK_MPC_VERSION_0_8_1
-#Does we need patches?
config EMBTK_MPC_NEED_PATCH
bool
+ select EMBTK_MPC_HOST_NEED_PATCH
+config EMBTK_MPC_NEED_AUTORECONF
+ bool
+ select EMBTK_MPC_HOST_NEED_AUTORECONF
+config EMBTK_MPC_PKG_IS_TARGZ
+ bool
+ select EMBTK_MPC_HOST_PKG_IS_TARGZ
+config EMBTK_MPC_PKG_IS_TARBZ2
+ bool
+ select EMBTK_MPC_HOST_PKG_IS_TARBZ2
+config EMBTK_MPC_HOST_NEED_PATCH
+ bool
+config EMBTK_MPC_HOST_NEED_AUTORECONF
+ bool
+config EMBTK_MPC_HOST_PKG_IS_TARGZ
+ bool
+config EMBTK_MPC_HOST_PKG_IS_TARBZ2
+ bool
diff --git a/kconfig/mpfr.kconfig b/kconfig/mpfr.kconfig
new file mode 100644
index 0000000..3b8a36d
--- /dev/null
+++ b/kconfig/mpfr.kconfig
@@ -0,0 +1,80 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file mpfr.kconfig
+# \brief mpfr.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date May 2009
+################################################################################
+
+config EMBTK_HAVE_MPFR
+ bool
+ select EMBTK_MPFR_PKG_IS_TARBZ2
+
+config EMBTK_HOST_HAVE_MPFR
+ bool
+ select EMBTK_MPFR_PKG_IS_TARBZ2
+ default y
+
+choice
+ prompt "Version of mpfr you wish"
+ depends on EMBTK_HAVE_MPFR || EMBTK_HOST_HAVE_MPFR
+ help
+ The MPFR library is a C library for multiple-precision
+ floating-point computations with correct rounding.
+ MPFR is mandatory to build GCC
+
+ config EMBTK_MPFR_VERSION_2_4_2
+ bool "mpfr-2.4.2"
+ select EMBTK_MPFR_NEED_PATCH
+ config EMBTK_MPFR_HOST_VERSION_2_4_1
+ bool "mpfr-2.4.1"
+ select EMBTK_MPFR_NEED_PATCH
+ config EMBTK_MPFR_VERSION_2_4_0
+ bool "mpfr-2.4.0"
+ select EMBTK_MPFR_NEED_PATCH
+endchoice
+
+config EMBTK_MPFR_VERSION_STRING
+ string
+ default "2.4.2" if EMBTK_MPFR_VERSION_2_4_2
+ default "2.4.1" if EMBTK_MPFR_VERSION_2_4_1
+ default "2.4.0" if EMBTK_MPFR_VERSION_2_4_0
+
+config EMBTK_MPFR_NEED_PATCH
+ bool
+ select EMBTK_MPFR_HOST_NEED_PATCH
+config EMBTK_MPFR_NEED_AUTORECONF
+ bool
+ select EMBTK_MPFR_HOST_NEED_AUTORECONF
+config EMBTK_MPFR_PKG_IS_TARGZ
+ bool
+ select EMBTK_MPFR_HOST_PKG_IS_TARGZ
+config EMBTK_MPFR_PKG_IS_TARBZ2
+ bool
+ select EMBTK_MPFR_HOST_PKG_IS_TARBZ2
+
+config EMBTK_MPFR_HOST_NEED_PATCH
+ bool
+config EMBTK_MPFR_HOST_NEED_AUTORECONF
+ bool
+config EMBTK_MPFR_HOST_PKG_IS_TARGZ
+ bool
+config EMBTK_MPFR_HOST_PKG_IS_TARBZ2
+ bool
diff --git a/kconfig/mpfrhost.kconfig b/kconfig/mpfrhost.kconfig
deleted file mode 100644
index ed81d78..0000000
--- a/kconfig/mpfrhost.kconfig
+++ /dev/null
@@ -1,54 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
-#
-# This program is free software; you can distribute it and/or modify it
-# under the terms of the GNU General Public License
-# (Version 2 or later) published by the Free Software Foundation.
-#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
-################################################################################
-#
-# \file mpfrhost.kconfig
-# \brief mpfrhost.kconfig of Embtoolkit
-# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# \date May 2009
-################################################################################
-
-choice
- prompt "Version of mpfr you wish"
- default EMBTK_MPFR_HOST_VERSION_2_4_2
- help
- The MPFR library is a C library for multiple-precision
- floating-point computations with correct rounding.
- MPFR is mandatory to build GCC
-
- config EMBTK_MPFR_HOST_VERSION_2_4_2
- bool "mpfr-2.4.2"
- select EMBTK_MPFR_HOST_VERSION_PATCH
- config EMBTK_MPFR_HOST_VERSION_2_4_1
- bool "mpfr-2.4.1"
- select EMBTK_MPFR_HOST_VERSION_PATCH
- config EMBTK_MPFR_HOST_VERSION_2_4_0
- bool "mpfr-2.4.0"
- select EMBTK_MPFR_HOST_VERSION_PATCH
-endchoice
-
-#Version string
-config EMBTK_MPFR_HOST_VERSION_STRING
- string
- default "2.4.2" if EMBTK_MPFR_HOST_VERSION_2_4_2
- default "2.4.1" if EMBTK_MPFR_HOST_VERSION_2_4_1
- default "2.4.0" if EMBTK_MPFR_HOST_VERSION_2_4_0
-
-#Does we need patches?
-config EMBTK_MPFR_HOST_VERSION_PATCH
- bool
-
diff --git a/kconfig/toolchain.kconfig b/kconfig/toolchain.kconfig
index 251c722..de62709 100644
--- a/kconfig/toolchain.kconfig
+++ b/kconfig/toolchain.kconfig
@@ -68,15 +68,15 @@ source "kconfig/linux.kconfig"
endmenu
menu "GMP"
-source "kconfig/gmphost.kconfig"
+source "kconfig/gmp.kconfig"
endmenu
menu "MPFR"
-source "kconfig/mpfrhost.kconfig"
+source "kconfig/mpfr.kconfig"
endmenu
menu "MPC"
-source "kconfig/mpchost.kconfig"
+source "kconfig/mpc.kconfig"
endmenu
#
diff --git a/mk/binutils.mk b/mk/binutils.mk
index f6bf309..f98ef92 100644
--- a/mk/binutils.mk
+++ b/mk/binutils.mk
@@ -23,39 +23,24 @@
# \date May 2009
################################################################################
-BINUTILS_NAME := binutils
-BINUTILS_VERSION := $(call embtk_get_pkgversion,BINUTILS)
-BINUTILS_SITE := http://ftp.gnu.org/gnu/binutils
-BINUTILS_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
-BINUTILS_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/binutils/$(BINUTILS_VERSION)
-BINUTILS_PACKAGE := binutils-$(BINUTILS_VERSION).tar.bz2
-BINUTILS_SRC_DIR := $(TOOLS_BUILD)/binutils-$(BINUTILS_VERSION)
-BINUTILS_BUILD_DIR := $(TOOLS_BUILD)/binutils
+BINUTILS_NAME := binutils
+BINUTILS_VERSION := $(call embtk_get_pkgversion,binutils)
+BINUTILS_SITE := http://ftp.gnu.org/gnu/binutils
+BINUTILS_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
+BINUTILS_PACKAGE := binutils-$(BINUTILS_VERSION).tar.bz2
+BINUTILS_SRC_DIR := $(TOOLS_BUILD)/binutils-$(BINUTILS_VERSION)
+BINUTILS_BUILD_DIR := $(TOOLS_BUILD)/binutils-build
-BINUTILS_MULTILIB := --disable-multilib
+BINUTILS_CONFIGURE_OPTS := --with-sysroot=$(SYSROOT) --disable-werror \
+ --disable-nls --disable-multilib \
+ --with-gmp=$(GMP_HOST_DIR) \
+ --with-mpfr=$(MPFR_HOST_DIR) \
+ --with-mpc=$(MPC_HOST_DIR) \
+ --target=$(STRICT_GNU_TARGET)
+BINUTILS_PREFIX := $(TOOLS)
-binutils_install: $(BINUTILS_BUILD_DIR)/.installed
-
-$(BINUTILS_BUILD_DIR)/.installed: download_binutils \
- $(BINUTILS_BUILD_DIR)/.decompressed $(BINUTILS_BUILD_DIR)/.configured
- @$(MAKE) -C $(BINUTILS_BUILD_DIR) $(J)
- $(MAKE) -C $(BINUTILS_BUILD_DIR) install
- @touch $@
+binutils_install:
+ $(call embtk_install_hostpkg,binutils)
download_binutils:
- $(call embtk_download_pkg,BINUTILS)
-
-$(BINUTILS_BUILD_DIR)/.decompressed:
- $(call embtk_decompress_hostpkg,BINUTILS)
-
-$(BINUTILS_BUILD_DIR)/.configured:
- $(call embtk_generic_message,"binutils: Configuring \
- binutils-$(BINUTILS_VERSION) ...")
- cd $(BINUTILS_BUILD_DIR); CC=$(HOSTCC_CACHED) CXX=$(HOSTCXX_CACHED) \
- $(TOOLS_BUILD)/binutils-$(BINUTILS_VERSION)/configure \
- --prefix=$(TOOLS) --with-sysroot=$(SYSROOT) --disable-werror \
- --disable-nls $(BINUTILS_MULTILIB) \
- --with-gmp=$(GMP_HOST_DIR) --with-mpfr=$(MPFR_HOST_DIR) \
- --with-mpc=$(MPC_HOST_DIR) \
- --target=$(STRICT_GNU_TARGET) --build=$(HOST_BUILD) --host=$(HOST_ARCH)
- @touch $@
+ $(call embtk_download_pkg,binutils)
diff --git a/mk/gmp.mk b/mk/gmp.mk
new file mode 100644
index 0000000..690eea6
--- /dev/null
+++ b/mk/gmp.mk
@@ -0,0 +1,43 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file gmp.mk
+# \brief gmp.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date May 2009
+################################################################################
+
+GMP_HOST_NAME := gmp
+GMP_HOST_VERSION := $(call embtk_get_pkgversion,gmp)
+GMP_HOST_SITE := ftp://ftp.gmplib.org/pub/gmp-$(GMP_HOST_VERSION)
+GMP_HOST_PACKAGE := gmp-$(GMP_HOST_VERSION).tar.bz2
+GMP_HOST_SRC_DIR := $(TOOLS_BUILD)/gmp-$(GMP_HOST_VERSION)
+GMP_HOST_BUILD_DIR := $(TOOLS_BUILD)/gmp-build
+GMP_HOST_DIR := $(HOSTTOOLS)/usr/local/gmp-host
+
+export GMP_HOST_DIR
+
+GMP_HOST_CONFIGURE_OPTS := --disable-shared --enable-static
+GMP_HOST_PREFIX := $(GMP_HOST_DIR)
+
+gmp_host_install:
+ $(call embtk_install_hostpkg,gmp_host)
+
+download_gmp_host:
+ $(call embtk_download_pkg,gmp_host)
diff --git a/mk/gmphost.mk b/mk/gmphost.mk
deleted file mode 100644
index 89bfe61..0000000
--- a/mk/gmphost.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-################################################################################
-#
-# \file gmphost.mk
-# \brief gmphost.mk of Embtoolkit
-# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# \date May 2009
-################################################################################
-
-GMP_HOST_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_GMP_HOST_VERSION_STRING)))
-GMP_HOST_SITE := ftp://ftp.gmplib.org/pub/gmp-$(GMP_HOST_VERSION)
-GMP_HOST_PACKAGE := gmp-$(GMP_HOST_VERSION).tar.bz2
-GMP_HOST_BUILD_DIR := $(TOOLS_BUILD)/gmp
-GMP_HOST_DIR := $(HOSTTOOLS)/usr/local/gmp-host
-
-export GMP_HOST_DIR
-
-gmphost_install: $(GMP_HOST_BUILD_DIR)/.built
-
-$(GMP_HOST_BUILD_DIR)/.built: download_gmp_host \
- $(GMP_HOST_BUILD_DIR)/.decompressed $(GMP_HOST_BUILD_DIR)/.configured
- @cd $(GMP_HOST_BUILD_DIR) && $(MAKE) $(J) && $(MAKE) install
- @touch $@
-
-download_gmp_host:
- @test -e $(DOWNLOAD_DIR)/$(GMP_HOST_PACKAGE) || \
- wget -P $(DOWNLOAD_DIR) $(GMP_HOST_SITE)/$(GMP_HOST_PACKAGE)
-
-$(GMP_HOST_BUILD_DIR)/.decompressed:
- @tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(GMP_HOST_PACKAGE)
- @mkdir -p $(GMP_HOST_BUILD_DIR)
- @touch $@
-
-$(GMP_HOST_BUILD_DIR)/.configured:
- $(call embtk_generic_message,"gmphost: Configuring \
- gmp-$(GMP_HOST_VERSION) ...")
- @mkdir -p $(GMP_HOST_DIR)
- cd $(GMP_HOST_BUILD_DIR); CC=$(HOSTCC_CACHED) CXX=$(HOSTCXX_CACHED) \
- $(TOOLS_BUILD)/gmp-$(GMP_HOST_VERSION)/configure \
- --prefix=$(GMP_HOST_DIR) --disable-shared --enable-static \
- --build=$(HOST_BUILD) --host=$(HOST_ARCH)
- @touch $@
diff --git a/mk/mpc.mk b/mk/mpc.mk
new file mode 100644
index 0000000..320275c
--- /dev/null
+++ b/mk/mpc.mk
@@ -0,0 +1,45 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file mpchost.mk
+# \brief mpchost.mk of Embtoolkit. To build gcc, we need mpc.
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date Jan 2010
+################################################################################
+
+MPC_HOST_NAME := mpc
+MPC_HOST_VERSION := $(call embtk_get_pkgversion,mpc)
+MPC_HOST_SITE := http://www.multiprecision.org/mpc/download
+MPC_HOST_PACKAGE := mpc-$(MPC_HOST_VERSION).tar.gz
+MPC_HOST_SRC_DIR := $(TOOLS_BUILD)/mpc-$(MPC_HOST_VERSION)
+MPC_HOST_BUILD_DIR := $(TOOLS_BUILD)/mpc-build
+MPC_HOST_DIR := $(HOSTTOOLS)/usr/local/mpc-host
+
+export MPC_HOST_DIR
+
+MPC_HOST_CONFIGURE_OPTS := --disable-shared --enable-static \
+ --with-gmp=$(GMP_HOST_DIR) \
+ --with-mpfr=$(MPFR_HOST_DIR)
+MPC_HOST_PREFIX := $(MPC_HOST_DIR)
+
+mpc_host_install:
+ $(call embtk_install_hostpkg,mpc_host)
+
+download_mpc_host:
+ $(call embtk_download_pkg,mpc_host)
diff --git a/mk/mpchost.mk b/mk/mpchost.mk
deleted file mode 100644
index d2f4cc8..0000000
--- a/mk/mpchost.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
-#
-# This program is free software; you can distribute it and/or modify it
-# under the terms of the GNU General Public License
-# (Version 2 or later) published by the Free Software Foundation.
-#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
-################################################################################
-#
-# \file mpchost.mk
-# \brief mpchost.mk of Embtoolkit. To build gcc, we need mpc.
-# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# \date Jan 2010
-################################################################################
-
-MPC_HOST_VERSION:=$(subst ",,$(strip $(CONFIG_EMBTK_MPC_HOST_VERSION_STRING)))
-MPC_HOST_SITE := http://www.multiprecision.org/mpc/download
-MPC_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/mpc
-MPC_HOST_PACKAGE := mpc-$(MPC_HOST_VERSION).tar.gz
-MPC_HOST_BUILD_DIR := $(TOOLS_BUILD)/mpc
-MPC_HOST_DIR := $(HOSTTOOLS)/usr/local/mpc-host
-
-export MPC_HOST_DIR
-
-mpchost_install: $(MPC_HOST_BUILD_DIR)/.installed
-
-$(MPC_HOST_BUILD_DIR)/.installed: download_mpc_host \
- $(MPC_HOST_BUILD_DIR)/.decompressed $(MPC_HOST_BUILD_DIR)/.configured
- $(Q)$(MAKE) -C $(MPC_HOST_BUILD_DIR) $(J)
- $(Q)$(MAKE) -C $(MPC_HOST_BUILD_DIR) install
- @touch $@
-
-$(MPC_HOST_BUILD_DIR)/.decompressed:
- @tar -C $(TOOLS_BUILD) -xzf $(DOWNLOAD_DIR)/$(MPC_HOST_PACKAGE)
-ifeq ($(CONFIG_EMBTK_MPC_NEED_PATCH),y)
- cd $(TOOLS_BUILD)/mpc-$(MPC_HOST_VERSION); \
- patch -p1 < $(DOWNLOAD_DIR)/mpc-$(MPC_HOST_VERSION).patch
-endif
- @mkdir -p $(MPC_HOST_BUILD_DIR)
- @touch $@
-
-download_mpc_host:
- @test -e $(DOWNLOAD_DIR)/$(MPC_HOST_PACKAGE) || \
- wget $(MPC_HOST_SITE)/$(MPC_HOST_PACKAGE) \
- -O $(DOWNLOAD_DIR)/$(MPC_HOST_PACKAGE)
-ifeq ($(CONFIG_EMBTK_MPC_HOST_VERSION_PATCH),y)
- @test -e $(DOWNLOAD_DIR)/mpc-$(MPC_HOST_VERSION).patch || \
- wget $(MPC_PATCH_SITE)/mpc-$(MPC_HOST_VERSION)-*.patch \
- -O $(DOWNLOAD_DIR)/mpc-$(MPC_HOST_VERSION).patch
-endif
-
-$(MPC_HOST_BUILD_DIR)/.configured:
- $(call embtk_generic_message,"Configuring mpc-$(MPC_HOST_VERSION) ...")
- cd $(MPC_HOST_BUILD_DIR); \
- CC=$(HOSTCC_CACHED) \
- CXX=$(HOSTCXX_CACHED) \
- $(TOOLS_BUILD)/mpc-$(MPC_HOST_VERSION)/configure \
- --build=$(HOST_BUILD) --host=$(HOST_ARCH) \
- --prefix=$(MPC_HOST_DIR) --disable-shared --enable-static \
- --with-gmp=$(GMP_HOST_DIR) --with-mpfr=$(MPFR_HOST_DIR)
- @touch $@
diff --git a/mk/mpfr.mk b/mk/mpfr.mk
new file mode 100644
index 0000000..c78ec2c
--- /dev/null
+++ b/mk/mpfr.mk
@@ -0,0 +1,44 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file mpfr.mk
+# \brief mpfr.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date May 2009
+################################################################################
+
+MPFR_HOST_NAME := mpfr
+MPFR_HOST_VERSION := $(call embtk_get_pkgversion,mpfr)
+MPFR_HOST_SITE := http://www.mpfr.org/mpfr-$(MPFR_HOST_VERSION)
+MPFR_HOST_PACKAGE := mpfr-$(MPFR_HOST_VERSION).tar.bz2
+MPFR_HOST_SRC_DIR := $(TOOLS_BUILD)/mpfr-$(MPFR_HOST_VERSION)
+MPFR_HOST_BUILD_DIR := $(TOOLS_BUILD)/mpfr-build
+MPFR_HOST_DIR := $(HOSTTOOLS)/usr/local/mpfr-host
+
+export MPFR_HOST_DIR
+
+MPFR_HOST_CONFIGURE_OPTS := --disable-shared --enable-static
+MPFR_HOST_CONFIGURE_OPTS += --with-gmp=$(GMP_HOST_DIR)
+MPFR_HOST_PREFIX := $(MPFR_HOST_DIR)
+
+mpfr_host_install:
+ $(call embtk_install_hostpkg,mpfr_host)
+
+download_mpfr_host:
+ $(call embtk_download_pkg,mpfr_host)
diff --git a/mk/mpfrhost.mk b/mk/mpfrhost.mk
deleted file mode 100644
index ce2225e..0000000
--- a/mk/mpfrhost.mk
+++ /dev/null
@@ -1,69 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-################################################################################
-#
-# \file mpfrhost.mk
-# \brief mpfrhost.mk of Embtoolkit
-# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# \date May 2009
-################################################################################
-
-MPFR_HOST_VERSION:=$(subst ",,$(strip $(CONFIG_EMBTK_MPFR_HOST_VERSION_STRING)))
-MPFR_HOST_SITE := http://www.mpfr.org/mpfr-$(MPFR_HOST_VERSION)
-MPFR_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/mpfr/$(MPFR_HOST_VERSION)
-MPFR_HOST_PACKAGE := mpfr-$(MPFR_HOST_VERSION).tar.bz2
-MPFR_HOST_BUILD_DIR := $(TOOLS_BUILD)/mpfr
-MPFR_HOST_DIR := $(HOSTTOOLS)/usr/local/mpfr-host
-
-export MPFR_HOST_DIR
-
-mpfrhost_install: $(MPFR_HOST_BUILD_DIR)/.built
-
-$(MPFR_HOST_BUILD_DIR)/.built: download_mpfr_host \
- $(MPFR_HOST_BUILD_DIR)/.decompressed $(MPFR_HOST_BUILD_DIR)/.configured
- @cd $(MPFR_HOST_BUILD_DIR) && $(MAKE) $(J) && $(MAKE) install
- @touch $@
-
-$(MPFR_HOST_BUILD_DIR)/.decompressed:
- @tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(MPFR_HOST_PACKAGE)
-ifeq ($(CONFIG_EMBTK_MPFR_HOST_VERSION_PATCH),y)
- cd $(TOOLS_BUILD)/mpfr-$(MPFR_HOST_VERSION); \
- patch -p1 < $(DOWNLOAD_DIR)/mpfr-$(MPFR_HOST_VERSION).patch
-endif
- @mkdir -p $(MPFR_HOST_BUILD_DIR)
- @touch $@
-
-download_mpfr_host:
- @test -e $(DOWNLOAD_DIR)/$(MPFR_HOST_PACKAGE) || \
- wget $(MPFR_HOST_SITE)/$(MPFR_HOST_PACKAGE) \
- -O $(DOWNLOAD_DIR)/$(MPFR_HOST_PACKAGE)
-ifeq ($(CONFIG_EMBTK_MPFR_HOST_VERSION_PATCH),y)
- @test -e $(DOWNLOAD_DIR)/mpfr-$(MPFR_HOST_VERSION).patch || \
- wget $(MPFR_PATCH_SITE)/mpfr-$(MPFR_HOST_VERSION)-*.patch \
- -O $(DOWNLOAD_DIR)/mpfr-$(MPFR_HOST_VERSION).patch
-endif
-
-$(MPFR_HOST_BUILD_DIR)/.configured:
- $(call embtk_generic_message,"mpfrhost: Configuring \
- mpfr-$(MPFR_HOST_VERSION) ...")
- @mkdir -p $(MPFR_HOST_DIR)
- cd $(MPFR_HOST_BUILD_DIR); CC=$(HOSTCC_CACHED) CXX=$(HOSTCXX_CACHED) \
- $(TOOLS_BUILD)/mpfr-$(MPFR_HOST_VERSION)/configure \
- --prefix=$(MPFR_HOST_DIR) --disable-shared --enable-static \
- --with-gmp=$(GMP_HOST_DIR) --build=$(HOST_BUILD) --host=$(HOST_ARCH)
- @touch $@
diff --git a/mk/toolchain.mk b/mk/toolchain.mk
index 57168a8..780371f 100644
--- a/mk/toolchain.mk
+++ b/mk/toolchain.mk
@@ -33,9 +33,9 @@ TARGETSTRIP := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-strip
TARGETOBJDUMP := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-objdump
TARGETOBJCOPY := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-objcopy
__TARGET_CFLAGS := $(subst ",,$(strip $(CONFIG_EMBTK_TARGET_COMPILER_CFLAGS)))
-__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SIZE_OPTIMIZED),-Os,)
-__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SPEED_OPTIMIZED),-O3,)
-__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_WITH_DEBUG_DATA),-g,)
+__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SIZE_OPTIMIZED),-Os)
+__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SPEED_OPTIMIZED),-O3)
+__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_WITH_DEBUG_DATA),-g)
TARGET_CFLAGS := $(strip $(__TARGET_CFLAGS))
CROSS_COMPILE := $(TOOLS)/bin/$(STRICT_GNU_TARGET)-
@@ -57,13 +57,13 @@ export LIBDIR
include $(EMBTK_ROOT)/mk/ccache.mk
#GMP on host
-include $(EMBTK_ROOT)/mk/gmphost.mk
+include $(EMBTK_ROOT)/mk/gmp.mk
#MPFR
-include $(EMBTK_ROOT)/mk/mpfrhost.mk
+include $(EMBTK_ROOT)/mk/mpfr.mk
#MPC
-include $(EMBTK_ROOT)/mk/mpchost.mk
+include $(EMBTK_ROOT)/mk/mpc.mk
#binutils
include $(EMBTK_ROOT)/mk/binutils.mk
@@ -91,7 +91,7 @@ include $(EMBTK_ROOT)/mk/eglibc.mk
TOOLCHAINBUILD := mkinitialpath ccache_install \
$(AUTOTOOLS_INSTALL) $(EMBTK_CMAKE_INSTALL) \
kernel-headers_install \
- gmphost_install mpfrhost_install mpchost_install \
+ gmp_host_install mpfr_host_install mpc_host_install \
binutils_install gcc1_install eglibc-headers_install \
gcc2_install eglibc_install gcc3_install
else
@@ -100,7 +100,7 @@ include $(EMBTK_ROOT)/mk/uclibc.mk
TOOLCHAINBUILD := mkinitialpath ccache_install \
$(AUTOTOOLS_INSTALL) $(EMBTK_CMAKE_INSTALL) \
kernel-headers_install \
- gmphost_install mpfrhost_install mpchost_install \
+ gmp_host_install mpfr_host_install mpc_host_install \
binutils_install gcc1_install uclibc_headers_install \
gcc2_install uclibc_install gcc3_install
endif