summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-01-30 22:53:45 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-01-30 22:53:45 +0100
commited1ed9bf360c8dbca99e549ba29c48f5e63f3ee9 (patch)
tree4baaa762336d95505a505b1640320c448f4a7900
parent64242f6f2b4b80b8756e2dffc8ad302b7bcaf5ae (diff)
downloadembtoolkit-ed1ed9bf360c8dbca99e549ba29c48f5e63f3ee9.tar.gz
embtoolkit-ed1ed9bf360c8dbca99e549ba29c48f5e63f3ee9.tar.bz2
embtoolkit-ed1ed9bf360c8dbca99e549ba29c48f5e63f3ee9.tar.xz
Toolchain: eglibc: build gperf for when eglibc EGLIBC_LOCALE_CODE is selected
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--kconfig/gperf_host.kconfig44
-rw-r--r--kconfig/hosttools-buildopts.kconfig4
-rw-r--r--kconfig/toolchain.kconfig16
-rw-r--r--mk/gperf_host.mk34
-rw-r--r--mk/packages.mk7
-rw-r--r--mk/toolchain.mk14
-rw-r--r--packages/misc/gperf/gperf.kconfig2
-rw-r--r--packages/misc/gperf/gperf.mk14
-rw-r--r--packages/misc/misc.kconfig1
-rw-r--r--packages/misc/misc.mk6
10 files changed, 111 insertions, 31 deletions
diff --git a/kconfig/gperf_host.kconfig b/kconfig/gperf_host.kconfig
new file mode 100644
index 0000000..89088d4
--- /dev/null
+++ b/kconfig/gperf_host.kconfig
@@ -0,0 +1,44 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2011-2012 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 gperf_host.kconfig
+# \brief gperf_host.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date June 2011
+################################################################################
+
+config EMBTK_HOST_HAVE_GPERF
+ bool
+ help
+ This is GNU gperf. It is a program that generates perfect hash
+ functions for sets of key words.
+ A perfect hash function is:
+ A hash function and a data structure that allows
+ recognition of a key word in a set of words using
+ exactly 1 probe into the data structure.
+
+if EMBTK_HOST_HAVE_GPERF
+config EMBTK_GPERF_HOST_VERSION_STRING
+ string
+ default "3.0.4"
+config EMBTK_GPERF_HOST_NEED_PATCH
+ bool
+config EMBTK_GPERF_HOST_NEED_AUTORECONF
+ bool
+endif
diff --git a/kconfig/hosttools-buildopts.kconfig b/kconfig/hosttools-buildopts.kconfig
index bb2c918..7314132 100644
--- a/kconfig/hosttools-buildopts.kconfig
+++ b/kconfig/hosttools-buildopts.kconfig
@@ -36,8 +36,10 @@ config EMBTK_HAVE_MKIMAGE
help
u-boot mkimage tool.
+# zlib for host
source kconfig/zlib_host.kconfig
-
+# gperf for host
+source kconfig/gperf_host.kconfig
comment "-----------------------------"
comment "Build options"
diff --git a/kconfig/toolchain.kconfig b/kconfig/toolchain.kconfig
index de62709..625ce9b 100644
--- a/kconfig/toolchain.kconfig
+++ b/kconfig/toolchain.kconfig
@@ -101,3 +101,19 @@ source kconfig/pkgconfig.kconfig
# fakeroot
#
source kconfig/fakeroot.kconfig
+
+#
+# gperf for host
+#
+source kconfig/gperf_host.kconfig
+
+#
+# Select of optional features
+#
+config EMBTK_TOOLCHAIN_PREDEP_GPERF_HOST
+ bool
+ default y if KEMBTK_EGLIBC_OPTION_EGLIBC_LOCALE_CODE
+ select EMBTK_HOST_HAVE_GPERF
+ help
+ select gperf for host if needed to build the toolchain.
+
diff --git a/mk/gperf_host.mk b/mk/gperf_host.mk
new file mode 100644
index 0000000..55e2784
--- /dev/null
+++ b/mk/gperf_host.mk
@@ -0,0 +1,34 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2011-2012 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 gperf_host.mk
+# \brief gperf_host.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date June 2011
+################################################################################
+
+GPERF_HOST_NAME := gperf
+GPERF_HOST_VERSION := $(call embtk_get_pkgversion,gperf_host)
+GPERF_HOST_SITE := http://ftp.gnu.org/gnu/gperf
+GPERF_HOST_PACKAGE := gperf-$(GPERF_HOST_VERSION).tar.gz
+GPERF_HOST_SRC_DIR := $(TOOLS_BUILD)/gperf-$(GPERF_HOST_VERSION)
+GPERF_HOST_BUILD_DIR := $(TOOLS_BUILD)/gperf-$(GPERF_HOST_VERSION)
+
+gperf_host_clean:
+ $(embtk_pinfo,"Clean up gperf for host...")
diff --git a/mk/packages.mk b/mk/packages.mk
index 4c0e0d2..f9830b0 100644
--- a/mk/packages.mk
+++ b/mk/packages.mk
@@ -28,14 +28,15 @@ HOSTTOOLS_COMPONENTS-y := mkimage_install pkgconfig_install
#
# Common include for target and host
#
+include $(EMBTK_ROOT)/mk/fakeroot.mk
+include $(EMBTK_ROOT)/mk/gperf_host.mk
+HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_GPERF) += gperf_host_install
+include $(EMBTK_ROOT)/mk/makedevs.mk
include $(EMBTK_ROOT)/mk/mkimage.mk
include $(EMBTK_ROOT)/mk/mtd-utils.mk
include $(EMBTK_ROOT)/mk/pkgconfig.mk
-include $(EMBTK_ROOT)/mk/fakeroot.mk
-include $(EMBTK_ROOT)/mk/makedevs.mk
include $(EMBTK_ROOT)/mk/squashfs.mk
include $(EMBTK_ROOT)/mk/zlib_host.mk
-
HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_ZLIB) += zlib_host_install
diff --git a/mk/toolchain.mk b/mk/toolchain.mk
index 35e97a4..bde654e 100644
--- a/mk/toolchain.mk
+++ b/mk/toolchain.mk
@@ -102,8 +102,10 @@ TOOLCHAIN_PACKAGE := toolchain-$(GNU_TARGET)-$(__embtk_toolchain_clib)-$(EMBTK_M
TOOLCHAIN_DIR := $(EMBTK_GENERATED)/toolchain-$(GNU_TARGET)-$(__embtk_toolchain_clib)-$(EMBTK_MCU_FLAG)
TOOLCHAIN_BUILD_DIR := $(TOOLCHAIN_DIR)
-TOOLCHAIN_PRE_DEPS := ccache_install $(AUTOTOOLS_INSTALL)
-TOOLCHAIN_PRE_DEPS += $(EMBTK_CMAKE_INSTALL)
+TOOLCHAIN_PRE_DEPS-y := ccache_install $(AUTOTOOLS_INSTALL)
+TOOLCHAIN_PRE_DEPS-y += $(EMBTK_CMAKE_INSTALL)
+TOOLCHAIN_PRE_DEPS-y += $(if $(CONFIG_EMBTK_TOOLCHAIN_PREDEP_GPERF_HOST), \
+ gperf_host_install)
TOOLCHAIN_DEPS := linux_headers_install gmp_host_install
TOOLCHAIN_DEPS += mpfr_host_install mpc_host_install binutils_install
@@ -133,7 +135,7 @@ endef
define ___embtk_toolchain_decompress
cd $(EMBTK_ROOT) && tar xjf $(TOOLCHAIN_DIR)/$(TOOLCHAIN_PACKAGE)
- $(MAKE) mkinitialpath $(TOOLCHAIN_PRE_DEPS)
+ $(MAKE) mkinitialpath $(TOOLCHAIN_PRE_DEPS-y)
mkdir -p $(GCC3_BUILD_DIR)
touch $(GCC3_BUILD_DIR)/.installed
touch $(GCC3_BUILD_DIR)/.gcc3_post_install
@@ -159,7 +161,7 @@ define __embtk_toolchain_build
$(foreach pkg,$(__embtk_rootfs_pkgs-y),$(MAKE) $(pkg)_clean;)
rm -rf $(SYSROOT)
$(__embtk_mk_initsysrootdirs)
- $(MAKE) mkinitialpath $(TOOLCHAIN_PRE_DEPS) $(TOOLCHAIN_DEPS)
+ $(MAKE) mkinitialpath $(TOOLCHAIN_PRE_DEPS-y) $(TOOLCHAIN_DEPS)
touch $(TOOLCHAIN_DIR)/.installed)
$(if $(findstring addons,$(1)),
$(call embtk_pinfo,"Building new $(GNU_TARGET)/$(EMBTK_MCU_FLAG) toolchain ADDONS - please wait...")
@@ -172,7 +174,7 @@ define __embtk_toolchain_build
$(foreach addon,$(__embtk_toolchain_addons-n),
$(MAKE) $(addon)_clean;))
$(if $(TOOLCHAIN_ADDONS-y),
- $(MAKE) $(TOOLCHAIN_PRE_DEPS) $(TOOLCHAIN_ADDONS-y))
+ $(MAKE) $(TOOLCHAIN_PRE_DEPS-y) $(TOOLCHAIN_ADDONS-y))
touch $(TOOLCHAIN_ADDONS_BUILD_DIR)/.installed)
$(if $(findstring core,$(1))$(findstring addons,$(1)),
$(__embtk_toolchain_symlinktools)
@@ -208,7 +210,7 @@ toolchain_clean:
$(Q)$(__embtk_toolchain_clean)
# Download target for offline build
-TOOLCHAIN_ALL_DEPS := $(TOOLCHAIN_PRE_DEPS) $(TOOLCHAIN_DEPS)
+TOOLCHAIN_ALL_DEPS := $(TOOLCHAIN_PRE_DEPS-y) $(TOOLCHAIN_DEPS)
TOOLCHAIN_ALL_DEPS += $(TOOLCHAIN_ADDONS_DEPS)
packages_fetch:: $(patsubst %_install,download_%,$(TOOLCHAIN_ALL_DEPS))
diff --git a/packages/misc/gperf/gperf.kconfig b/packages/misc/gperf/gperf.kconfig
index a099ea4..1304a43 100644
--- a/packages/misc/gperf/gperf.kconfig
+++ b/packages/misc/gperf/gperf.kconfig
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2011 Abdoulaye Walsimou GAYE.
+# Copyright(C) 2011-2012 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
diff --git a/packages/misc/gperf/gperf.mk b/packages/misc/gperf/gperf.mk
index 9c68cbd..cfbbf74 100644
--- a/packages/misc/gperf/gperf.mk
+++ b/packages/misc/gperf/gperf.mk
@@ -45,17 +45,3 @@ GPERF_CONFIGURE_ENV :=
GPERF_CONFIGURE_OPTS :=
GPERF_DEPS :=
-
-#
-# gperf for for host
-#
-GPERF_HOST_NAME := $(GPERF_NAME)
-GPERF_HOST_VERSION := $(GPERF_VERSION)
-GPERF_HOST_SITE := $(GPERF_SITE)
-GPERF_HOST_SITE_MIRROR1 := $(GPERF_SITE_MIRROR1)
-GPERF_HOST_SITE_MIRROR2 := $(GPERF_SITE_MIRROR2)
-GPERF_HOST_SITE_MIRROR3 := $(GPERF_SITE_MIRROR3)
-GPERF_HOST_PACKAGE := $(GPERF_PACKAGE)
-GPERF_HOST_SRC_DIR := $(TOOLS_BUILD)/gperf-$(GPERF_VERSION)
-GPERF_HOST_BUILD_DIR := $(TOOLS_BUILD)/gperf-$(GPERF_VERSION)
-
diff --git a/packages/misc/misc.kconfig b/packages/misc/misc.kconfig
index 1c00f69..972b834 100644
--- a/packages/misc/misc.kconfig
+++ b/packages/misc/misc.kconfig
@@ -26,7 +26,6 @@
source packages/misc/expat/expat.kconfig
source packages/misc/gettext/gettext.kconfig
source packages/misc/glib/glib.kconfig
-source packages/misc/gperf/gperf.kconfig
source packages/misc/intltool/intltool.kconfig
source packages/misc/libelf/libelf.kconfig
source packages/misc/libxml/libxml.kconfig
diff --git a/packages/misc/misc.mk b/packages/misc/misc.mk
index 6944fd9..3f7c999 100644
--- a/packages/misc/misc.mk
+++ b/packages/misc/misc.mk
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2010-2011 Abdoulaye Walsimou GAYE.
+# Copyright(C) 2010-2012 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
@@ -36,10 +36,6 @@ include $(EMBTK_ROOT)/packages/misc/glib/glib.mk
ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_GLIB) += glib_install
HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_GLIB) += glib_host_install
-#gperf
-include $(EMBTK_ROOT)/packages/misc/gperf/gperf.mk
-HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_GPERF) += gperf_host_install
-
# intltool
include $(EMBTK_ROOT)/packages/misc/intltool/intltool.mk
HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_INTLTOOL) += intltool_host_install