All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups
@ 2012-04-17 14:45 Thomas Petazzoni
  2012-04-17 14:45 ` [Buildroot] [PATCH 01/22] Remove the DATE variable Thomas Petazzoni
                   ` (21 more replies)
  0 siblings, 22 replies; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

The following changes since commit 2f41adabc5a12fcca1de5b6c296c2206b518abff:

  New package: libdmtx (2012-04-17 00:21:39 +0200)

are available in the git repository at:
  git://git.free-electrons.com/users/thomas-petazzoni/buildroot.git for-2012.05/misc-cleanups

Thomas Petazzoni (22):
      Remove the DATE variable
      Remove cc-option: not used anywhere
      Remove filename extension crap for OS compatibility
      kconfig: do not use HOST_LOADLIBES anymore
      Rename Makefile.autotools.in to pkg-autotargets.mk
      Rename Makefile.cmake.in to pkg-cmaketargets.mk
      Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk
      pkg-*.mk: add some comments, update some existing comments
      Remove unused .fakeroot.* mechanism
      Move the manual build infrastructure to docs/manual/manual.mk
      cmake: move creation of toolchain file to package/pkg-cmaketargets.mk
      package: remove unused STRIP_DISCARD_ALL variable
      Remove unused GNU_TARGET_SUFFIX
      toolchain: remove useless indirect variables
      gcc: remove unused EXTRA_GCC2_CONFIG_OPTIONS
      gcc: remove unused EXTRA_GCC4_CONFIG_OPTIONS
      gcc: remove unused ARCH_FPU_SUFFIX
      gcc: move version/snap variables to gcc-uclibc-4.x.mk
      toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in
      gcc: remove unused EXTRA_GCC1_CONFIG_OPTIONS
      mklibs: remove support
      xtensa: remove support for this architecture

 Makefile                                           |  117 +---
 boot/uboot/uboot.mk                                |    1 -
 docs/manual/manual.mk                              |   48 ++
 fs/common.mk                                       |    2 -
 fs/iso9660/iso9660.mk                              |    2 -
 linux/Config.in                                    |    2 +-
 package/Makefile.in                                |   12 +-
 package/Makefile.package.in                        |  750 --------------------
 package/binutils/binutils.mk                       |    2 +-
 package/ltrace/Config.in                           |    2 +-
 .../{Makefile.autotools.in => pkg-autotargets.mk}  |    4 +-
 package/{Makefile.cmake.in => pkg-cmaketargets.mk} |   22 +
 package/pkg-download.mk                            |  228 ++++++
 package/pkg-gentargets.mk                          |  456 ++++++++++++
 package/pkg-utils.mk                               |   85 +++
 support/kconfig/Makefile.br                        |    4 +-
 support/kconfig/patches/10-br-build-system.patch   |   12 +-
 target/Config.in.arch                              |   40 -
 target/device/xtensa/device_table.txt              |  189 -----
 target/xtensa/.gitignore                           |    1 -
 target/xtensa/Makefile.in                          |    1 -
 target/xtensa/defconfig                            |  129 ----
 target/xtensa/patch.in                             |   33 -
 target/xtensa/setup-config                         |   57 --
 target/xtensa/uClibc-0.9.30.config                 |  245 -------
 target/xtensa/uClibc.config                        |  190 -----
 target/xtensa/xt-buildroot-overlay-install         |  488 -------------
 toolchain/Makefile.in                              |    6 -
 toolchain/gcc/Makefile.in                          |   70 --
 toolchain/gcc/gcc-uclibc-4.x.mk                    |   87 ++-
 toolchain/gdb/gdb.mk                               |    5 -
 toolchain/mklibs/Config.in                         |    6 -
 toolchain/mklibs/mklibs.mk                         |   49 --
 toolchain/mklibs/mklibs.py                         |  597 ----------------
 toolchain/toolchain-buildroot.mk                   |    1 -
 toolchain/toolchain-buildroot/Config.in.2          |    1 -
 toolchain/toolchain-common.in                      |    2 +-
 toolchain/toolchain-crosstool-ng.mk                |    1 -
 toolchain/toolchain-external.mk                    |    1 -
 39 files changed, 935 insertions(+), 3013 deletions(-)
 create mode 100644 docs/manual/manual.mk
 delete mode 100644 package/Makefile.package.in
 rename package/{Makefile.autotools.in => pkg-autotargets.mk} (98%)
 rename package/{Makefile.cmake.in => pkg-cmaketargets.mk} (86%)
 create mode 100644 package/pkg-download.mk
 create mode 100644 package/pkg-gentargets.mk
 create mode 100644 package/pkg-utils.mk
 delete mode 100644 target/device/xtensa/device_table.txt
 delete mode 100644 target/xtensa/.gitignore
 delete mode 100644 target/xtensa/Makefile.in
 delete mode 100644 target/xtensa/defconfig
 delete mode 100644 target/xtensa/patch.in
 delete mode 100644 target/xtensa/setup-config
 delete mode 100644 target/xtensa/uClibc-0.9.30.config
 delete mode 100644 target/xtensa/uClibc.config
 delete mode 100644 target/xtensa/xt-buildroot-overlay-install
 delete mode 100644 toolchain/Makefile.in
 delete mode 100644 toolchain/gcc/Makefile.in
 delete mode 100644 toolchain/mklibs/Config.in
 delete mode 100644 toolchain/mklibs/mklibs.mk
 delete mode 100644 toolchain/mklibs/mklibs.py

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 01/22] Remove the DATE variable
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-21 13:05   ` Arnout Vandecappelle
  2012-04-17 14:45 ` [Buildroot] [PATCH 02/22] Remove cc-option: not used anywhere Thomas Petazzoni
                   ` (20 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

This variable was only used by uboot.mk to add a #define DATE into the
U-Boot .h configuration file. But such a definition does not seem to
be used by the mainline U-Boot, so there's no reason to keep it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile            |    1 -
 boot/uboot/uboot.mk |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 3a09417..f56c8ee 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,6 @@ endif
 TOPDIR:=$(shell pwd)
 CONFIG_CONFIG_IN=Config.in
 CONFIG=support/kconfig
-DATE:=$(shell date +%Y%m%d)
 
 # Compute the full local version string so packages can use it as-is
 # Need to export it, so it can be got from environment in children (eg. mconf)
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index db9de8d..83696be 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -69,7 +69,6 @@ define UBOOT_CONFIGURE_CMDS
 	@echo "/* Add a wrapper around the values Buildroot sets. */" >> $(@D)/include/config.h
 	@echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h
 	@echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h
-	$(call insert_define,DATE,$(DATE))
 	$(call insert_define,CONFIG_LOAD_SCRIPTS,1)
 	$(call insert_define,CONFIG_IPADDR,$(BR2_TARGET_UBOOT_IPADDR))
 	$(call insert_define,CONFIG_GATEWAYIP,$(BR2_TARGET_UBOOT_GATEWAY))
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 02/22] Remove cc-option: not used anywhere
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
  2012-04-17 14:45 ` [Buildroot] [PATCH 01/22] Remove the DATE variable Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 13:54   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 03/22] Remove filename extension crap for OS compatibility Thomas Petazzoni
                   ` (19 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index f56c8ee..90c2086 100644
--- a/Makefile
+++ b/Makefile
@@ -177,13 +177,6 @@ BUILD_DIR:=$(BASE_DIR)/build
 
 ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 
-# cc-option
-# Usage: cflags-y+=$(call cc-option, -march=winchip-c6, -march=i586)
-# sets -march=winchip-c6 if supported else falls back to -march=i586
-# without checking the latter.
-cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
-	> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
-
 #############################################################
 #
 # Hide troublesome environment variables from sub processes
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 03/22] Remove filename extension crap for OS compatibility
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
  2012-04-17 14:45 ` [Buildroot] [PATCH 01/22] Remove the DATE variable Thomas Petazzoni
  2012-04-17 14:45 ` [Buildroot] [PATCH 02/22] Remove cc-option: not used anywhere Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 14:03   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 04/22] kconfig: do not use HOST_LOADLIBES anymore Thomas Petazzoni
                   ` (18 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

The only variable that is used is HOST_LOADLIBES, defined for the
cygwin case in the kconfig build. Since we don't support cygwin,
simply get rid of this.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/Makefile b/Makefile
index 90c2086..e03fed5 100644
--- a/Makefile
+++ b/Makefile
@@ -194,34 +194,6 @@ unexport CONFIG_SITE
 
 GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
 
-#############################################################
-#
-# Setup the proper filename extensions for the host
-#
-##############################################################
-ifneq ($(findstring linux,$(GNU_HOST_NAME)),)
-HOST_EXEEXT:=
-HOST_LIBEXT:=.a
-HOST_SHREXT:=.so
-endif
-ifneq ($(findstring apple,$(GNU_HOST_NAME)),)
-HOST_EXEEXT:=
-HOST_LIBEXT:=.a
-HOST_SHREXT:=.dylib
-endif
-ifneq ($(findstring cygwin,$(GNU_HOST_NAME)),)
-HOST_EXEEXT:=.exe
-HOST_LIBEXT:=.lib
-HOST_SHREXT:=.dll
-HOST_LOADLIBES=-lcurses -lintl
-export HOST_LOADLIBES
-endif
-ifneq ($(findstring mingw,$(GNU_HOST_NAME)),)
-HOST_EXEEXT:=.exe
-HOST_LIBEXT:=.lib
-HOST_SHREXT:=.dll
-endif
-
 ##############################################################
 #
 # The list of stuff to build for the target toolchain
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 04/22] kconfig: do not use HOST_LOADLIBES anymore
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 03/22] Remove filename extension crap for OS compatibility Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 14:05   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 05/22] Rename Makefile.autotools.in to pkg-autotargets.mk Thomas Petazzoni
                   ` (17 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 support/kconfig/Makefile.br                      |    4 ++--
 support/kconfig/patches/10-br-build-system.patch |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/support/kconfig/Makefile.br b/support/kconfig/Makefile.br
index c24b6b5..2f8b6ba 100644
--- a/support/kconfig/Makefile.br
+++ b/support/kconfig/Makefile.br
@@ -22,10 +22,10 @@ host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxx
 HOST_EXTRACFLAGS += -I$(obj)
 
 $(host-csingle): %: %.c
-	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $(obj)/$@
+	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@
 
 $(host-cmulti): %: $(host-cobjs) $(host-cshlib)
-	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
+	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
 
 $(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib)
 	$(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
diff --git a/support/kconfig/patches/10-br-build-system.patch b/support/kconfig/patches/10-br-build-system.patch
index 85125e5..c5d9a75 100644
--- a/support/kconfig/patches/10-br-build-system.patch
+++ b/support/kconfig/patches/10-br-build-system.patch
@@ -3,10 +3,10 @@
  foo.h       |   12 ++++++++++++
  2 files changed, 65 insertions(+)
 
-Index: config/Makefile.br
+Index: kconfig/Makefile.br
 ===================================================================
 --- /dev/null
-+++ config/Makefile.br
++++ kconfig/Makefile.br
 @@ -0,0 +1,53 @@
 +src := .
 +top_srcdir=../../
@@ -32,10 +32,10 @@ Index: config/Makefile.br
 +HOST_EXTRACFLAGS += -I$(obj)
 +
 +$(host-csingle): %: %.c
-+	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $(obj)/$@
++	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@
 +
 +$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
-+	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
++	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
 +
 +$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib)
 +	$(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
@@ -61,10 +61,10 @@ Index: config/Makefile.br
 +
 +FORCE:
 +.PHONY: FORCE clean distclean
-Index: config/foo.h
+Index: kconfig/foo.h
 ===================================================================
 --- /dev/null
-+++ config/foo.h
++++ kconfig/foo.h
 @@ -0,0 +1,12 @@
 +#ifndef __KCONFIG_FOO_H
 +#define __KCONFIG_FOO_H
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 05/22] Rename Makefile.autotools.in to pkg-autotargets.mk
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 04/22] kconfig: do not use HOST_LOADLIBES anymore Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 14:08   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 06/22] Rename Makefile.cmake.in to pkg-cmaketargets.mk Thomas Petazzoni
                   ` (16 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.in                                |    2 +-
 .../{Makefile.autotools.in => pkg-autotargets.mk}  |    0
 2 files changed, 1 insertions(+), 1 deletions(-)
 rename package/{Makefile.autotools.in => pkg-autotargets.mk} (100%)

diff --git a/package/Makefile.in b/package/Makefile.in
index c344c6b..20fac9a 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -299,6 +299,6 @@ else
 SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared
 endif
 
-include package/Makefile.autotools.in
+include package/pkg-autotargets.mk
 include package/Makefile.cmake.in
 include package/Makefile.package.in
diff --git a/package/Makefile.autotools.in b/package/pkg-autotargets.mk
similarity index 100%
rename from package/Makefile.autotools.in
rename to package/pkg-autotargets.mk
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 06/22] Rename Makefile.cmake.in to pkg-cmaketargets.mk
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 05/22] Rename Makefile.autotools.in to pkg-autotargets.mk Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 14:06   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 07/22] Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk Thomas Petazzoni
                   ` (15 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.in                                |    2 +-
 package/{Makefile.cmake.in => pkg-cmaketargets.mk} |    0
 2 files changed, 1 insertions(+), 1 deletions(-)
 rename package/{Makefile.cmake.in => pkg-cmaketargets.mk} (100%)

diff --git a/package/Makefile.in b/package/Makefile.in
index 20fac9a..ab5ea48 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -300,5 +300,5 @@ SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared
 endif
 
 include package/pkg-autotargets.mk
-include package/Makefile.cmake.in
+include package/pkg-cmaketargets.mk
 include package/Makefile.package.in
diff --git a/package/Makefile.cmake.in b/package/pkg-cmaketargets.mk
similarity index 100%
rename from package/Makefile.cmake.in
rename to package/pkg-cmaketargets.mk
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 07/22] Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 06/22] Rename Makefile.cmake.in to pkg-cmaketargets.mk Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 14:07   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 08/22] pkg-*.mk: add some comments, update some existing comments Thomas Petazzoni
                   ` (14 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.in         |    4 +-
 package/Makefile.package.in |  750 -------------------------------------------
 package/pkg-download.mk     |  219 +++++++++++++
 package/pkg-gentargets.mk   |  458 ++++++++++++++++++++++++++
 package/pkg-utils.mk        |   72 ++++
 5 files changed, 752 insertions(+), 751 deletions(-)
 delete mode 100644 package/Makefile.package.in
 create mode 100644 package/pkg-download.mk
 create mode 100644 package/pkg-gentargets.mk
 create mode 100644 package/pkg-utils.mk

diff --git a/package/Makefile.in b/package/Makefile.in
index ab5ea48..943017b 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -299,6 +299,8 @@ else
 SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared
 endif
 
+include package/pkg-utils.mk
+include package/pkg-download.mk
 include package/pkg-autotargets.mk
 include package/pkg-cmaketargets.mk
-include package/Makefile.package.in
+include package/pkg-gentargets.mk
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
deleted file mode 100644
index f7b6566..0000000
--- a/package/Makefile.package.in
+++ /dev/null
@@ -1,750 +0,0 @@
-################################################################################
-# Generic package infrastructure
-#
-# This file implements an infrastructure that eases development of
-# package .mk files. It should be used for all non-autotools based
-# packages. Autotools-based packages should use the specialized
-# autotools infrastructure in package/Makefile.autotools.in.
-#
-# See the Buildroot documentation for details on the usage of this
-# infrastructure
-#
-# In terms of implementation, this generic infrastructure requires the
-# .mk file to specify:
-#
-#   1. Metadata informations about the package: name, version,
-#      download URL, etc.
-#
-#   2. Description of the commands to be executed to configure, build
-#      and install the package
-#
-# The autotools infrastructure specializes this generic infrastructure
-# by already implementing the configure, build and install steps.
-################################################################################
-
-# UPPERCASE Macro -- transform its argument to uppercase and replace dots and
-# hyphens to underscores
-
-# Heavily inspired by the up macro from gmsl (http://gmsl.sf.net)
-# This is approx 5 times faster than forking a shell and tr, and
-# as this macro is used a lot it matters
-# This works by creating translation character pairs (E.G. a:A b:B)
-# and then looping though all of them running $(subst from,to,text)
-[FROM] := a b c d e f g h i j k l m n o p q r s t u v w x y z . -
-[TO]   := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _
-
-UPPERCASE = $(strip $(eval __tmp := $1) \
-     $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \
-	$(eval __tmp :=	\
-		$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\
-			$(__tmp)))) \
-     $(__tmp))
-
-define KCONFIG_ENABLE_OPT
-       $(SED) "/\\<$(1)\\>/d" $(2)
-       echo "$(1)=y" >> $(2)
-endef
-
-define KCONFIG_SET_OPT
-       $(SED) "/\\<$(1)\\>/d" $(3)
-       echo "$(1)=$(2)" >> $(3)
-endef
-
-define KCONFIG_DISABLE_OPT
-       $(SED) "/\\<$(1)\\>/d" $(2)
-       echo "# $(1) is not set" >> $(2)
-endef
-
-# Helper functions to determine the name of a package and its
-# directory from its makefile directory, using the $(MAKEFILE_LIST)
-# variable provided by make. This is used by the *TARGETS macros to
-# automagically find where the package is located. Note that the
-# pkgdir macro is carefully written to handle the case of the Linux
-# package, for which the package directory is an empty string.
-define pkgdir
-$(dir $(lastword $(MAKEFILE_LIST)))
-endef
-
-define pkgname
-$(lastword $(subst /, ,$(call pkgdir)))
-endef
-
-define pkgparentdir
-$(patsubst %$(call pkgname)/,%,$(call pkgdir))
-endef
-
-# Define extractors for different archive suffixes
-INFLATE.bz2  = $(BZCAT)
-INFLATE.gz   = $(ZCAT)
-INFLATE.tbz  = $(BZCAT)
-INFLATE.tbz2 = $(BZCAT)
-INFLATE.tgz  = $(ZCAT)
-INFLATE.xz   = $(XZCAT)
-INFLATE.tar  = cat
-
-# MESSAGE Macro -- display a message in bold type
-MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
-TERM_BOLD := $(shell tput smso)
-TERM_RESET := $(shell tput rmso)
-
-# Download method commands
-WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
-SVN:=$(call qstrip,$(BR2_SVN))
-BZR:=$(call qstrip,$(BR2_BZR))
-GIT:=$(call qstrip,$(BR2_GIT))
-HG:=$(call qstrip,$(BR2_HG)) $(QUIET)
-SCP:=$(call qstrip,$(BR2_SCP)) $(QUIET)
-SSH:=$(call qstrip,$(BR2_SSH)) $(QUIET)
-LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
-
-# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK'
-# used by the _source-check target and 'SHOW_EXTERNAL_DEPS', used by the
-# external-deps target.
-DL_MODE=DOWNLOAD
-
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(TOPDIR)/dl
-endif
-
-#
-# URI scheme helper functions
-# Example URIs:
-# * http://www.example.com/dir/file
-# * scp://www.example.com:dir/file (with domainseparator :)
-#
-# geturischeme: http
-geturischeme=$(firstword $(subst ://, ,$(call qstrip,$(1))))
-# stripurischeme: www.example.com/dir/file
-stripurischeme=$(lastword $(subst ://, ,$(call qstrip,$(1))))
-# domain: www.example.com
-domain=$(firstword $(subst $(call domainseparator,$(2)), ,$(call stripurischeme,$(1))))
-# notdomain: dir/file
-notdomain=$(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$(call stripurischeme,$(1)))
-#
-# default domainseparator is /, specify alternative value as first argument
-domainseparator=$(if $(1),$(1),/)
-
-################################################################################
-# The DOWNLOAD_{GIT,SVN,BZR,HG,LOCALFILES} helpers are in charge of getting a
-# working copy of the source repository for their corresponding SCM,
-# checking out the requested version / commit / tag, and create an
-# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with
-# ssh authentication. DOWNLOAD_WGET is the normal wget-based download
-# mechanism.
-#
-# The SOURCE_CHECK_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers are in charge of
-# simply checking that the source is available for download. This can be used
-# to make sure one will be able to get all the sources needed for
-# one's build configuration.
-#
-# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers simply
-# output to the console the names of the files that will be downloaded, or path
-# and revision of the source repositories, producing a list of all the
-# "external dependencies" of a given build configuration.
-################################################################################
-
-define DOWNLOAD_GIT
-	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	(pushd $(DL_DIR) > /dev/null && \
-	$(GIT) clone --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
-	pushd $($(PKG)_BASE_NAME) > /dev/null && \
-	$(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \
-		gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \
-	popd > /dev/null && \
-	rm -rf $($(PKG)_DL_DIR) && \
-	popd > /dev/null)
-endef
-
-# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
-# repository
-define SOURCE_CHECK_GIT
-  $(GIT) ls-remote --heads $($(PKG)_SITE) > /dev/null
-endef
-
-define SHOW_EXTERNAL_DEPS_GIT
-	echo $($(PKG)_SOURCE)
-endef
-
-
-define DOWNLOAD_BZR
-	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	$(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)
-endef
-
-define SOURCE_CHECK_BZR
-	$(BZR) ls --quiet $($(PKG)_SITE) > /dev/null
-endef
-
-define SHOW_EXTERNAL_DEPS_BZR
-	echo $($(PKG)_SOURCE)
-endef
-
-
-define DOWNLOAD_SVN
-	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	(pushd $(DL_DIR) > /dev/null && \
-	$(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) && \
-	$(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \
-	rm -rf $($(PKG)_DL_DIR) && \
-	popd > /dev/null)
-endef
-
-define SOURCE_CHECK_SVN
-  $(SVN) ls $($(PKG)_SITE) > /dev/null
-endef
-
-define SHOW_EXTERNAL_DEPS_SVN
-  echo $($(PKG)_SOURCE)
-endef
-
-# SCP URIs should be of the form scp://[user@]host:filepath
-# Note that filepath is relative to the user's home directory, so you may want
-# to prepend the path with a slash: scp://[user@]host:/absolutepath
-define DOWNLOAD_SCP
-	test -e $(DL_DIR)/$(2) || \
-	$(SCP) '$(call stripurischeme,$(call qstrip,$(1)))' $(DL_DIR)/$(2)
-endef
-
-define SOURCE_CHECK_SCP
-	$(SSH) $(call domain,$(1),:) ls '$(call notdomain,$(1),:)' > /dev/null
-endef
-
-define SHOW_EXTERNAL_DEPS_SCP
-	echo $(2)
-endef
-
-
-define DOWNLOAD_HG
-	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	(pushd $(DL_DIR) > /dev/null && \
-	$(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
-	$(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
-	              --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \
-	rm -rf $($(PKG)_DL_DIR) && \
-	popd > /dev/null)
-endef
-
-# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
-# repository
-define SOURCE_CHECK_HG
-  $(HG) incoming --force -l1 $($(PKG)_SITE) > /dev/null
-endef
-
-define SHOW_EXTERNAL_DEPS_HG
-  echo $($(PKG)_SOURCE)
-endef
-
-# Download a file using wget. Only download the file if it doesn't
-# already exist in the download directory. If the download fails,
-# remove the file (because wget -O creates a 0-byte file even if the
-# download fails).
-define DOWNLOAD_WGET
-	test -e $(DL_DIR)/$(2) || \
-	$(WGET) -O $(DL_DIR)/$(2) '$(call qstrip,$(1))' || \
-	(rm -f $(DL_DIR)/$(2) ; exit 1)
-endef
-
-define SOURCE_CHECK_WGET
-  $(WGET) --spider '$(call qstrip,$(1))'
-endef
-
-define SHOW_EXTERNAL_DEPS_WGET
-  echo $(2)
-endef
-
-define DOWNLOAD_LOCALFILES
-	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-		$(LOCALFILES) $(call qstrip,$(subst file://,,$($(PKG)_SITE)))/$($(PKG)_SOURCE) $(DL_DIR)
-endef
-
-define SOURCE_CHECK_LOCALFILES
-  test -e $(call qstrip,$(subst file://,,$($(PKG)_SITE)))/$($(PKG)_SOURCE)
-endef
-
-define SHOW_EXTERNAL_DEPS_LOCALFILES
-  echo $($(PKG)_SITE)/$($(PKG)_SOURCE)
-endef
-
-################################################################################
-# DOWNLOAD -- Download helper. Will try to download source from:
-# 1) BR2_PRIMARY_SITE if enabled
-# 2) Download site
-# 3) BR2_BACKUP_SITE if enabled
-#
-# Argument 1 is the source location
-# Argument 2 is the source filename
-#
-# E.G. use like this:
-# $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE))
-################################################################################
-
-define DOWNLOAD
-	$(call DOWNLOAD_INNER,$(1),$(if $(2),$(2),$(notdir $(1))))
-endef
-
-define DOWNLOAD_INNER
-	$(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
-		case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
-			scp) $(call $(DL_MODE)_SCP,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
-			*) $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
-		esac ; \
-	fi ; \
-	if test -n "$(1)" ; then \
-		case "$($(PKG)_SITE_METHOD)" in \
-			git) $($(DL_MODE)_GIT) && exit ;; \
-			svn) $($(DL_MODE)_SVN) && exit ;; \
-			bzr) $($(DL_MODE)_BZR) && exit ;; \
-			file) $($(DL_MODE)_LOCALFILES) && exit ;; \
-			scp) $($(DL_MODE)_SCP) && exit ;; \
-			hg) $($(DL_MODE)_HG) && exit ;; \
-			*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
-		esac ; \
-	fi ; \
-	if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \
-		$(call $(DL_MODE)_WGET,$(BR2_BACKUP_SITE)/$(2),$(2)) && exit ; \
-	fi ; \
-	exit 1
-endef
-
-# Needed for the foreach loops to loop over the list of hooks, so that
-# each hook call is properly separated by a newline.
-define sep
-
-
-endef
-
-################################################################################
-# Implicit targets -- produce a stamp file for each step of a package build
-################################################################################
-
-# Retrieve the archive
-$(BUILD_DIR)/%/.stamp_downloaded:
-ifeq ($(DL_MODE),DOWNLOAD)
-# Only show the download message if it isn't already downloaded
-	$(Q)(test -e $(DL_DIR)/$($(PKG)_SOURCE) && \
-		(test -z $($(PKG)_PATCH) || test -e $(DL_DIR)$($(PKG)_PATCH))) || \
-		$(call MESSAGE,"Downloading")
-endif
-	$(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_SOURCE)))
-	$(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_PATCH)))
-	$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
-ifeq ($(DL_MODE),DOWNLOAD)
-	$(Q)mkdir -p $(@D)
-	$(Q)touch $@
-endif
-
-# Unpack the archive
-$(BUILD_DIR)/%/.stamp_extracted:
-	@$(call MESSAGE,"Extracting")
-	$(Q)mkdir -p $(@D)
-	$($(PKG)_EXTRACT_CMDS)
-# some packages have messed up permissions inside
-	$(Q)chmod -R +rw $(@D)
-	$(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Rsync the source directory if the <pkg>_OVERRIDE_SRCDIR feature is
-# used.
-$(BUILD_DIR)/%/.stamp_rsynced:
-	@$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
-	@test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
-	rsync -au $(SRCDIR)/ $(@D)
-	$(Q)touch $@
-
-# Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced
-# packages
-$(BUILD_DIR)/%/.stamp_rsync_sourced:
-ifeq ($(DL_MODE),SOURCE_CHECK)
-	test -d $(SRCDIR)
-else ifeq ($(DL_MODE),SHOW_EXTERNAL_DEPS)
-	echo "file://$(SRCDIR)"
-else
-	@true # Nothing to do to source a local package
-endif
-
-# Patch
-#
-# The RAWNAME variable is the lowercased package name, which allows to
-# find the package directory (typically package/<pkgname>) and the
-# prefix of the patches
-$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
-$(BUILD_DIR)/%/.stamp_patched:
-	@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
-	$(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
-	$(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
-	$(Q)( \
-	if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \
-	  if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \
-	    support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
-	  else \
-	    support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \
-	    if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER); then \
-	      support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
-	    fi; \
-	  fi; \
-	fi; \
-	)
-	$(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Configure
-$(BUILD_DIR)/%/.stamp_configured:
-	$(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep))
-	@$(call MESSAGE,"Configuring")
-	$($(PKG)_CONFIGURE_CMDS)
-	$(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Build
-$(BUILD_DIR)/%/.stamp_built::
-	@$(call MESSAGE,"Building")
-	$($(PKG)_BUILD_CMDS)
-	$(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Install to host dir
-$(BUILD_DIR)/%/.stamp_host_installed:
-	@$(call MESSAGE,"Installing to host directory")
-	$($(PKG)_INSTALL_CMDS)
-	$(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Install to staging dir
-$(BUILD_DIR)/%/.stamp_staging_installed:
-	@$(call MESSAGE,"Installing to staging directory")
-	$($(PKG)_INSTALL_STAGING_CMDS)
-	$(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Install to images dir
-$(BUILD_DIR)/%/.stamp_images_installed:
-	@$(call MESSAGE,"Installing to images directory")
-	$($(PKG)_INSTALL_IMAGES_CMDS)
-	$(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Install to target dir
-$(BUILD_DIR)/%/.stamp_target_installed:
-	@$(call MESSAGE,"Installing to target")
-	$($(PKG)_INSTALL_TARGET_CMDS)
-	$(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
-	$(Q)touch $@
-
-# Clean package
-$(BUILD_DIR)/%/.stamp_cleaned:
-	@$(call MESSAGE,"Cleaning up")
-	$($(PKG)_CLEAN_CMDS)
-	rm -f $(@D)/.stamp_built
-
-# Uninstall package from target and staging
-# Uninstall commands tend to fail, so remove the stamp files first
-$(BUILD_DIR)/%/.stamp_uninstalled:
-	@$(call MESSAGE,"Uninstalling")
-	rm -f $($(PKG)_TARGET_INSTALL_STAGING)
-	rm -f $($(PKG)_TARGET_INSTALL_TARGET)
-	$($(PKG)_UNINSTALL_STAGING_CMDS)
-	$($(PKG)_UNINSTALL_TARGET_CMDS)
-
-# Remove package sources
-$(BUILD_DIR)/%/.stamp_dircleaned:
-	rm -Rf $(@D)
-
-################################################################################
-# GENTARGETS_INNER -- generates the make targets needed to build a
-# generic package
-#
-#  argument 1 is the lowercase package name
-#  argument 2 is the uppercase package name, including an HOST_ prefix
-#             for host packages
-#  argument 3 is the uppercase package name, without the HOST_ prefix
-#             for host packages
-#  argument 4 is the package directory prefix
-#  argument 5 is the type (target or host)
-################################################################################
-
-define GENTARGETS_INNER
-
-# Define default values for various package-related variables, if not
-# already defined. For some variables (version, source, site and
-# subdir), if they are undefined, we try to see if a variable without
-# the HOST_ prefix is defined. If so, we use such a variable, so that
-# these informations have only to be specified once, for both the
-# target and host packages of a given .mk file.
-
-$(2)_TYPE                       =  $(5)
-$(2)_NAME			=  $(1)
-
-# Keep the package version that may contain forward slashes in the _DL_VERSION
-# variable, then replace all forward slashes ('/') by underscores ('_') to
-# sanitize the package version that is used in paths, directory and file names.
-# Forward slashes may appear in the package's version when pointing to a
-# version control system branch or tag, for example remotes/origin/1_10_stable.
-ifndef $(2)_VERSION
- ifdef $(3)_VERSION
-  $(2)_DL_VERSION = $($(3)_VERSION)
-  $(2)_VERSION = $(subst /,_,$($(3)_VERSION))
- else
-  $(2)_VERSION = undefined
-  $(2)_DL_VERSION = undefined
- endif
-else
-  $(2)_DL_VERSION = $($(2)_VERSION)
-  $(2)_VERSION = $(subst /,_,$($(2)_VERSION))
-endif
-
-$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
-$(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
-$(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
-
-ifneq ($$($(2)_OVERRIDE_SRCDIR),)
-$(2)_VERSION = custom
-endif
-
-ifndef $(2)_SOURCE
- ifdef $(3)_SOURCE
-  $(2)_SOURCE = $($(3)_SOURCE)
- else
-  $(2)_SOURCE			?= $$($(2)_BASE_NAME).tar.gz
- endif
-endif
-
-ifndef $(2)_PATCH
- ifdef $(3)_PATCH
-  $(2)_PATCH = $($(3)_PATCH)
- endif
-endif
-
-ifndef $(2)_SITE
- ifdef $(3)_SITE
-  $(2)_SITE = $($(3)_SITE)
- else
-  $(2)_SITE			?= \
-	http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/$(1)
- endif
-endif
-
-ifndef $(2)_SITE_METHOD
- ifdef $(3)_SITE_METHOD
-  $(2)_SITE_METHOD = $($(3)_SITE_METHOD)
- else
-	# Try automatic detection using the scheme part of the URI
-	$(2)_SITE_METHOD = $(firstword $(subst ://, ,$(call qstrip,$($(2)_SITE))))
- endif
-endif
-
-ifeq ($$($(2)_SITE_METHOD),local)
-ifeq ($$($(2)_OVERRIDE_SRCDIR),)
-$(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
-endif
-endif
-
-$(2)_DEPENDENCIES ?= $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))
-
-$(2)_INSTALL_STAGING		?= NO
-$(2)_INSTALL_IMAGES		?= NO
-$(2)_INSTALL_TARGET		?= YES
-$(2)_DIR_PREFIX			= $(if $(4),$(4),$(TOP_SRCDIR)/package)
-
-# define sub-target stamps
-$(2)_TARGET_INSTALL_TARGET =	$$($(2)_DIR)/.stamp_target_installed
-$(2)_TARGET_INSTALL_STAGING =	$$($(2)_DIR)/.stamp_staging_installed
-$(2)_TARGET_INSTALL_IMAGES =	$$($(2)_DIR)/.stamp_images_installed
-$(2)_TARGET_INSTALL_HOST =      $$($(2)_DIR)/.stamp_host_installed
-$(2)_TARGET_BUILD =		$$($(2)_DIR)/.stamp_built
-$(2)_TARGET_CONFIGURE =		$$($(2)_DIR)/.stamp_configured
-$(2)_TARGET_RSYNC =	        $$($(2)_DIR)/.stamp_rsynced
-$(2)_TARGET_RSYNC_SOURCE =      $$($(2)_DIR)/.stamp_rsync_sourced
-$(2)_TARGET_PATCH =		$$($(2)_DIR)/.stamp_patched
-$(2)_TARGET_EXTRACT =		$$($(2)_DIR)/.stamp_extracted
-$(2)_TARGET_SOURCE =		$$($(2)_DIR)/.stamp_downloaded
-$(2)_TARGET_UNINSTALL =		$$($(2)_DIR)/.stamp_uninstalled
-$(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
-$(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
-
-# default extract command
-$(2)_EXTRACT_CMDS ?= \
-	$$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $(DL_DIR)/$$($(2)_SOURCE) | \
-	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -)
-
-# post-steps hooks
-$(2)_POST_DOWNLOAD_HOOKS        ?=
-$(2)_POST_EXTRACT_HOOKS         ?=
-$(2)_PRE_PATCH_HOOKS            ?=
-$(2)_POST_PATCH_HOOKS           ?=
-$(2)_PRE_CONFIGURE_HOOKS        ?=
-$(2)_POST_CONFIGURE_HOOKS       ?=
-$(2)_POST_BUILD_HOOKS           ?=
-$(2)_POST_INSTALL_HOOKS         ?=
-$(2)_POST_INSTALL_STAGING_HOOKS ?=
-$(2)_POST_INSTALL_TARGET_HOOKS  ?=
-$(2)_POST_INSTALL_IMAGES_HOOKS  ?=
-
-# human-friendly targets and target sequencing
-$(1):			$(1)-install
-
-ifeq ($$($(2)_TYPE),host)
-$(1)-install:	        $(1)-install-host
-else
-$(1)-install:		$(1)-install-staging $(1)-install-target $(1)-install-images
-endif
-
-ifeq ($$($(2)_INSTALL_TARGET),YES)
-$(1)-install-target:	$(1)-build \
-			$$($(2)_TARGET_INSTALL_TARGET)
-else
-$(1)-install-target:
-endif
-
-ifeq ($$($(2)_INSTALL_STAGING),YES)
-$(1)-install-staging:	$(1)-build \
-			$$($(2)_TARGET_INSTALL_STAGING)
-else
-$(1)-install-staging:
-endif
-
-ifeq ($$($(2)_INSTALL_IMAGES),YES)
-$(1)-install-images:	$(1)-build \
-			$$($(2)_TARGET_INSTALL_IMAGES)
-else
-$(1)-install-images:
-endif
-
-$(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
-
-$(1)-build:		$(1)-configure \
-			$$($(2)_TARGET_BUILD)
-
-ifeq ($$($(2)_OVERRIDE_SRCDIR),)
-# In the normal case (no package override), the sequence of steps is
-#  source, by downloading
-#  depends
-#  extract
-#  patch
-#  configure
-$(1)-configure:		$(1)-patch $(1)-depends \
-			$$($(2)_TARGET_CONFIGURE)
-
-$(1)-patch:		$(1)-extract $$($(2)_TARGET_PATCH)
-
-$(1)-extract:		$(1)-source \
-			$$($(2)_TARGET_EXTRACT)
-
-$(1)-depends:		$$($(2)_DEPENDENCIES)
-
-$(1)-source:		$$($(2)_TARGET_SOURCE)
-else
-# In the package override case, the sequence of steps
-#  source, by rsyncing
-#  depends
-#  configure
-$(1)-configure:		$(1)-depends \
-			$$($(2)_TARGET_CONFIGURE)
-
-$(1)-depends:		$(1)-rsync $$($(2)_DEPENDENCIES)
-
-$(1)-rsync:		$$($(2)_TARGET_RSYNC)
-
-$(1)-source:		$$($(2)_TARGET_RSYNC_SOURCE)
-endif
-
-$(1)-show-depends:
-			@echo $$($(2)_DEPENDENCIES)
-
-$(1)-uninstall:		$(1)-configure $$($(2)_TARGET_UNINSTALL)
-
-$(1)-clean:		$(1)-uninstall \
-			$$($(2)_TARGET_CLEAN)
-
-$(1)-dirclean:		$$($(2)_TARGET_DIRCLEAN)
-
-$(1)-clean-for-rebuild:
-ifneq ($$($(2)_OVERRIDE_SRCDIR),)
-			rm -f $$($(2)_TARGET_RSYNC)
-endif
-			rm -f $$($(2)_TARGET_BUILD)
-			rm -f $$($(2)_TARGET_INSTALL_STAGING)
-			rm -f $$($(2)_TARGET_INSTALL_TARGET)
-			rm -f $$($(2)_TARGET_INSTALL_IMAGES)
-			rm -f $$($(2)_TARGET_INSTALL_HOST)
-
-$(1)-rebuild:		$(1)-clean-for-rebuild all
-
-$(1)-clean-for-reconfigure: $(1)-clean-for-rebuild
-			rm -f $$($(2)_TARGET_CONFIGURE)
-
-$(1)-reconfigure:	$(1)-clean-for-reconfigure all
-
-# define the PKG variable for all targets, containing the
-# uppercase package variable prefix
-$$($(2)_TARGET_INSTALL_TARGET):		PKG=$(2)
-$$($(2)_TARGET_INSTALL_STAGING):	PKG=$(2)
-$$($(2)_TARGET_INSTALL_IMAGES):		PKG=$(2)
-$$($(2)_TARGET_INSTALL_HOST):           PKG=$(2)
-$$($(2)_TARGET_BUILD):			PKG=$(2)
-$$($(2)_TARGET_CONFIGURE):		PKG=$(2)
-$$($(2)_TARGET_RSYNC):                  SRCDIR=$$($(2)_OVERRIDE_SRCDIR)
-$$($(2)_TARGET_RSYNC):                  PKG=$(2)
-$$($(2)_TARGET_RSYNC_SOURCE):		SRCDIR=$$($(2)_OVERRIDE_SRCDIR)
-$$($(2)_TARGET_RSYNC_SOURCE):		PKG=$(2)
-$$($(2)_TARGET_PATCH):			PKG=$(2)
-$$($(2)_TARGET_PATCH):			RAWNAME=$(patsubst host-%,%,$(1))
-$$($(2)_TARGET_EXTRACT):		PKG=$(2)
-$$($(2)_TARGET_SOURCE):			PKG=$(2)
-$$($(2)_TARGET_UNINSTALL):		PKG=$(2)
-$$($(2)_TARGET_CLEAN):			PKG=$(2)
-$$($(2)_TARGET_DIRCLEAN):		PKG=$(2)
-
-# Compute the name of the Kconfig option that correspond to the
-# package being enabled. We handle three cases: the special Linux
-# kernel case, the bootloaders case, and the normal packages case.
-ifeq ($(1),linux)
-$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
-else ifeq ($(4),boot/)
-$(2)_KCONFIG_VAR = BR2_TARGET_$(2)
-else
-$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
-endif
-
-# add package to the general list of targets if requested by the buildroot
-# configuration
-ifeq ($$($$($(2)_KCONFIG_VAR)),y)
-
-TARGETS += $(1)
-PACKAGES_PERMISSIONS_TABLE += $$($(2)_PERMISSIONS)$$(sep)
-PACKAGES_DEVICES_TABLE += $$($(2)_DEVICES)$$(sep)
-
-ifeq ($$($(2)_SITE_METHOD),svn)
-DL_TOOLS_DEPENDENCIES += svn
-else ifeq ($$($(2)_SITE_METHOD),git)
-DL_TOOLS_DEPENDENCIES += git
-else ifeq ($$($(2)_SITE_METHOD),bzr)
-DL_TOOLS_DEPENDENCIES += bzr
-else ifeq ($$($(2)_SITE_METHOD),scp)
-DL_TOOLS_DEPENDENCIES += scp ssh
-else ifeq ($$($(2)_SITE_METHOD),hg)
-DL_TOOLS_DEPENDENCIES += hg
-endif # SITE_METHOD
-
-DL_TOOLS_DEPENDENCIES += $(firstword $(INFLATE$(suffix $($(2)_SOURCE))))
-
-endif # $(2)_KCONFIG_VAR
-endef # GENTARGETS_INNER
-
-################################################################################
-# GENTARGETS -- the target generator macro for generic packages
-#
-# Argument 1 is "target" or "host"           [optional, default: "target"]
-################################################################################
-
-define GENTARGETS
-ifeq ($(1),host)
-# In the case of host packages, turn the package name "pkg" into "host-pkg"
-$(call GENTARGETS_INNER,$(1)-$(call pkgname),$(call UPPERCASE,$(1)-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
-else
-# In the case of target packages, keep the package name "pkg"
-$(call GENTARGETS_INNER,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
-endif
-endef
-
-# :mode=makefile:
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
new file mode 100644
index 0000000..a565ae6
--- /dev/null
+++ b/package/pkg-download.mk
@@ -0,0 +1,219 @@
+# Download method commands
+WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
+SVN:=$(call qstrip,$(BR2_SVN))
+BZR:=$(call qstrip,$(BR2_BZR))
+GIT:=$(call qstrip,$(BR2_GIT))
+HG:=$(call qstrip,$(BR2_HG)) $(QUIET)
+SCP:=$(call qstrip,$(BR2_SCP)) $(QUIET)
+SSH:=$(call qstrip,$(BR2_SSH)) $(QUIET)
+LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
+
+# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK'
+# used by the _source-check target and 'SHOW_EXTERNAL_DEPS', used by the
+# external-deps target.
+DL_MODE=DOWNLOAD
+
+DL_DIR=$(call qstrip,$(BR2_DL_DIR))
+ifeq ($(DL_DIR),)
+DL_DIR:=$(TOPDIR)/dl
+endif
+
+#
+# URI scheme helper functions
+# Example URIs:
+# * http://www.example.com/dir/file
+# * scp://www.example.com:dir/file (with domainseparator :)
+#
+# geturischeme: http
+geturischeme=$(firstword $(subst ://, ,$(call qstrip,$(1))))
+# stripurischeme: www.example.com/dir/file
+stripurischeme=$(lastword $(subst ://, ,$(call qstrip,$(1))))
+# domain: www.example.com
+domain=$(firstword $(subst $(call domainseparator,$(2)), ,$(call stripurischeme,$(1))))
+# notdomain: dir/file
+notdomain=$(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$(call stripurischeme,$(1)))
+#
+# default domainseparator is /, specify alternative value as first argument
+domainseparator=$(if $(1),$(1),/)
+
+################################################################################
+# The DOWNLOAD_{GIT,SVN,BZR,HG,LOCALFILES} helpers are in charge of getting a
+# working copy of the source repository for their corresponding SCM,
+# checking out the requested version / commit / tag, and create an
+# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with
+# ssh authentication. DOWNLOAD_WGET is the normal wget-based download
+# mechanism.
+#
+# The SOURCE_CHECK_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers are in charge of
+# simply checking that the source is available for download. This can be used
+# to make sure one will be able to get all the sources needed for
+# one's build configuration.
+#
+# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers simply
+# output to the console the names of the files that will be downloaded, or path
+# and revision of the source repositories, producing a list of all the
+# "external dependencies" of a given build configuration.
+################################################################################
+
+define DOWNLOAD_GIT
+	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+	(pushd $(DL_DIR) > /dev/null && \
+	$(GIT) clone --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
+	pushd $($(PKG)_BASE_NAME) > /dev/null && \
+	$(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \
+		gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \
+	popd > /dev/null && \
+	rm -rf $($(PKG)_DL_DIR) && \
+	popd > /dev/null)
+endef
+
+# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
+# repository
+define SOURCE_CHECK_GIT
+  $(GIT) ls-remote --heads $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_GIT
+	echo $($(PKG)_SOURCE)
+endef
+
+
+define DOWNLOAD_BZR
+	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+	$(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)
+endef
+
+define SOURCE_CHECK_BZR
+	$(BZR) ls --quiet $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_BZR
+	echo $($(PKG)_SOURCE)
+endef
+
+
+define DOWNLOAD_SVN
+	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+	(pushd $(DL_DIR) > /dev/null && \
+	$(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) && \
+	$(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \
+	rm -rf $($(PKG)_DL_DIR) && \
+	popd > /dev/null)
+endef
+
+define SOURCE_CHECK_SVN
+  $(SVN) ls $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_SVN
+  echo $($(PKG)_SOURCE)
+endef
+
+# SCP URIs should be of the form scp://[user@]host:filepath
+# Note that filepath is relative to the user's home directory, so you may want
+# to prepend the path with a slash: scp://[user@]host:/absolutepath
+define DOWNLOAD_SCP
+	test -e $(DL_DIR)/$(2) || \
+	$(SCP) '$(call stripurischeme,$(call qstrip,$(1)))' $(DL_DIR)/$(2)
+endef
+
+define SOURCE_CHECK_SCP
+	$(SSH) $(call domain,$(1),:) ls '$(call notdomain,$(1),:)' > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_SCP
+	echo $(2)
+endef
+
+
+define DOWNLOAD_HG
+	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+	(pushd $(DL_DIR) > /dev/null && \
+	$(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
+	$(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
+	              --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \
+	rm -rf $($(PKG)_DL_DIR) && \
+	popd > /dev/null)
+endef
+
+# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
+# repository
+define SOURCE_CHECK_HG
+  $(HG) incoming --force -l1 $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_HG
+  echo $($(PKG)_SOURCE)
+endef
+
+# Download a file using wget. Only download the file if it doesn't
+# already exist in the download directory. If the download fails,
+# remove the file (because wget -O creates a 0-byte file even if the
+# download fails).
+define DOWNLOAD_WGET
+	test -e $(DL_DIR)/$(2) || \
+	$(WGET) -O $(DL_DIR)/$(2) '$(call qstrip,$(1))' || \
+	(rm -f $(DL_DIR)/$(2) ; exit 1)
+endef
+
+define SOURCE_CHECK_WGET
+  $(WGET) --spider '$(call qstrip,$(1))'
+endef
+
+define SHOW_EXTERNAL_DEPS_WGET
+  echo $(2)
+endef
+
+define DOWNLOAD_LOCALFILES
+	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+		$(LOCALFILES) $(call qstrip,$(subst file://,,$($(PKG)_SITE)))/$($(PKG)_SOURCE) $(DL_DIR)
+endef
+
+define SOURCE_CHECK_LOCALFILES
+  test -e $(call qstrip,$(subst file://,,$($(PKG)_SITE)))/$($(PKG)_SOURCE)
+endef
+
+define SHOW_EXTERNAL_DEPS_LOCALFILES
+  echo $($(PKG)_SITE)/$($(PKG)_SOURCE)
+endef
+
+################################################################################
+# DOWNLOAD -- Download helper. Will try to download source from:
+# 1) BR2_PRIMARY_SITE if enabled
+# 2) Download site
+# 3) BR2_BACKUP_SITE if enabled
+#
+# Argument 1 is the source location
+# Argument 2 is the source filename
+#
+# E.G. use like this:
+# $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE))
+################################################################################
+
+define DOWNLOAD
+	$(call DOWNLOAD_INNER,$(1),$(if $(2),$(2),$(notdir $(1))))
+endef
+
+define DOWNLOAD_INNER
+	$(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
+		case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
+			scp) $(call $(DL_MODE)_SCP,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
+			*) $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
+		esac ; \
+	fi ; \
+	if test -n "$(1)" ; then \
+		case "$($(PKG)_SITE_METHOD)" in \
+			git) $($(DL_MODE)_GIT) && exit ;; \
+			svn) $($(DL_MODE)_SVN) && exit ;; \
+			bzr) $($(DL_MODE)_BZR) && exit ;; \
+			file) $($(DL_MODE)_LOCALFILES) && exit ;; \
+			scp) $($(DL_MODE)_SCP) && exit ;; \
+			hg) $($(DL_MODE)_HG) && exit ;; \
+			*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
+		esac ; \
+	fi ; \
+	if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \
+		$(call $(DL_MODE)_WGET,$(BR2_BACKUP_SITE)/$(2),$(2)) && exit ; \
+	fi ; \
+	exit 1
+endef
diff --git a/package/pkg-gentargets.mk b/package/pkg-gentargets.mk
new file mode 100644
index 0000000..a535681
--- /dev/null
+++ b/package/pkg-gentargets.mk
@@ -0,0 +1,458 @@
+################################################################################
+# Generic package infrastructure
+#
+# This file implements an infrastructure that eases development of
+# package .mk files. It should be used for all non-autotools based
+# packages. Autotools-based packages should use the specialized
+# autotools infrastructure in package/Makefile.autotools.in.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this generic infrastructure requires the
+# .mk file to specify:
+#
+#   1. Metadata informations about the package: name, version,
+#      download URL, etc.
+#
+#   2. Description of the commands to be executed to configure, build
+#      and install the package
+#
+# The autotools infrastructure specializes this generic infrastructure
+# by already implementing the configure, build and install steps.
+################################################################################
+
+################################################################################
+# Implicit targets -- produce a stamp file for each step of a package build
+################################################################################
+
+# Retrieve the archive
+$(BUILD_DIR)/%/.stamp_downloaded:
+ifeq ($(DL_MODE),DOWNLOAD)
+# Only show the download message if it isn't already downloaded
+	$(Q)(test -e $(DL_DIR)/$($(PKG)_SOURCE) && \
+		(test -z $($(PKG)_PATCH) || test -e $(DL_DIR)$($(PKG)_PATCH))) || \
+		$(call MESSAGE,"Downloading")
+endif
+	$(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_SOURCE)))
+	$(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_PATCH)))
+	$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
+ifeq ($(DL_MODE),DOWNLOAD)
+	$(Q)mkdir -p $(@D)
+	$(Q)touch $@
+endif
+
+# Unpack the archive
+$(BUILD_DIR)/%/.stamp_extracted:
+	@$(call MESSAGE,"Extracting")
+	$(Q)mkdir -p $(@D)
+	$($(PKG)_EXTRACT_CMDS)
+# some packages have messed up permissions inside
+	$(Q)chmod -R +rw $(@D)
+	$(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Rsync the source directory if the <pkg>_OVERRIDE_SRCDIR feature is
+# used.
+$(BUILD_DIR)/%/.stamp_rsynced:
+	@$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
+	@test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
+	rsync -au $(SRCDIR)/ $(@D)
+	$(Q)touch $@
+
+# Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced
+# packages
+$(BUILD_DIR)/%/.stamp_rsync_sourced:
+ifeq ($(DL_MODE),SOURCE_CHECK)
+	test -d $(SRCDIR)
+else ifeq ($(DL_MODE),SHOW_EXTERNAL_DEPS)
+	echo "file://$(SRCDIR)"
+else
+	@true # Nothing to do to source a local package
+endif
+
+# Patch
+#
+# The RAWNAME variable is the lowercased package name, which allows to
+# find the package directory (typically package/<pkgname>) and the
+# prefix of the patches
+$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
+$(BUILD_DIR)/%/.stamp_patched:
+	@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
+	$(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
+	$(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
+	$(Q)( \
+	if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \
+	  if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \
+	    support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
+	  else \
+	    support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \
+	    if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER); then \
+	      support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
+	    fi; \
+	  fi; \
+	fi; \
+	)
+	$(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Configure
+$(BUILD_DIR)/%/.stamp_configured:
+	$(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep))
+	@$(call MESSAGE,"Configuring")
+	$($(PKG)_CONFIGURE_CMDS)
+	$(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Build
+$(BUILD_DIR)/%/.stamp_built::
+	@$(call MESSAGE,"Building")
+	$($(PKG)_BUILD_CMDS)
+	$(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Install to host dir
+$(BUILD_DIR)/%/.stamp_host_installed:
+	@$(call MESSAGE,"Installing to host directory")
+	$($(PKG)_INSTALL_CMDS)
+	$(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Install to staging dir
+$(BUILD_DIR)/%/.stamp_staging_installed:
+	@$(call MESSAGE,"Installing to staging directory")
+	$($(PKG)_INSTALL_STAGING_CMDS)
+	$(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Install to images dir
+$(BUILD_DIR)/%/.stamp_images_installed:
+	@$(call MESSAGE,"Installing to images directory")
+	$($(PKG)_INSTALL_IMAGES_CMDS)
+	$(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Install to target dir
+$(BUILD_DIR)/%/.stamp_target_installed:
+	@$(call MESSAGE,"Installing to target")
+	$($(PKG)_INSTALL_TARGET_CMDS)
+	$(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
+# Clean package
+$(BUILD_DIR)/%/.stamp_cleaned:
+	@$(call MESSAGE,"Cleaning up")
+	$($(PKG)_CLEAN_CMDS)
+	rm -f $(@D)/.stamp_built
+
+# Uninstall package from target and staging
+# Uninstall commands tend to fail, so remove the stamp files first
+$(BUILD_DIR)/%/.stamp_uninstalled:
+	@$(call MESSAGE,"Uninstalling")
+	rm -f $($(PKG)_TARGET_INSTALL_STAGING)
+	rm -f $($(PKG)_TARGET_INSTALL_TARGET)
+	$($(PKG)_UNINSTALL_STAGING_CMDS)
+	$($(PKG)_UNINSTALL_TARGET_CMDS)
+
+# Remove package sources
+$(BUILD_DIR)/%/.stamp_dircleaned:
+	rm -Rf $(@D)
+
+################################################################################
+# GENTARGETS_INNER -- generates the make targets needed to build a
+# generic package
+#
+#  argument 1 is the lowercase package name
+#  argument 2 is the uppercase package name, including an HOST_ prefix
+#             for host packages
+#  argument 3 is the uppercase package name, without the HOST_ prefix
+#             for host packages
+#  argument 4 is the package directory prefix
+#  argument 5 is the type (target or host)
+################################################################################
+
+define GENTARGETS_INNER
+
+# Define default values for various package-related variables, if not
+# already defined. For some variables (version, source, site and
+# subdir), if they are undefined, we try to see if a variable without
+# the HOST_ prefix is defined. If so, we use such a variable, so that
+# these informations have only to be specified once, for both the
+# target and host packages of a given .mk file.
+
+$(2)_TYPE                       =  $(5)
+$(2)_NAME			=  $(1)
+
+# Keep the package version that may contain forward slashes in the _DL_VERSION
+# variable, then replace all forward slashes ('/') by underscores ('_') to
+# sanitize the package version that is used in paths, directory and file names.
+# Forward slashes may appear in the package's version when pointing to a
+# version control system branch or tag, for example remotes/origin/1_10_stable.
+ifndef $(2)_VERSION
+ ifdef $(3)_VERSION
+  $(2)_DL_VERSION = $($(3)_VERSION)
+  $(2)_VERSION = $(subst /,_,$($(3)_VERSION))
+ else
+  $(2)_VERSION = undefined
+  $(2)_DL_VERSION = undefined
+ endif
+else
+  $(2)_DL_VERSION = $($(2)_VERSION)
+  $(2)_VERSION = $(subst /,_,$($(2)_VERSION))
+endif
+
+$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
+$(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
+$(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
+
+ifneq ($$($(2)_OVERRIDE_SRCDIR),)
+$(2)_VERSION = custom
+endif
+
+ifndef $(2)_SOURCE
+ ifdef $(3)_SOURCE
+  $(2)_SOURCE = $($(3)_SOURCE)
+ else
+  $(2)_SOURCE			?= $$($(2)_BASE_NAME).tar.gz
+ endif
+endif
+
+ifndef $(2)_PATCH
+ ifdef $(3)_PATCH
+  $(2)_PATCH = $($(3)_PATCH)
+ endif
+endif
+
+ifndef $(2)_SITE
+ ifdef $(3)_SITE
+  $(2)_SITE = $($(3)_SITE)
+ else
+  $(2)_SITE			?= \
+	http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/$(1)
+ endif
+endif
+
+ifndef $(2)_SITE_METHOD
+ ifdef $(3)_SITE_METHOD
+  $(2)_SITE_METHOD = $($(3)_SITE_METHOD)
+ else
+	# Try automatic detection using the scheme part of the URI
+	$(2)_SITE_METHOD = $(firstword $(subst ://, ,$(call qstrip,$($(2)_SITE))))
+ endif
+endif
+
+ifeq ($$($(2)_SITE_METHOD),local)
+ifeq ($$($(2)_OVERRIDE_SRCDIR),)
+$(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
+endif
+endif
+
+$(2)_DEPENDENCIES ?= $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))
+
+$(2)_INSTALL_STAGING		?= NO
+$(2)_INSTALL_IMAGES		?= NO
+$(2)_INSTALL_TARGET		?= YES
+$(2)_DIR_PREFIX			= $(if $(4),$(4),$(TOP_SRCDIR)/package)
+
+# define sub-target stamps
+$(2)_TARGET_INSTALL_TARGET =	$$($(2)_DIR)/.stamp_target_installed
+$(2)_TARGET_INSTALL_STAGING =	$$($(2)_DIR)/.stamp_staging_installed
+$(2)_TARGET_INSTALL_IMAGES =	$$($(2)_DIR)/.stamp_images_installed
+$(2)_TARGET_INSTALL_HOST =      $$($(2)_DIR)/.stamp_host_installed
+$(2)_TARGET_BUILD =		$$($(2)_DIR)/.stamp_built
+$(2)_TARGET_CONFIGURE =		$$($(2)_DIR)/.stamp_configured
+$(2)_TARGET_RSYNC =	        $$($(2)_DIR)/.stamp_rsynced
+$(2)_TARGET_RSYNC_SOURCE =      $$($(2)_DIR)/.stamp_rsync_sourced
+$(2)_TARGET_PATCH =		$$($(2)_DIR)/.stamp_patched
+$(2)_TARGET_EXTRACT =		$$($(2)_DIR)/.stamp_extracted
+$(2)_TARGET_SOURCE =		$$($(2)_DIR)/.stamp_downloaded
+$(2)_TARGET_UNINSTALL =		$$($(2)_DIR)/.stamp_uninstalled
+$(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
+$(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
+
+# default extract command
+$(2)_EXTRACT_CMDS ?= \
+	$$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $(DL_DIR)/$$($(2)_SOURCE) | \
+	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -)
+
+# post-steps hooks
+$(2)_POST_DOWNLOAD_HOOKS        ?=
+$(2)_POST_EXTRACT_HOOKS         ?=
+$(2)_PRE_PATCH_HOOKS            ?=
+$(2)_POST_PATCH_HOOKS           ?=
+$(2)_PRE_CONFIGURE_HOOKS        ?=
+$(2)_POST_CONFIGURE_HOOKS       ?=
+$(2)_POST_BUILD_HOOKS           ?=
+$(2)_POST_INSTALL_HOOKS         ?=
+$(2)_POST_INSTALL_STAGING_HOOKS ?=
+$(2)_POST_INSTALL_TARGET_HOOKS  ?=
+$(2)_POST_INSTALL_IMAGES_HOOKS  ?=
+
+# human-friendly targets and target sequencing
+$(1):			$(1)-install
+
+ifeq ($$($(2)_TYPE),host)
+$(1)-install:	        $(1)-install-host
+else
+$(1)-install:		$(1)-install-staging $(1)-install-target $(1)-install-images
+endif
+
+ifeq ($$($(2)_INSTALL_TARGET),YES)
+$(1)-install-target:	$(1)-build \
+			$$($(2)_TARGET_INSTALL_TARGET)
+else
+$(1)-install-target:
+endif
+
+ifeq ($$($(2)_INSTALL_STAGING),YES)
+$(1)-install-staging:	$(1)-build \
+			$$($(2)_TARGET_INSTALL_STAGING)
+else
+$(1)-install-staging:
+endif
+
+ifeq ($$($(2)_INSTALL_IMAGES),YES)
+$(1)-install-images:	$(1)-build \
+			$$($(2)_TARGET_INSTALL_IMAGES)
+else
+$(1)-install-images:
+endif
+
+$(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
+
+$(1)-build:		$(1)-configure \
+			$$($(2)_TARGET_BUILD)
+
+ifeq ($$($(2)_OVERRIDE_SRCDIR),)
+# In the normal case (no package override), the sequence of steps is
+#  source, by downloading
+#  depends
+#  extract
+#  patch
+#  configure
+$(1)-configure:		$(1)-patch $(1)-depends \
+			$$($(2)_TARGET_CONFIGURE)
+
+$(1)-patch:		$(1)-extract $$($(2)_TARGET_PATCH)
+
+$(1)-extract:		$(1)-source \
+			$$($(2)_TARGET_EXTRACT)
+
+$(1)-depends:		$$($(2)_DEPENDENCIES)
+
+$(1)-source:		$$($(2)_TARGET_SOURCE)
+else
+# In the package override case, the sequence of steps
+#  source, by rsyncing
+#  depends
+#  configure
+$(1)-configure:		$(1)-depends \
+			$$($(2)_TARGET_CONFIGURE)
+
+$(1)-depends:		$(1)-rsync $$($(2)_DEPENDENCIES)
+
+$(1)-rsync:		$$($(2)_TARGET_RSYNC)
+
+$(1)-source:		$$($(2)_TARGET_RSYNC_SOURCE)
+endif
+
+$(1)-show-depends:
+			@echo $$($(2)_DEPENDENCIES)
+
+$(1)-uninstall:		$(1)-configure $$($(2)_TARGET_UNINSTALL)
+
+$(1)-clean:		$(1)-uninstall \
+			$$($(2)_TARGET_CLEAN)
+
+$(1)-dirclean:		$$($(2)_TARGET_DIRCLEAN)
+
+$(1)-clean-for-rebuild:
+ifneq ($$($(2)_OVERRIDE_SRCDIR),)
+			rm -f $$($(2)_TARGET_RSYNC)
+endif
+			rm -f $$($(2)_TARGET_BUILD)
+			rm -f $$($(2)_TARGET_INSTALL_STAGING)
+			rm -f $$($(2)_TARGET_INSTALL_TARGET)
+			rm -f $$($(2)_TARGET_INSTALL_IMAGES)
+			rm -f $$($(2)_TARGET_INSTALL_HOST)
+
+$(1)-rebuild:		$(1)-clean-for-rebuild all
+
+$(1)-clean-for-reconfigure: $(1)-clean-for-rebuild
+			rm -f $$($(2)_TARGET_CONFIGURE)
+
+$(1)-reconfigure:	$(1)-clean-for-reconfigure all
+
+# define the PKG variable for all targets, containing the
+# uppercase package variable prefix
+$$($(2)_TARGET_INSTALL_TARGET):		PKG=$(2)
+$$($(2)_TARGET_INSTALL_STAGING):	PKG=$(2)
+$$($(2)_TARGET_INSTALL_IMAGES):		PKG=$(2)
+$$($(2)_TARGET_INSTALL_HOST):           PKG=$(2)
+$$($(2)_TARGET_BUILD):			PKG=$(2)
+$$($(2)_TARGET_CONFIGURE):		PKG=$(2)
+$$($(2)_TARGET_RSYNC):                  SRCDIR=$$($(2)_OVERRIDE_SRCDIR)
+$$($(2)_TARGET_RSYNC):                  PKG=$(2)
+$$($(2)_TARGET_RSYNC_SOURCE):		SRCDIR=$$($(2)_OVERRIDE_SRCDIR)
+$$($(2)_TARGET_RSYNC_SOURCE):		PKG=$(2)
+$$($(2)_TARGET_PATCH):			PKG=$(2)
+$$($(2)_TARGET_PATCH):			RAWNAME=$(patsubst host-%,%,$(1))
+$$($(2)_TARGET_EXTRACT):		PKG=$(2)
+$$($(2)_TARGET_SOURCE):			PKG=$(2)
+$$($(2)_TARGET_UNINSTALL):		PKG=$(2)
+$$($(2)_TARGET_CLEAN):			PKG=$(2)
+$$($(2)_TARGET_DIRCLEAN):		PKG=$(2)
+
+# Compute the name of the Kconfig option that correspond to the
+# package being enabled. We handle three cases: the special Linux
+# kernel case, the bootloaders case, and the normal packages case.
+ifeq ($(1),linux)
+$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
+else ifeq ($(4),boot/)
+$(2)_KCONFIG_VAR = BR2_TARGET_$(2)
+else
+$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
+endif
+
+# add package to the general list of targets if requested by the buildroot
+# configuration
+ifeq ($$($$($(2)_KCONFIG_VAR)),y)
+
+TARGETS += $(1)
+PACKAGES_PERMISSIONS_TABLE += $$($(2)_PERMISSIONS)$$(sep)
+PACKAGES_DEVICES_TABLE += $$($(2)_DEVICES)$$(sep)
+
+ifeq ($$($(2)_SITE_METHOD),svn)
+DL_TOOLS_DEPENDENCIES += svn
+else ifeq ($$($(2)_SITE_METHOD),git)
+DL_TOOLS_DEPENDENCIES += git
+else ifeq ($$($(2)_SITE_METHOD),bzr)
+DL_TOOLS_DEPENDENCIES += bzr
+else ifeq ($$($(2)_SITE_METHOD),scp)
+DL_TOOLS_DEPENDENCIES += scp ssh
+else ifeq ($$($(2)_SITE_METHOD),hg)
+DL_TOOLS_DEPENDENCIES += hg
+endif # SITE_METHOD
+
+DL_TOOLS_DEPENDENCIES += $(firstword $(INFLATE$(suffix $($(2)_SOURCE))))
+
+endif # $(2)_KCONFIG_VAR
+endef # GENTARGETS_INNER
+
+################################################################################
+# GENTARGETS -- the target generator macro for generic packages
+#
+# Argument 1 is "target" or "host"           [optional, default: "target"]
+################################################################################
+
+define GENTARGETS
+ifeq ($(1),host)
+# In the case of host packages, turn the package name "pkg" into "host-pkg"
+$(call GENTARGETS_INNER,$(1)-$(call pkgname),$(call UPPERCASE,$(1)-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
+else
+# In the case of target packages, keep the package name "pkg"
+$(call GENTARGETS_INNER,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
+endif
+endef
+
+# :mode=makefile:
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
new file mode 100644
index 0000000..729f8bb
--- /dev/null
+++ b/package/pkg-utils.mk
@@ -0,0 +1,72 @@
+# UPPERCASE Macro -- transform its argument to uppercase and replace dots and
+# hyphens to underscores
+
+# Heavily inspired by the up macro from gmsl (http://gmsl.sf.net)
+# This is approx 5 times faster than forking a shell and tr, and
+# as this macro is used a lot it matters
+# This works by creating translation character pairs (E.G. a:A b:B)
+# and then looping though all of them running $(subst from,to,text)
+[FROM] := a b c d e f g h i j k l m n o p q r s t u v w x y z . -
+[TO]   := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _
+
+UPPERCASE = $(strip $(eval __tmp := $1) \
+     $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \
+	$(eval __tmp :=	\
+		$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\
+			$(__tmp)))) \
+     $(__tmp))
+
+define KCONFIG_ENABLE_OPT
+       $(SED) "/\\<$(1)\\>/d" $(2)
+       echo "$(1)=y" >> $(2)
+endef
+
+define KCONFIG_SET_OPT
+       $(SED) "/\\<$(1)\\>/d" $(3)
+       echo "$(1)=$(2)" >> $(3)
+endef
+
+define KCONFIG_DISABLE_OPT
+       $(SED) "/\\<$(1)\\>/d" $(2)
+       echo "# $(1) is not set" >> $(2)
+endef
+
+# Helper functions to determine the name of a package and its
+# directory from its makefile directory, using the $(MAKEFILE_LIST)
+# variable provided by make. This is used by the *TARGETS macros to
+# automagically find where the package is located. Note that the
+# pkgdir macro is carefully written to handle the case of the Linux
+# package, for which the package directory is an empty string.
+define pkgdir
+$(dir $(lastword $(MAKEFILE_LIST)))
+endef
+
+define pkgname
+$(lastword $(subst /, ,$(call pkgdir)))
+endef
+
+define pkgparentdir
+$(patsubst %$(call pkgname)/,%,$(call pkgdir))
+endef
+
+# Define extractors for different archive suffixes
+INFLATE.bz2  = $(BZCAT)
+INFLATE.gz   = $(ZCAT)
+INFLATE.tbz  = $(BZCAT)
+INFLATE.tbz2 = $(BZCAT)
+INFLATE.tgz  = $(ZCAT)
+INFLATE.xz   = $(XZCAT)
+INFLATE.tar  = cat
+
+# MESSAGE Macro -- display a message in bold type
+MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+TERM_BOLD := $(shell tput smso)
+TERM_RESET := $(shell tput rmso)
+
+
+# Needed for the foreach loops to loop over the list of hooks, so that
+# each hook call is properly separated by a newline.
+define sep
+
+
+endef
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 08/22] pkg-*.mk: add some comments, update some existing comments
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 07/22] Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 14:08   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 09/22] Remove unused .fakeroot.* mechanism Thomas Petazzoni
                   ` (13 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pkg-autotargets.mk |    4 +---
 package/pkg-download.mk    |    9 +++++++++
 package/pkg-gentargets.mk  |   10 ++++------
 package/pkg-utils.mk       |   13 +++++++++++++
 4 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/package/pkg-autotargets.mk b/package/pkg-autotargets.mk
index fd118dc..c9887c2 100644
--- a/package/pkg-autotargets.mk
+++ b/package/pkg-autotargets.mk
@@ -3,9 +3,7 @@
 #
 # This file implements an infrastructure that eases development of
 # package .mk files for autotools packages. It should be used for all
-# packages that use the autotools as their build system. Non-autotools
-# packages should use the generic infrastructure in
-# package/Makefile.package.in.
+# packages that use the autotools as their build system.
 #
 # See the Buildroot documentation for details on the usage of this
 # infrastructure
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index a565ae6..ccf819e 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -1,3 +1,12 @@
+############################################################################
+#
+# This file contains the download helpers for the various package
+# infrastructures. It is used to handle downloads from HTTP servers,
+# FTP servers, Git repositories, Subversion repositories, Mercurial
+# repositories, Bazaar repositories, and SCP servers.
+#
+############################################################################
+
 # Download method commands
 WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
 SVN:=$(call qstrip,$(BR2_SVN))
diff --git a/package/pkg-gentargets.mk b/package/pkg-gentargets.mk
index a535681..1c9b458 100644
--- a/package/pkg-gentargets.mk
+++ b/package/pkg-gentargets.mk
@@ -2,9 +2,10 @@
 # Generic package infrastructure
 #
 # This file implements an infrastructure that eases development of
-# package .mk files. It should be used for all non-autotools based
-# packages. Autotools-based packages should use the specialized
-# autotools infrastructure in package/Makefile.autotools.in.
+# package .mk files. It should be used for packages that do not rely
+# on a well-known build system for which Buildroot has a dedicated
+# infrastructure (so far, Buildroot has special support for
+# autotools-based and CMake-based packages).
 #
 # See the Buildroot documentation for details on the usage of this
 # infrastructure
@@ -17,9 +18,6 @@
 #
 #   2. Description of the commands to be executed to configure, build
 #      and install the package
-#
-# The autotools infrastructure specializes this generic infrastructure
-# by already implementing the configure, build and install steps.
 ################################################################################
 
 ################################################################################
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 729f8bb..953dbc9 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -1,3 +1,10 @@
+############################################################################
+#
+# This file contains various utility functions used by the package
+# infrastructure, or by the packages themselves.
+#
+############################################################################
+
 # UPPERCASE Macro -- transform its argument to uppercase and replace dots and
 # hyphens to underscores
 
@@ -16,6 +23,12 @@ UPPERCASE = $(strip $(eval __tmp := $1) \
 			$(__tmp)))) \
      $(__tmp))
 
+#
+# Manipulation of .config files based on the Kconfig
+# infrastructure. Used by the Busybox package, the Linux kernel
+# package, and more.
+#
+
 define KCONFIG_ENABLE_OPT
        $(SED) "/\\<$(1)\\>/d" $(2)
        echo "$(1)=y" >> $(2)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 09/22] Remove unused .fakeroot.* mechanism
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (7 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 08/22] pkg-*.mk: add some comments, update some existing comments Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 14:09   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 10/22] Move the manual build infrastructure to docs/manual/manual.mk Thomas Petazzoni
                   ` (12 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

There used to be a mechanism using which packages could leave a
.fakeroot.<something> file which could contain commands to be executed
within the fakeroot environment. Since this mechanism is no longer
used by any package, remove it from the common infrastructure.

The latest user was nfs-utils, which used this mechanism to do the
"make install" as root, since doing otherwise was not supported. But
since 16e7b8255c82815126a2c502c3787d442d254a86, nfs-utils has been
upgraded and converted to the package infrastructure, and this hack is
no longer necessary. Another past user was the ltp-testsuite package,
for the same reason, and since
a72a670489547a3ca645ff7c3a0d9c3fb66eab51, the fakeroot hack is no
longer needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile              |    6 ------
 fs/common.mk          |    2 --
 fs/iso9660/iso9660.mk |    2 --
 3 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index e03fed5..a65848d 100644
--- a/Makefile
+++ b/Makefile
@@ -301,8 +301,6 @@ endif
 
 include fs/common.mk
 
-TARGETS+=erase-fakeroots
-
 TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
 TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
 TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
@@ -391,7 +389,6 @@ $(BUILD_DIR)/.root:
 		if [ -d "$(TARGET_SKELETON)" ]; then \
 			cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \
 		fi; \
-		touch $(STAGING_DIR)/.fakeroot.00000; \
 	fi
 	-find $(TARGET_DIR) -type d -name CVS -print0 -o -name .svn -print0 | xargs -0 rm -rf
 	-find $(TARGET_DIR) -type f \( -name .empty -o -name '*~' \) -print0 | xargs -0 rm -rf
@@ -399,9 +396,6 @@ $(BUILD_DIR)/.root:
 
 $(TARGET_DIR): $(BUILD_DIR)/.root
 
-erase-fakeroots:
-	rm -f $(BUILD_DIR)/.fakeroot*
-
 target-finalize:
 ifeq ($(BR2_HAVE_DEVFILES),y)
 	( support/scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
diff --git a/fs/common.mk b/fs/common.mk
index d426f37..debf7db 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -45,8 +45,6 @@ $(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES)
 	@$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
 	$(foreach hook,$(ROOTFS_$(2)_PRE_GEN_HOOKS),$(call $(hook))$(sep))
 	rm -f $(FAKEROOT_SCRIPT)
-	touch $(BUILD_DIR)/.fakeroot.00000
-	cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT)
 	echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
 ifneq ($(ROOTFS_DEVICE_TABLES),)
 	cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)
diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
index afebafc..f51b6ee 100644
--- a/fs/iso9660/iso9660.mk
+++ b/fs/iso9660/iso9660.mk
@@ -25,8 +25,6 @@ $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-ext2 grub
 	cp $(BINARIES_DIR)/rootfs.ext2 $(ISO9660_TARGET_DIR)/initrd
 	# Use fakeroot to pretend all target binaries are owned by root
 	rm -f $(FAKEROOT_SCRIPT)
-	touch $(BUILD_DIR)/.fakeroot.00000
-	cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT)
 	echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
 	# Use fakeroot so mkisofs believes the previous fakery
 	echo "$(HOST_DIR)/usr/bin/genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot " \
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 10/22] Move the manual build infrastructure to docs/manual/manual.mk
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (8 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 09/22] Remove unused .fakeroot.* mechanism Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 22:01   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 11/22] cmake: move creation of toolchain file to package/pkg-cmaketargets.mk Thomas Petazzoni
                   ` (11 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile              |   49 +------------------------------------------------
 docs/manual/manual.mk |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 48 deletions(-)
 create mode 100644 docs/manual/manual.mk

diff --git a/Makefile b/Makefile
index a65848d..3e7fa22 100644
--- a/Makefile
+++ b/Makefile
@@ -684,54 +684,7 @@ release:
 print-version:
 	@echo $(BR2_VERSION_FULL)
 
-################################################################################
-# GENDOC -- generates the make targets needed to build a specific type of
-#           asciidoc documentation.
-#
-#  argument 1 is the name of the document and must be a subdirectory of docs/;
-#             the top-level asciidoc file must have the same name
-#  argument 2 is the type of document to generate (-f argument of a2x)
-#  argument 3 is the document type as used in the make target
-#  argument 4 is the output file extension for the document type
-#  argument 5 is the human text for the document type
-#  argument 6 (optional) are extra arguments for a2x
-#
-# The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
-################################################################################
-define GENDOC_INNER
-$(1): $(1)-$(3)
-.PHONY: $(1)-$(3)
-$(1)-$(3): $$(O)/docs/$(1)/$(1).$(4)
-
-$$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES)
-	@echo "Generating $(5) $(1)..."
-	$(Q)mkdir -p $$(@D)
-	$(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \
-	  -D $$(@D) $$<
-endef
-
-################################################################################
-# GENDOC -- generates the make targets needed to build asciidoc documentation.
-#
-#  argument 1 is the name of the document and must be a subdirectory of docs/;
-#             the top-level asciidoc file must have the same name
-#
-# The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
-################################################################################
-define GENDOC
-$(call GENDOC_INNER,$(1),xhtml,html,html,HTML)
-$(call GENDOC_INNER,$(1),chunked,split-html,chunked,Split HTML)
-$(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0")
-$(call GENDOC_INNER,$(1),text,txt,text,Text)
-$(call GENDOC_INNER,$(1),epub,epub,epub,EPUB)
-clean: clean-$(1)
-clean-$(1):
-	$(Q)$(RM) -rf $(O)/docs/$(1)
-.PHONY: $(1) clean-$(1)
-endef
-
-MANUAL_SOURCES = $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)
-$(eval $(call GENDOC,manual))
+include docs/manual/manual.mk
 
 .PHONY: $(noconfig_targets)
 
diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
new file mode 100644
index 0000000..1eaf73a
--- /dev/null
+++ b/docs/manual/manual.mk
@@ -0,0 +1,48 @@
+################################################################################
+# GENDOC -- generates the make targets needed to build a specific type of
+#           asciidoc documentation.
+#
+#  argument 1 is the name of the document and must be a subdirectory of docs/;
+#             the top-level asciidoc file must have the same name
+#  argument 2 is the type of document to generate (-f argument of a2x)
+#  argument 3 is the document type as used in the make target
+#  argument 4 is the output file extension for the document type
+#  argument 5 is the human text for the document type
+#  argument 6 (optional) are extra arguments for a2x
+#
+# The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
+################################################################################
+define GENDOC_INNER
+$(1): $(1)-$(3)
+.PHONY: $(1)-$(3)
+$(1)-$(3): $$(O)/docs/$(1)/$(1).$(4)
+
+$$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES)
+	@echo "Generating $(5) $(1)..."
+	$(Q)mkdir -p $$(@D)
+	$(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \
+	  -D $$(@D) $$<
+endef
+
+################################################################################
+# GENDOC -- generates the make targets needed to build asciidoc documentation.
+#
+#  argument 1 is the name of the document and must be a subdirectory of docs/;
+#             the top-level asciidoc file must have the same name
+#
+# The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
+################################################################################
+define GENDOC
+$(call GENDOC_INNER,$(1),xhtml,html,html,HTML)
+$(call GENDOC_INNER,$(1),chunked,split-html,chunked,Split HTML)
+$(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0")
+$(call GENDOC_INNER,$(1),text,txt,text,Text)
+$(call GENDOC_INNER,$(1),epub,epub,epub,EPUB)
+clean: clean-$(1)
+clean-$(1):
+	$(Q)$(RM) -rf $(O)/docs/$(1)
+.PHONY: $(1) clean-$(1)
+endef
+
+MANUAL_SOURCES = $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)
+$(eval $(call GENDOC,manual))
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 11/22] cmake: move creation of toolchain file to package/pkg-cmaketargets.mk
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (9 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 10/22] Move the manual build infrastructure to docs/manual/manual.mk Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-19 22:01   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 12/22] package: remove unused STRIP_DISCARD_ALL variable Thomas Petazzoni
                   ` (10 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

This also requires moving a few include directives below the "all:"
target in the main Makefile, otherwise the new target to create the
toolchain file in pkg-cmaketargets.mk gets used as the default make
target instead of "all:".

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile                    |   22 ++--------------------
 package/pkg-cmaketargets.mk |   22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/Makefile b/Makefile
index 3e7fa22..4f29cba 100644
--- a/Makefile
+++ b/Makefile
@@ -255,9 +255,6 @@ HOSTCC  := $(CCACHE) $(HOSTCC)
 HOSTCXX := $(CCACHE) $(HOSTCXX)
 endif
 
-include toolchain/Makefile.in
-include package/Makefile.in
-
 #############################################################
 #
 # You should probably leave this stuff alone unless you know
@@ -267,6 +264,8 @@ include package/Makefile.in
 
 all: world
 
+include toolchain/Makefile.in
+include package/Makefile.in
 include support/dependencies/dependencies.mk
 
 # We also need the various per-package makefiles, which also add
@@ -339,23 +338,6 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
 
 world: prepare dirs dependencies $(BASE_TARGETS) $(TARGETS_ALL)
 
-$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
-	mkdir -p $(@D)
-	@echo -en "\
-	set(CMAKE_SYSTEM_NAME Linux)\n\
-	set(CMAKE_C_COMPILER $(TARGET_CC_NOCCACHE))\n\
-	set(CMAKE_CXX_COMPILER $(TARGET_CXX_NOCCACHE))\n\
-	set(CMAKE_C_FLAGS \"\$${CMAKE_C_FLAGS} $(TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\
-	set(CMAKE_CXX_FLAGS \"\$${CMAKE_CXX_FLAGS} $(TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\
-	set(CMAKE_INSTALL_SO_NO_EXE 0)\n\
-	set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\
-	set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\
-	set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
-	set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
-	set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\
-	set(ENV{PKG_CONFIG_SYSROOT_DIR} \"$(STAGING_DIR)\")\n\
-	" > $@
-
 .PHONY: all world dirs clean distclean source outputmakefile \
 	$(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
 	$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
diff --git a/package/pkg-cmaketargets.mk b/package/pkg-cmaketargets.mk
index 1cd65e4..371ab11 100644
--- a/package/pkg-cmaketargets.mk
+++ b/package/pkg-cmaketargets.mk
@@ -197,3 +197,25 @@ else
 $(call CMAKETARGETS_INNER,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
 endif
 endef
+
+################################################################################
+# Generation of the CMake toolchain file
+################################################################################
+
+$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
+	@mkdir -p $(@D)
+	@echo -en "\
+	set(CMAKE_SYSTEM_NAME Linux)\n\
+	set(CMAKE_C_COMPILER $(TARGET_CC_NOCCACHE))\n\
+	set(CMAKE_CXX_COMPILER $(TARGET_CXX_NOCCACHE))\n\
+	set(CMAKE_C_FLAGS \"\$${CMAKE_C_FLAGS} $(TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\
+	set(CMAKE_CXX_FLAGS \"\$${CMAKE_CXX_FLAGS} $(TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\
+	set(CMAKE_INSTALL_SO_NO_EXE 0)\n\
+	set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\
+	set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\
+	set(ENV{PKG_CONFIG_SYSROOT_DIR} \"$(STAGING_DIR)\")\n\
+	" > $@
+
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 12/22] package: remove unused STRIP_DISCARD_ALL variable
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (10 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 11/22] cmake: move creation of toolchain file to package/pkg-cmaketargets.mk Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-24 22:03   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 13/22] Remove unused GNU_TARGET_SUFFIX Thomas Petazzoni
                   ` (9 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.in |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 943017b..7c75406 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -126,7 +126,6 @@ TARGET_CXX := $(CCACHE) $(TARGET_CXX)
 endif
 
 ifeq ($(BR2_STRIP_strip),y)
-STRIP_DISCARD_ALL:=--discard-all
 STRIP_STRIP_UNNEEDED:=--strip-unneeded
 STRIP_STRIP_ALL:=--strip-all
 TARGET_STRIP=$(TARGET_CROSS)strip
@@ -134,7 +133,6 @@ STRIPCMD=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
 KSTRIPCMD=$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)
 endif
 ifeq ($(BR2_STRIP_sstrip),y)
-STRIP_DISCARD_ALL:=
 STRIP_STRIP_UNNEEDED:=
 STRIP_STRIP_ALL:=
 TARGET_STRIP=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-sstrip
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 13/22] Remove unused GNU_TARGET_SUFFIX
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (11 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 12/22] package: remove unused STRIP_DISCARD_ALL variable Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  6:55   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 14/22] toolchain: remove useless indirect variables Thomas Petazzoni
                   ` (8 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 4f29cba..a48fb87 100644
--- a/Makefile
+++ b/Makefile
@@ -235,8 +235,6 @@ BZCAT:=$(call qstrip,$(BR2_BZCAT))
 XZCAT:=$(call qstrip,$(BR2_XZCAT))
 TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
-GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
-
 # packages compiled for the host go here
 HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 14/22] toolchain: remove useless indirect variables
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (12 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 13/22] Remove unused GNU_TARGET_SUFFIX Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  6:56   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 15/22] gcc: remove unused EXTRA_GCC2_CONFIG_OPTIONS Thomas Petazzoni
                   ` (7 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

The BR2_CONFIGURE_DEVEL_SYSROOT, BR2_CONFIGURE_STAGING_SYSROOT and
BR2_CONFIGURE_BUILD_TOOLS were used only in a few places, and it is in
fact clearer to just use their value in the various places they are
used.

The ultimate goal is to get rid of the toolchain/Makefile.in file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/binutils/binutils.mk    |    2 +-
 toolchain/Makefile.in           |    4 ----
 toolchain/gcc/gcc-uclibc-4.x.mk |    8 ++++----
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 8632d67..0a5a948 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -37,7 +37,7 @@ endif
 HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \
 			--target=$(REAL_GNU_TARGET_NAME) \
 			--disable-shared --enable-static \
-			$(BR2_CONFIGURE_STAGING_SYSROOT) \
+			--with-sysroot=$(STAGING_DIR) \
 			$(BINUTILS_EXTRA_CONFIG_OPTIONS)
 
 HOST_BINUTILS_DEPENDENCIES =
diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in
index a7ca558..5f32f82 100644
--- a/toolchain/Makefile.in
+++ b/toolchain/Makefile.in
@@ -1,6 +1,2 @@
-BR2_CONFIGURE_DEVEL_SYSROOT=--with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/
-BR2_CONFIGURE_STAGING_SYSROOT=--with-sysroot=$(STAGING_DIR)
-BR2_CONFIGURE_BUILD_TOOLS=--with-build-time-tools=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin
-
 # gcc has a bunch of needed stuff....
 include toolchain/gcc/Makefile.in
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index ae734e8..7cdba0e 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -223,7 +223,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
 		--host=$(GNU_HOST_NAME) \
 		--target=$(REAL_GNU_TARGET_NAME) \
 		--enable-languages=c \
-		$(BR2_CONFIGURE_DEVEL_SYSROOT) \
+		--with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/ \
 		--disable-__cxa_atexit \
 		$(GCC_OPTSPACE) \
 		$(GCC_QUADMATH) \
@@ -291,7 +291,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
 		--host=$(GNU_HOST_NAME) \
 		--target=$(REAL_GNU_TARGET_NAME) \
 		--enable-languages=c \
-		$(BR2_CONFIGURE_DEVEL_SYSROOT) \
+		--with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/ \
 		--disable-__cxa_atexit \
 		$(GCC_OPTSPACE) \
 		$(GCC_QUADMATH) \
@@ -369,8 +369,8 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
 		--host=$(GNU_HOST_NAME) \
 		--target=$(REAL_GNU_TARGET_NAME) \
 		--enable-languages=$(GCC_CROSS_LANGUAGES) \
-		$(BR2_CONFIGURE_STAGING_SYSROOT) \
-		$(BR2_CONFIGURE_BUILD_TOOLS) \
+		--with-sysroot=$(STAGING_DIR) \
+		--with-build-time-tools=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin \
 		--disable-__cxa_atexit \
 		$(GCC_OPTSPACE) \
 		$(GCC_QUADMATH) \
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 15/22] gcc: remove unused EXTRA_GCC2_CONFIG_OPTIONS
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (13 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 14/22] toolchain: remove useless indirect variables Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  6:58   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 16/22] gcc: remove unused EXTRA_GCC4_CONFIG_OPTIONS Thomas Petazzoni
                   ` (6 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/gcc/gcc-uclibc-4.x.mk |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 7cdba0e..305270f 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -311,7 +311,6 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
 		$(SOFT_FLOAT_CONFIG_OPTION) \
 		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
-		$(EXTRA_GCC2_CONFIG_OPTIONS) \
 		$(QUIET) \
 	)
 	touch $@
@@ -390,7 +389,6 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
 		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
 		$(DISABLE_LARGEFILE) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
-		$(EXTRA_GCC2_CONFIG_OPTIONS) \
 	)
 	touch $@
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 16/22] gcc: remove unused EXTRA_GCC4_CONFIG_OPTIONS
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (14 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 15/22] gcc: remove unused EXTRA_GCC2_CONFIG_OPTIONS Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  6:59   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 17/22] gcc: remove unused ARCH_FPU_SUFFIX Thomas Petazzoni
                   ` (5 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/gcc/gcc-uclibc-4.x.mk |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 305270f..212660c 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -525,7 +525,6 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared
 		$(DISABLE_LARGEFILE) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
 		$(EXTRA_TARGET_GCC_CONFIG_OPTIONS) \
-		$(EXTRA_GCC4_CONFIG_OPTIONS) \
 	)
 	touch $@
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 17/22] gcc: remove unused ARCH_FPU_SUFFIX
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (15 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 16/22] gcc: remove unused EXTRA_GCC4_CONFIG_OPTIONS Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  7:00   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 18/22] gcc: move version/snap variables to gcc-uclibc-4.x.mk Thomas Petazzoni
                   ` (4 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/gcc/Makefile.in |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
index d9efcf0..c3f4576 100644
--- a/toolchain/gcc/Makefile.in
+++ b/toolchain/gcc/Makefile.in
@@ -20,11 +20,9 @@ TARGET_SOFT_FLOAT:=-mfloat-abi=soft
 else
 TARGET_SOFT_FLOAT:=-msoft-float
 endif
-ARCH_FPU_SUFFIX:=_nofpu
 else # no softfloat support
 SOFT_FLOAT_CONFIG_OPTION:=
 TARGET_SOFT_FLOAT:=
-ARCH_FPU_SUFFIX:=
 endif
 
 # some additional defaults
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 18/22] gcc: move version/snap variables to gcc-uclibc-4.x.mk
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (16 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 17/22] gcc: remove unused ARCH_FPU_SUFFIX Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  7:01   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 19/22] toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in Thomas Petazzoni
                   ` (3 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/gcc/Makefile.in       |    6 ------
 toolchain/gcc/gcc-uclibc-4.x.mk |    8 ++++++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
index c3f4576..3e82a32 100644
--- a/toolchain/gcc/Makefile.in
+++ b/toolchain/gcc/Makefile.in
@@ -3,15 +3,9 @@
 # So include them in this file and arrange to include it
 # soon after invoking make from the top level.
 
-GCC_VERSION:=$(call qstrip,$(BR2_GCC_VERSION))
 TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
 EXTRA_GCC_CONFIG_OPTIONS:=$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
 
-ifeq ($(call qstrip,$(BR2_GCC_VERSION_SNAP)),y)
-GCC_SNAP_DATE:=$(call qstrip,$(BR2_GCC_SNAP_DATE))
-else
-GCC_SNAP_DATE:=
-endif
 
 ifeq ($(BR2_SOFT_FLOAT),y)
 SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 212660c..3d0228d 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -17,6 +17,14 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
+GCC_VERSION:=$(call qstrip,$(BR2_GCC_VERSION))
+
+ifeq ($(BR2_GCC_VERSION_SNAP),y)
+GCC_SNAP_DATE:=$(call qstrip,$(BR2_GCC_SNAP_DATE))
+else
+GCC_SNAP_DATE:=
+endif
+
 ifneq ($(GCC_SNAP_DATE),)
  GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_VERSION)
 else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 19/22] toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (17 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 18/22] gcc: move version/snap variables to gcc-uclibc-4.x.mk Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  7:47   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 20/22] gcc: remove unused EXTRA_GCC1_CONFIG_OPTIONS Thomas Petazzoni
                   ` (2 subsequent siblings)
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Re-integrate in gcc-uclibc-4.x.mk things from
toolchain/gcc/Makefile.in that were completely gcc-specific. There was
no reason to pull that when building with other backends than the
internal one.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile                        |    1 -
 package/Makefile.in             |    2 +
 toolchain/Makefile.in           |    2 -
 toolchain/gcc/Makefile.in       |   62 ---------------------------------------
 toolchain/gcc/gcc-uclibc-4.x.mk |   62 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 64 insertions(+), 65 deletions(-)
 delete mode 100644 toolchain/Makefile.in
 delete mode 100644 toolchain/gcc/Makefile.in

diff --git a/Makefile b/Makefile
index a48fb87..0ed323e 100644
--- a/Makefile
+++ b/Makefile
@@ -262,7 +262,6 @@ endif
 
 all: world
 
-include toolchain/Makefile.in
 include package/Makefile.in
 include support/dependencies/dependencies.mk
 
diff --git a/package/Makefile.in b/package/Makefile.in
index 7c75406..2be933b 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -50,6 +50,8 @@ REAL_GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
 
 STAGING_DIR=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sysroot
 
+TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
+
 ifeq ($(BR2_OPTIMIZE_0),y)
 TARGET_OPTIMIZATION+=-O0
 endif
diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in
deleted file mode 100644
index 5f32f82..0000000
--- a/toolchain/Makefile.in
+++ /dev/null
@@ -1,2 +0,0 @@
-# gcc has a bunch of needed stuff....
-include toolchain/gcc/Makefile.in
diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
deleted file mode 100644
index 3e82a32..0000000
--- a/toolchain/gcc/Makefile.in
+++ /dev/null
@@ -1,62 +0,0 @@
-# gcc has a bunch of options that need to be shared with
-# both gcc-uclibc-4.x.mk, and are use by other packages...
-# So include them in this file and arrange to include it
-# soon after invoking make from the top level.
-
-TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
-EXTRA_GCC_CONFIG_OPTIONS:=$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
-
-
-ifeq ($(BR2_SOFT_FLOAT),y)
-SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
-ifeq ($(BR2_arm)$(BR2_armeb),y) # only set float-abi for arm
-TARGET_SOFT_FLOAT:=-mfloat-abi=soft
-else
-TARGET_SOFT_FLOAT:=-msoft-float
-endif
-else # no softfloat support
-SOFT_FLOAT_CONFIG_OPTION:=
-TARGET_SOFT_FLOAT:=
-endif
-
-# some additional defaults
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
-GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH)
-endif
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),)
-GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE)
-endif
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
-GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
-endif
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
-GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
-endif
-
-# AVR32 GCC configuration
-ifeq ($(BR2_avr32),y)
-EXTRA_GCC_CONFIG_OPTIONS+=--disable-libmudflap
-SOFT_FLOAT_CONFIG_OPTION:=
-endif
-
-# Disable mudflap and enable proper double/long double for SPE ABI
-ifeq ($(BR2_powerpc_SPE),y)
-EXTRA_GCC_CONFIG_OPTIONS+=--disable-libmudflap --enable-e500_double --with-long-double-128
-endif
-
-ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
-EXTRA_TARGET_GCC_CONFIG_OPTIONS:=
-
-# AVR32 target GCC configuration
-ifeq ($(BR2_avr32),y)
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--disable-libmudflap
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin \
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-as=$(TARGET_CROSS)as
-endif
-
-
-# and finally pull in config opts from the user
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=$(call qstrip,$(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS))
-
-TARGETS+=gcc_target
-endif
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 3d0228d..3f97a47 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -66,6 +66,64 @@ ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
 GCC_QUADMATH=--disable-libquadmath
 endif
 
+# Determine soft-float options
+ifeq ($(BR2_SOFT_FLOAT),y)
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+ifeq ($(BR2_arm)$(BR2_armeb),y) # only set float-abi for arm
+TARGET_SOFT_FLOAT:=-mfloat-abi=soft
+else
+TARGET_SOFT_FLOAT:=-msoft-float
+endif
+else # no softfloat support
+SOFT_FLOAT_CONFIG_OPTION:=
+TARGET_SOFT_FLOAT:=
+endif
+
+# Determine arch/tune/abi/cpu options
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
+GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH)
+endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),)
+GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE)
+endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
+GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
+endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
+GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
+endif
+
+# AVR32 GCC special configuration
+ifeq ($(BR2_avr32),y)
+# For the cross-compiler
+EXTRA_GCC_CONFIG_OPTIONS += \
+	--disable-libmudflap
+SOFT_FLOAT_CONFIG_OPTION:=
+
+# For the target compiler
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+	--disable-libmudflap
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+	--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+	--with-as=$(TARGET_CROSS)as
+endif
+
+# Disable mudflap and enable proper double/long double for SPE ABI
+ifeq ($(BR2_powerpc_SPE),y)
+EXTRA_GCC_CONFIG_OPTIONS +=  \
+	--disable-libmudflap \
+	--enable-e500_double \
+	--with-long-double-128
+endif
+
+# End with user-provided options, so that they can override previously
+# defined options.
+EXTRA_GCC_CONFIG_OPTIONS += \
+	$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+	$(call qstrip,$(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS))
+
 #############################################################
 #
 # Setup some initial stuff
@@ -586,3 +644,7 @@ gcc_target-clean:
 
 gcc_target-dirclean:
 	rm -rf $(GCC_BUILD_DIR4)
+
+ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
+TARGETS+=gcc_target
+endif
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 20/22] gcc: remove unused EXTRA_GCC1_CONFIG_OPTIONS
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (18 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 19/22] toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  7:47   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 21/22] mklibs: remove support Thomas Petazzoni
  2012-04-17 14:45 ` [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture Thomas Petazzoni
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/gcc/gcc-uclibc-4.x.mk |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 3f97a47..a4faf4f 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -310,7 +310,6 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
 		$(SOFT_FLOAT_CONFIG_OPTION) \
 		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
-		$(EXTRA_GCC1_CONFIG_OPTIONS) \
 		$(QUIET) \
 	)
 	touch $@
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 21/22] mklibs: remove support
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (19 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 20/22] gcc: remove unused EXTRA_GCC1_CONFIG_OPTIONS Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  7:56   ` Peter Korsgaard
  2012-04-17 14:45 ` [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture Thomas Petazzoni
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

The support for mklibs has been marked broken since more than a year
and nobody cared to bring it up to a working state.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/mklibs/Config.in                |    6 -
 toolchain/mklibs/mklibs.mk                |   49 ---
 toolchain/mklibs/mklibs.py                |  597 -----------------------------
 toolchain/toolchain-buildroot.mk          |    1 -
 toolchain/toolchain-buildroot/Config.in.2 |    1 -
 toolchain/toolchain-crosstool-ng.mk       |    1 -
 toolchain/toolchain-external.mk           |    1 -
 7 files changed, 0 insertions(+), 656 deletions(-)
 delete mode 100644 toolchain/mklibs/Config.in
 delete mode 100644 toolchain/mklibs/mklibs.mk
 delete mode 100644 toolchain/mklibs/mklibs.py

diff --git a/toolchain/mklibs/Config.in b/toolchain/mklibs/Config.in
deleted file mode 100644
index c065866..0000000
--- a/toolchain/mklibs/Config.in
+++ /dev/null
@@ -1,6 +0,0 @@
-config BR2_MKLIBS
-	bool "Run mklibs on the built root filesystem"
-	depends on BROKEN
-	help
-	  Recompiles all the shared libraries to only include the
-	  symbols actually needed to run the binaries on the target
diff --git a/toolchain/mklibs/mklibs.mk b/toolchain/mklibs/mklibs.mk
deleted file mode 100644
index 2dac984..0000000
--- a/toolchain/mklibs/mklibs.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-######################################################################
-#
-# mklibs
-#
-######################################################################
-MKLIBS_PROGRAM:=$(STAGING_DIR)/bin/mklibs.py
-
-$(MKLIBS_PROGRAM): toolchain/mklibs/mklibs.py
-	cp -dpf toolchain/mklibs/mklibs.py $@
-
-mklibs-clean:
-	rm -f $(MKLIBS_PROGRAM)
-
-mklibs-dirclean:
-	true
-
-#############################################################
-#
-# Run mklibs
-#
-#############################################################
-MKLIBS_PYTHON:=$(shell which python)
-ifeq ($(MKLIBS_PYTHON),)
-    MKLIBS_PYTHON=/usr/bin/python
-endif
-
-$(STAGING_DIR)/mklibs-stamp: $(MKLIBS_PROGRAM) $(MKLIBS_PYTHON) $(STAGING_DIR)/lib/*
-	find $(TARGET_DIR) -type f -perm +100 -exec \
-	    file -r -N -F '' {} + | \
-	    awk ' /executable.*dynamically/ { print $$1 }' > $(STAGING_DIR)/mklibs-progs
-	cd $(TARGET_DIR); PATH=$(PATH):$(STAGING_DIR)/bin $(MKLIBS_PYTHON) $(MKLIBS_PROGRAM) \
-	    --target $(REAL_GNU_TARGET_NAME) --root $(STAGING_DIR) -d ./ \
-	    `cat $(STAGING_DIR)/mklibs-progs`
-	touch $@
-
-# this empty target allows a mklibs dependeny to be included in the
-# target targets, but it will be only invoked if BR2_MKLIBS is conf'ed
-.PHONY: mklibs
-mklibs:
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-
-ifeq ($(BR2_MKLIBS),y)
-mklibs: $(STAGING_DIR)/mklibs-stamp
-endif
diff --git a/toolchain/mklibs/mklibs.py b/toolchain/mklibs/mklibs.py
deleted file mode 100644
index a84fd42..0000000
--- a/toolchain/mklibs/mklibs.py
+++ /dev/null
@@ -1,597 +0,0 @@
-#! /usr/bin/python
-
-# mklibs.py: An automated way to create a minimal /lib/ directory.
-#
-# Copyright 2001 by Falk Hueffner <falk@debian.org>
-#                 & Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de>
-#
-# mklibs.sh by Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
-# used as template
-#
-#   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, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-# HOW IT WORKS
-#
-# - Gather all unresolved symbols and libraries needed by the programs
-#   and reduced libraries
-# - Gather all symbols provided by the already reduced libraries
-#   (none on the first pass)
-# - If all symbols are provided we are done
-# - go through all libraries and remember what symbols they provide
-# - go through all unresolved/needed symbols and mark them as used
-# - for each library:
-#   - find pic file (if not present copy and strip the so)
-#   - compile in only used symbols
-#   - strip
-# - back to the top
-
-# TODO
-# * complete argument parsing as given as comment in main
-
-import commands
-import string
-import re
-import sys
-import os
-import glob
-import getopt
-from stat import *
-
-DEBUG_NORMAL  = 1
-DEBUG_VERBOSE = 2
-DEBUG_SPAM    = 3
-
-debuglevel = DEBUG_NORMAL
-
-def debug(level, *msg):
-    if debuglevel >= level:
-        print string.join(msg)
-
-# A simple set class. It should be replaced with the standard sets.Set
-# type as soon as Python 2.3 is out.
-class Set:
-    def __init__(self):
-        self.__dict = {}
-
-    def add(self, obj):
-        self.__dict[obj] = 1
-
-    def contains(self, obj):
-        return self.__dict.has_key(obj)
-
-    def merge(self, s):
-        for e in s.elems():
-            self.add(e)
-
-    def elems(self):
-        return self.__dict.keys()
-
-    def size(self):
-        return len(self.__dict)
-
-    def __eq__(self, other):
-        return self.__dict == other.__dict
-
-    def __str__(self):
-        return `self.__dict.keys()`
-
-    def __repr__(self):
-        return `self.__dict.keys()`
-
-# return a list of lines of output of the command
-def command(command, *args):
-    debug(DEBUG_SPAM, "calling", command, string.join(args))
-    (status, output) = commands.getstatusoutput(command + ' ' + string.join(args))
-    if os.WEXITSTATUS(status) != 0:
-        print "Command failed with status", os.WEXITSTATUS(status),  ":", \
-               command, string.join(args)
-	print "With output:", output
-        sys.exit(1)
-    return string.split(output, '\n')
-
-# Filter a list according to a regexp containing a () group. Return
-# a Set.
-def regexpfilter(list, regexp, groupnr = 1):
-    pattern = re.compile(regexp)
-    result = Set()
-    for x in list:
-        match = pattern.match(x)
-        if match:
-            result.add(match.group(groupnr))
-
-    return result
-
-# Return a Set of rpath strings for the passed object
-def rpath(obj):
-    if not os.access(obj, os.F_OK):
-        raise "Cannot find lib: " + obj
-    output = command(target + "objdump", "--private-headers", obj)
-    return map(lambda x: root + "/" + x, regexpfilter(output, ".*RPATH\s*(\S+)$").elems())
-
-# Return a Set of libraries the passed objects depend on.
-def library_depends(obj):
-    if not os.access(obj, os.F_OK):
-        raise "Cannot find lib: " + obj
-    output = command(target + "objdump", "--private-headers", obj)
-    return regexpfilter(output, ".*NEEDED\s*(\S+)$")
-
-# Return a list of libraries the passed objects depend on. The
-# libraries are in "-lfoo" format suitable for passing to gcc.
-def library_depends_gcc_libnames(obj):
-    if not os.access(obj, os.F_OK):
-        raise "Cannot find lib: " + obj
-    output = command(target + "objdump", "--private-headers", obj)
-    output = regexpfilter(output, ".*NEEDED\s*lib(\S+)\.so.*$")
-    if not output.elems():
-        return ""
-    else:
-        return "-l" + string.join(output.elems(), " -l")
-
-# Scan readelf output. Example:
-# Num:    Value          Size Type    Bind   Vis      Ndx Name
-#   1: 000000012002ab48   168 FUNC    GLOBAL DEFAULT  UND strchr at GLIBC_2.0 (2)
-symline_regexp = \
-    re.compile("\s*\d+: .+\s+\d+\s+\w+\s+(\w+)+\s+\w+\s+(\w+)\s+([^\s@]+)")
-
-# Return undefined symbols in an object as a Set of tuples (name, weakness)
-def undefined_symbols(obj):
-    if not os.access(obj, os.F_OK):
-        raise "Cannot find lib" + obj
-
-    result = Set()
-    output = command(target + "readelf", "-s", "-W", obj)
-    for line in output:
-        match = symline_regexp.match(line)
-        if match:
-            bind, ndx, name = match.groups()
-            if ndx == "UND":
-                result.add((name, bind == "WEAK"))
-    return result
-
-# Return a Set of symbols provided by a library
-def provided_symbols(obj):
-    if not os.access(obj, os.F_OK):
-        raise "Cannot find lib" + obj
-
-    result = Set()
-    debug(DEBUG_SPAM, "provided_symbols result = ", `result`)
-    output = command(target + "readelf", "-s", "-W", obj)
-    for line in output:
-        match = symline_regexp.match(line)
-        if match:
-            bind, ndx, name = match.groups()
-            if bind != "LOCAL" and not ndx in ("UND", "ABS"):
-                debug(DEBUG_SPAM, "provided_symbols adding ", `name`)
-                result.add(name)
-    return result
-
-# Return real target of a symlink
-def resolve_link(file):
-    debug(DEBUG_SPAM, "resolving", file)
-    while S_ISLNK(os.lstat(file)[ST_MODE]):
-        new_file = os.readlink(file)
-        if new_file[0] != "/":
-            file = os.path.join(os.path.dirname(file), new_file)
-        else:
-            file = new_file
-    debug(DEBUG_SPAM, "resolved to", file)
-    return file
-
-# Find complete path of a library, by searching in lib_path
-def find_lib(lib):
-    for path in lib_path:
-        if os.access(path + "/" + lib, os.F_OK):
-            return path + "/" + lib
-
-    return ""
-
-# Find a PIC archive for the library
-def find_pic(lib):
-    base_name = so_pattern.match(lib).group(1)
-    for path in lib_path:
-        for file in glob.glob(path + "/" + base_name + "_pic.a"):
-            if os.access(file, os.F_OK):
-                return resolve_link(file)
-    return ""
-
-# Find a PIC .map file for the library
-def find_pic_map(lib):
-    base_name = so_pattern.match(lib).group(1)
-    for path in lib_path:
-        for file in glob.glob(path + "/" + base_name + "_pic.map"):
-            if os.access(file, os.F_OK):
-                return resolve_link(file)
-    return ""
-
-def extract_soname(so_file):
-    soname_data = regexpfilter(command(target + "readelf", "--all", "-W", so_file),
-                               ".*SONAME.*\[(.*)\].*")
-    if soname_data.elems():
-        return soname_data.elems()[0]
-
-    return ""
-def usage(was_err):
-    if was_err:
-        outfd = sys.stderr
-    else:
-        outfd = sys.stdout
-    print >> outfd, "Usage: mklibs [OPTION]... -d DEST FILE ..."
-    print >> outfd, "Make a set of minimal libraries for FILE(s) in DEST."
-    print >> outfd, ""
-    print >> outfd, "  -d, --dest-dir DIRECTORY     create libraries in DIRECTORY"
-    print >> outfd, "  -D, --no-default-lib         omit default libpath (", string.join(default_lib_path, " : "), ")"
-    print >> outfd, "  -L DIRECTORY[:DIRECTORY]...  add DIRECTORY(s) to the library search path"
-    print >> outfd, "      --ldlib LDLIB            use LDLIB for the dynamic linker"
-    print >> outfd, "      --libc-extras-dir DIRECTORY  look for libc extra files in DIRECTORY"
-    # Ugh... Adding the trailing '-' breaks common practice.
-    #print >> outfd, "      --target TARGET          prepend TARGET- to the gcc and binutils calls"
-    print >> outfd, "      --target TARGET          prepend TARGET to the gcc and binutils calls"
-    print >> outfd, "      --root ROOT              search in ROOT for library rpaths"
-    print >> outfd, "  -v, --verbose                explain what is being done"
-    print >> outfd, "  -h, --help                   display this help and exit"
-    sys.exit(was_err)
-
-def version(vers):
-    print "mklibs: version ",vers
-    print ""
-
-#################### main ####################
-## Usage: ./mklibs.py [OPTION]... -d DEST FILE ...
-## Make a set of minimal libraries for FILE ... in directory DEST.
-##
-## Options:
-##   -L DIRECTORY               Add DIRECTORY to library search path.
-##   -D, --no-default-lib       Do not use default lib directories of /lib:/usr/lib
-##   -n, --dry-run              Don't actually run any commands; just print them.
-##   -v, --verbose              Print additional progress information.
-##   -V, --version              Print the version number and exit.
-##   -h, --help                 Print this help and exit.
-##   --ldlib                    Name of dynamic linker (overwrites environment variable ldlib)
-##   --libc-extras-dir          Directory for libc extra files
-##   --target                   Use as prefix for gcc or binutils calls
-##
-##   -d, --dest-dir DIRECTORY   Create libraries in DIRECTORY.
-##
-## Required arguments for long options are also mandatory for the short options.
-
-# Clean the environment
-vers="0.12 with uClibc fixes"
-os.environ['LC_ALL'] = "C"
-
-# Argument parsing
-opts = "L:DnvVhd:r:"
-longopts = ["no-default-lib", "dry-run", "verbose", "version", "help",
-            "dest-dir=", "ldlib=", "libc-extras-dir=", "target=", "root="]
-
-# some global variables
-lib_rpath = []
-lib_path = []
-dest_path = "DEST"
-ldlib = "LDLIB"
-include_default_lib_path = "yes"
-default_lib_path = ["/lib/", "/usr/lib/", "/usr/X11R6/lib/"]
-libc_extras_dir = "/usr/lib/libc_pic"
-target = ""
-root = ""
-so_pattern = re.compile("((lib|ld).*)\.so(\..+)*")
-script_pattern = re.compile("^#!\s*/")
-
-try:
-    optlist, proglist = getopt.getopt(sys.argv[1:], opts, longopts)
-except getopt.GetoptError, msg:
-    print >> sys.stderr, msg
-    usage(1)
-
-for opt, arg in optlist:
-    if opt in ("-v", "--verbose"):
-        if debuglevel < DEBUG_SPAM:
-            debuglevel = debuglevel + 1
-    elif opt == "-L":
-        lib_path.extend(string.split(arg, ":"))
-    elif opt in ("-d", "--dest-dir"):
-        dest_path = arg
-    elif opt in ("-D", "--no-default-lib"):
-        include_default_lib_path = "no"
-    elif opt == "--ldlib":
-        ldlib = arg
-    elif opt == "--libc-extras-dir":
-        libc_extras_dir = arg
-    elif opt == "--target":
-        #target = arg + "-"
-        target = arg
-    elif opt in ("-r", "--root"):
-        root = arg
-    elif opt in ("--help", "-h"):
-	usage(0)
-        sys.exit(0)
-    elif opt in ("--version", "-V"):
-        version(vers)
-        sys.exit(0)
-    else:
-        print "WARNING: unknown option: " + opt + "\targ: " + arg
-
-if include_default_lib_path == "yes":
-    lib_path.extend(default_lib_path)
-
-if ldlib == "LDLIB":
-    ldlib = os.getenv("ldlib")
-
-objects = {}  # map from inode to filename
-for prog in proglist:
-    inode = os.stat(prog)[ST_INO]
-    if objects.has_key(inode):
-        debug(DEBUG_SPAM, prog, "is a hardlink to", objects[inode])
-    elif so_pattern.match(prog):
-        debug(DEBUG_SPAM, prog, "is a library")
-    elif script_pattern.match(open(prog).read(256)):
-        debug(DEBUG_SPAM, prog, "is a script")
-    else:
-        objects[inode] = prog
-
-if not ldlib:
-    pattern = re.compile(".*Requesting program interpreter:.*/([^\]/]+).*")
-    for obj in objects.values():
-        output = command(target + "readelf", "--program-headers", obj)
-	for x in output:
-	    match = pattern.match(x)
-	    if match:
-	        ldlib = match.group(1)
-	        break
-	if ldlib:
-	    break
-
-if not ldlib:
-    sys.exit("E: Dynamic linker not found, aborting.")
-
-debug(DEBUG_NORMAL, "I: Using", ldlib, "as dynamic linker.")
-
-pattern = re.compile(".*ld-uClibc.*");
-if pattern.match(ldlib):
-    uclibc = 1
-else:
-    uclibc = 0
-
-# Check for rpaths
-for obj in objects.values():
-    rpath_val = rpath(obj)
-    if rpath_val:
-        if root:
-            if debuglevel >= DEBUG_VERBOSE:
-                print "Adding rpath " + string.join(rpath_val, ":") + " for " + obj
-            lib_rpath.extend(rpath_val)
-        else:
-            print "warning: " + obj + " may need rpath, but --root not specified"
-
-lib_path.extend(lib_rpath)
-
-passnr = 1
-previous_pass_unresolved = Set()
-while 1:
-    debug(DEBUG_NORMAL, "I: library reduction pass", `passnr`)
-    if debuglevel >= DEBUG_VERBOSE:
-        print "Objects:",
-        for obj in objects.values():
-            print obj[string.rfind(obj, '/') + 1:],
-        print
-
-    passnr = passnr + 1
-    # Gather all already reduced libraries and treat them as objects as well
-    small_libs = []
-    for lib in regexpfilter(os.listdir(dest_path), "(.*-so-stripped)$").elems():
-        obj = dest_path + "/" + lib
-        small_libs.append(obj)
-        inode = os.stat(obj)[ST_INO]
-        if objects.has_key(inode):
-            debug(DEBUG_SPAM, obj, "is hardlink to", objects[inode])
-        else:
-            objects[inode] = obj
-
-    # DEBUG
-    for obj in objects.values():
-        small_libs.append(obj)
-        debug(DEBUG_VERBOSE, "Object:", obj)
-
-    # calculate what symbols and libraries are needed
-    needed_symbols = Set()              # Set of (name, weakness-flag)
-    libraries = Set()
-    for obj in objects.values():
-        needed_symbols.merge(undefined_symbols(obj))
-        libraries.merge(library_depends(obj))
-
-    # FIXME: on i386 this is undefined but not marked UND
-    # I don't know how to detect those symbols but this seems
-    # to be the only one and including it on alpha as well
-    # doesn't hurt. I guess all archs can live with this.
-    needed_symbols.add(("sys_siglist", 1))
-
-    # calculate what symbols are present in small_libs
-    present_symbols = Set()
-    for lib in small_libs:
-        present_symbols.merge(provided_symbols(lib))
-
-    # are we finished?
-    using_ctor_dtor = 0
-    num_unresolved = 0
-    present_symbols_elems = present_symbols.elems()
-    unresolved = Set()
-    for (symbol, is_weak) in needed_symbols.elems():
-        if not symbol in present_symbols_elems:
-            debug(DEBUG_SPAM, "Still need:", symbol, `is_weak`)
-            unresolved.add((symbol, is_weak))
-            num_unresolved = num_unresolved + 1
-
-    debug (DEBUG_NORMAL, `needed_symbols.size()`, "symbols,",
-           `num_unresolved`, "unresolved")
-
-    if num_unresolved == 0:
-        break
-
-    if unresolved == previous_pass_unresolved:
-        # No progress in last pass. Verify all remaining symbols are weak.
-        for (symbol, is_weak) in unresolved.elems():
-            if not is_weak:
-                raise "Unresolvable symbol " + symbol
-        break
-
-    previous_pass_unresolved = unresolved
-
-    library_symbols = {}
-    library_symbols_used = {}
-    symbol_provider = {}
-
-    # Calculate all symbols each library provides
-    for library in libraries.elems():
-        path = find_lib(library)
-        if not path:
-            sys.exit("Library not found: " + library + " in path: "
-                     + string.join(lib_path, " : "))
-        symbols = provided_symbols(path)
-        library_symbols[library] = Set()
-        library_symbols_used[library] = Set()
-        for symbol in symbols.elems():
-            if symbol_provider.has_key(symbol):
-                # in doubt, prefer symbols from libc
-                if re.match("^libc[\.-]", library):
-                    library_symbols[library].add(symbol)
-                    symbol_provider[symbol] = library
-                else:
-                    debug(DEBUG_SPAM, "duplicate symbol", symbol, "in",
-                          symbol_provider[symbol], "and", library)
-            else:
-                library_symbols[library].add(symbol)
-                symbol_provider[symbol] = library
-
-	# Fixup support for constructors and destructors
-	if symbol_provider.has_key("_init"):
-	    debug(DEBUG_VERBOSE, library, ": Library has a constructor!");
-	    using_ctor_dtor = 1
-	    library_symbols[library].add("_init")
-	    symbol_provider["_init"] = library
-            library_symbols_used[library].add("_init")
-
-	if symbol_provider.has_key("_fini"):
-	    debug(DEBUG_VERBOSE, library, ": Library has a destructor!");
-	    using_ctor_dtor = 1
-	    library_symbols[library].add("_fini")
-	    symbol_provider["_fini"] = library
-            library_symbols_used[library].add("_fini")
-
-    # which symbols are actually used from each lib
-    for (symbol, is_weak) in needed_symbols.elems():
-        if not symbol_provider.has_key(symbol):
-            if not is_weak:
-                if not uclibc or (symbol != "main"):
-                    raise "No library provides non-weak " + symbol
-        else:
-            lib = symbol_provider[symbol]
-            library_symbols_used[lib].add(symbol)
-
-    # reduce libraries
-    for library in libraries.elems():
-        debug(DEBUG_VERBOSE, "reducing", library)
-        debug(DEBUG_SPAM, "using: " + string.join(library_symbols_used[library].elems()))
-        so_file = find_lib(library)
-        if root and (re.compile("^" + root).search(so_file)):
-            debug(DEBUG_VERBOSE, "no action required for " + so_file)
-            continue
-        so_file_name = os.path.basename(so_file)
-        if not so_file:
-            sys.exit("File not found:" + library)
-        pic_file = find_pic(library)
-        if not pic_file:
-            # No pic file, so we have to use the .so file, no reduction
-            debug(DEBUG_VERBOSE, "No pic file found for", so_file, "; copying")
-            command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
-                    so_file, dest_path + "/" + so_file_name + "-so-stripped")
-        else:
-            # we have a pic file, recompile
-            debug(DEBUG_SPAM, "extracting from:", pic_file, "so_file:", so_file)
-            soname = extract_soname(so_file)
-            if soname == "":
-                debug(DEBUG_VERBOSE, so_file, " has no soname, copying")
-                continue
-            debug(DEBUG_SPAM, "soname:", soname)
-            base_name = so_pattern.match(library).group(1)
-            # libc needs its soinit.o and sofini.o as well as the pic
-            if (base_name == "libc") and not uclibc:
-                # force dso_handle.os to be included, otherwise reduced libc
-                # may segfault in ptmalloc_init due to undefined weak reference
-                extra_flags = find_lib(ldlib) + " -u __dso_handle"
-                extra_pre_obj = libc_extras_dir + "/soinit.o"
-                extra_post_obj = libc_extras_dir + "/sofini.o"
-            else:
-                extra_flags = ""
-                extra_pre_obj = ""
-                extra_post_obj = ""
-            map_file = find_pic_map(library)
-            if map_file:
-                extra_flags = extra_flags + " -Wl,--version-script=" + map_file
-            if library_symbols_used[library].elems():
-                joined_symbols = "-u" + string.join(library_symbols_used[library].elems(), " -u")
-            else:
-                joined_symbols = ""
-	    if using_ctor_dtor == 1:
-                extra_flags = extra_flags + " -shared"
-            # compile in only used symbols
-            command(target + "gcc",
-                "-nostdlib -nostartfiles -shared -Wl,-soname=" + soname,\
-                joined_symbols, \
-                "-o", dest_path + "/" + so_file_name + "-so", \
-                extra_pre_obj, \
-                pic_file, \
-                extra_post_obj, \
-                extra_flags, \
-                "-lgcc -L", dest_path, \
-                "-L" + string.join(lib_path, " -L"), \
-                library_depends_gcc_libnames(so_file))
-            # strip result
-            command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
-                      dest_path + "/" + so_file_name + "-so",
-                      dest_path + "/" + so_file_name + "-so-stripped")
-            ## DEBUG
-            debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`)
-            debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t",
-                  `os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`)
-            debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so-stripped",
-                  "\t", `os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE]`)
-
-# Finalising libs and cleaning up
-for lib in regexpfilter(os.listdir(dest_path), "(.*)-so-stripped$").elems():
-    os.rename(dest_path + "/" + lib + "-so-stripped", dest_path + "/" + lib)
-for lib in regexpfilter(os.listdir(dest_path), "(.*-so)$").elems():
-    os.remove(dest_path + "/" + lib)
-
-# Canonicalize library names.
-for lib in regexpfilter(os.listdir(dest_path), "(.*so[.\d]*)$").elems():
-    this_lib_path = dest_path + "/" + lib
-    if os.path.islink(this_lib_path):
-        debug(DEBUG_VERBOSE, "Unlinking %s." % lib)
-        os.remove(this_lib_path)
-        continue
-    soname = extract_soname(this_lib_path)
-    if soname:
-        debug(DEBUG_VERBOSE, "Moving %s to %s." % (lib, soname))
-        os.rename(dest_path + "/" + lib, dest_path + "/" + soname)
-
-# Make sure the dynamic linker is present and is executable
-ld_file = find_lib(ldlib)
-ld_file_name = os.path.basename(ld_file)
-
-if not os.access(dest_path + "/" + ld_file_name, os.F_OK):
-    debug(DEBUG_NORMAL, "I: stripping and copying dynamic linker.")
-    command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
-            ld_file, dest_path + "/" + ld_file_name)
-
-os.chmod(dest_path + "/" + ld_file_name, 0755)
diff --git a/toolchain/toolchain-buildroot.mk b/toolchain/toolchain-buildroot.mk
index f21cefd..adab0f7 100644
--- a/toolchain/toolchain-buildroot.mk
+++ b/toolchain/toolchain-buildroot.mk
@@ -4,5 +4,4 @@ include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
 include toolchain/gdb/gdb.mk
 include toolchain/kernel-headers/kernel-headers.mk
-include toolchain/mklibs/mklibs.mk
 include toolchain/uClibc/uclibc.mk
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index 7f2f68f..7580946 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -97,7 +97,6 @@ choice
 endchoice
 
 source "toolchain/elf2flt/Config.in"
-source "toolchain/mklibs/Config.in"
 
 config BR2_VFP_FLOAT
 	bool "Use ARM Vector Floating Point unit"
diff --git a/toolchain/toolchain-crosstool-ng.mk b/toolchain/toolchain-crosstool-ng.mk
index f6cc2b9..d677256 100644
--- a/toolchain/toolchain-crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng.mk
@@ -6,5 +6,4 @@ include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
 include toolchain/gdb/gdb.mk
 include toolchain/toolchain-crosstool-ng/crosstool-ng.mk
-include toolchain/mklibs/mklibs.mk
 include toolchain/uClibc/uclibc.mk
diff --git a/toolchain/toolchain-external.mk b/toolchain/toolchain-external.mk
index d5b2aac..4292d85 100644
--- a/toolchain/toolchain-external.mk
+++ b/toolchain/toolchain-external.mk
@@ -5,6 +5,5 @@ include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
 include toolchain/gdb/gdb.mk
 include toolchain/kernel-headers/kernel-headers.mk
-include toolchain/mklibs/mklibs.mk
 include toolchain/toolchain-external/ext-tool.mk
 include toolchain/uClibc/uclibc.mk
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture
  2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
                   ` (20 preceding siblings ...)
  2012-04-17 14:45 ` [Buildroot] [PATCH 21/22] mklibs: remove support Thomas Petazzoni
@ 2012-04-17 14:45 ` Thomas Petazzoni
  2012-04-25  8:44   ` Peter Korsgaard
  21 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-17 14:45 UTC (permalink / raw)
  To: buildroot

The support for Xtensa has been added in July 2009, and no updates
have ever been done to it, and it requires some special handling, in
gcc/gdb, has some special Perl scripts, etc.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile                                   |    3 -
 linux/Config.in                            |    2 +-
 package/ltrace/Config.in                   |    2 +-
 target/Config.in.arch                      |   40 ---
 target/device/xtensa/device_table.txt      |  189 -----------
 target/xtensa/.gitignore                   |    1 -
 target/xtensa/Makefile.in                  |    1 -
 target/xtensa/defconfig                    |  129 --------
 target/xtensa/patch.in                     |   33 --
 target/xtensa/setup-config                 |   57 ----
 target/xtensa/uClibc-0.9.30.config         |  245 --------------
 target/xtensa/uClibc.config                |  190 -----------
 target/xtensa/xt-buildroot-overlay-install |  488 ----------------------------
 toolchain/gcc/gcc-uclibc-4.x.mk            |    5 -
 toolchain/gdb/gdb.mk                       |    5 -
 toolchain/toolchain-common.in              |    2 +-
 16 files changed, 3 insertions(+), 1389 deletions(-)
 delete mode 100644 target/device/xtensa/device_table.txt
 delete mode 100644 target/xtensa/.gitignore
 delete mode 100644 target/xtensa/Makefile.in
 delete mode 100644 target/xtensa/defconfig
 delete mode 100644 target/xtensa/patch.in
 delete mode 100644 target/xtensa/setup-config
 delete mode 100644 target/xtensa/uClibc-0.9.30.config
 delete mode 100644 target/xtensa/uClibc.config
 delete mode 100644 target/xtensa/xt-buildroot-overlay-install

diff --git a/Makefile b/Makefile
index 0ed323e..424d1ad 100644
--- a/Makefile
+++ b/Makefile
@@ -217,9 +217,6 @@ QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q)
 
 # Strip off the annoying quoting
 ARCH:=$(call qstrip,$(BR2_ARCH))
-ifeq ($(ARCH),xtensa)
-ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
-endif
 
 KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/i.86/i386/ -e s/sun4u/sparc64/ \
diff --git a/linux/Config.in b/linux/Config.in
index 5a2d287..c84db57 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -145,7 +145,7 @@ config BR2_LINUX_KERNEL_BZIMAGE
 
 config BR2_LINUX_KERNEL_ZIMAGE
 	bool "zImage"
-	depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || BR2_sh || BR2_sh64 || BR2_xtensa
+	depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || BR2_sh || BR2_sh64
 
 config BR2_LINUX_KERNEL_VMLINUX_BIN
 	bool "vmlinux.bin"
diff --git a/package/ltrace/Config.in b/package/ltrace/Config.in
index 9e71d82..a65ca48 100644
--- a/package/ltrace/Config.in
+++ b/package/ltrace/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LTRACE
 	bool "ltrace"
-	depends on !(BR2_avr32 || BR2_mips || BR2_mipsel || BR2_sh || BR2_sh64 || BR2_xtensa)
+	depends on !(BR2_avr32 || BR2_mips || BR2_mipsel || BR2_sh || BR2_sh64)
 	select BR2_PACKAGE_LIBELF
 	help
 	  Debugging program which runs a specified command until it exits.
diff --git a/target/Config.in.arch b/target/Config.in.arch
index f8ab84e..e949764 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -122,12 +122,6 @@ config BR2_x86_64
 	  architecture compatible microprocessor).
 	  http://en.wikipedia.org/wiki/X86_64
 
-config BR2_xtensa
-	bool "Xtensa"
-	help
-	  Xtensa is a Tensilica processor IP architecture.
-	  http://en.wikipedia.org/wiki/Xtensa
-	  http://www.tensilica.com/
 endchoice
 
 config BR2_microblaze
@@ -461,38 +455,6 @@ config BR2_SPARC_TYPE
 
 choice
 	prompt "Target Architecture Variant"
-	depends on BR2_xtensa
-	default BR2_xtensa_dc232b
-	help
-	  Specific CPU variant to use
-
-config BR2_xtensa_custom
-	bool "Custom Xtensa processor configuration"
-config BR2_xtensa_dc232a
-	bool "dc232a - Diamond 232L Standard Core Rev.A (LE)"
-config BR2_xtensa_dc232b
-	bool "dc232b - Diamond 232L Standard Core Rev.B (LE)"
-#config BR2_xtensa_s5000
-#	bool "s5000 - Stretch S5000"
-endchoice
-
-config BR2_xtensa_custom_name
-	string "Custom Xtensa processor configuration name"
-	depends on BR2_xtensa_custom
-	default ""
-	help
-	  Name given to a custom Xtensa processor configuration.
-	  This is used to select the correct overlay.
-
-config BR2_xtensa_core_name
-	string
-	default BR2_xtensa_custom_name	if BR2_xtensa_custom
-	default "dc232a"		if BR2_xtensa_dc232a
-	default "dc232b"		if BR2_xtensa_dc232b
-#	default "s5000"			if BR2_xtensa_s5000
-
-choice
-	prompt "Target Architecture Variant"
 	depends on BR2_powerpc
 	default BR2_generic_powerpc
 	help
@@ -632,8 +594,6 @@ config BR2_ARCH
 	default "x86_64"	if BR2_x86_64_opteron
 	default "x86_64"	if BR2_x86_64_opteron_sse3
 	default "x86_64"	if BR2_x86_64_barcelona
-	default "xtensa"	if BR2_xtensa
-
 
 config BR2_ENDIAN
 	string
diff --git a/target/device/xtensa/device_table.txt b/target/device/xtensa/device_table.txt
deleted file mode 100644
index d0c7467..0000000
--- a/target/device/xtensa/device_table.txt
+++ /dev/null
@@ -1,189 +0,0 @@
-# When building a target filesystem, it is desirable to not have to
-# become root and then run 'mknod' a thousand times.  Using a device 
-# table you can create device nodes and directories "on the fly".
-#
-# This is a sample device table file for use with genext2fs.  You can
-# do all sorts of interesting things with a device table file.  For
-# example, if you want to adjust the permissions on a particular file
-# you can just add an entry like:
-#   /sbin/foobar        f       2755    0       0       -       -       -       -       -
-# and (assuming the file /sbin/foobar exists) it will be made setuid
-# root (regardless of what its permissions are on the host filesystem.
-# Furthermore, you can use a single table entry to create a many device
-# minors.  For example, if I wanted to create /dev/hda and /dev/hda[0-15]
-# I could just use the following two table entries:
-#   /dev/hda    b       640     0       0       3       0       0       0       -
-#   /dev/hda    b       640     0       0       3       1       1       1       15
-# 
-# Device table entries take the form of:
-# <name>    <type>      <mode>  <uid>   <gid>   <major> <minor> <start> <inc>   <count>
-# where name is the file name,  type can be one of: 
-#       f       A regular file
-#       d       Directory
-#       c       Character special device file
-#       b       Block special device file
-#       p       Fifo (named pipe)
-# uid is the user id for the target file, gid is the group id for the
-# target file.  The rest of the entries (major, minor, etc) apply only 
-# to device special files.
-
-# Have fun
-# -Erik Andersen <andersen@codepoet.org>
-#
-
-#<name>		<type>	<mode>	<uid>	<gid>	<major>	<minor>	<start>	<inc>	<count>
-/dev		d	755	0	0	-	-	-	-	-
-/dev/pts	d	755	0	0	-	-	-	-	-
-/dev/shm	d	755	0	0	-	-	-	-	-
-/tmp		d	1777	0	0	-	-	-	-	-
-/etc		d	755	0	0	-	-	-	-	-
-/home/default	d	2755	1000	1000	-	-	-	-	-
-#<name>					<type>	<mode>	<uid>	<gid>	<major>	<minor>	<start>	<inc>	<count>
-/bin/busybox				f	4755	0	0	-	-	-	-	-
-/etc/shadow				f	600	0	0	-	-	-	-	-
-/etc/passwd				f	644	0	0	-	-	-	-	-
-/etc/network/if-up.d			d	755	0	0	-	-	-	-	-
-/etc/network/if-pre-up.d		d	755	0	0	-	-	-	-	-
-/etc/network/if-down.d			d	755	0	0	-	-	-	-	-
-/etc/network/if-post-down.d		d	755	0	0	-	-	-	-	-
-/usr/share/udhcpc/default.script	f	755	0	0	-	-	-	-	-
-# uncomment this to allow starting x as non-root
-#/usr/X11R6/bin/Xfbdev		f	4755	0	0	-	-	-	-	-
-# Normal system devices
-/dev/mem	c	640	0	0	1	1	0	0	-
-/dev/kmem	c	640	0	0	1	2	0	0	-
-/dev/null	c	666	0	0	1	3	0	0	-
-/dev/zero	c	666	0	0	1	5	0	0	-
-/dev/random	c	666	0	0	1	8	0	0	-
-/dev/urandom	c	666	0	0	1	9	0	0	-
-/dev/ram	b	640	0	0	1	1	0	0	-
-/dev/ram	b	640	0	0	1	0	0	1	4
-/dev/loop	b	640	0	0	7	0	0	1	2
-/dev/rtc	c	640	0	0	10	135	-	-	-
-/dev/console	c	666	0	0	5	1	-	-	-
-/dev/tty	c	666	0	0	5	0	-	-	-
-/dev/tty	c	666	0	0	4	0	0	1	8
-/dev/ttyp	c	666	0	0	3	0	0	1	10
-/dev/ptyp	c       666     0       0       2       0       0       1       10
-/dev/ptmx	c	666	0	0	5	2	-	-	-
-/dev/ttyP	c	666	0	0	57	0	0	1	4
-/dev/ttyS	c	666	0	0	4	64	0	1	4
-/dev/fb		c	640	0	5	29	0	0	1	4
-#/dev/ttySA	c	666	0	0	204	5	0	1	3
-/dev/psaux	c	666	0	0	10	1	0	0	-
-#/dev/ppp	c	666	0	0	108	0	-	-	-
-/dev/ttyCPM	c	666	0	0	204	46	0	1	4
-/dev/ttyAMA	c	666	0	0	204	64	0	1	4
-/dev/ttySAC	c	666	0	0	204	64	0	1	4
-/dev/ttyPSC	c	666	0	0	204	148	0	1	4
-/dev/ttyUL	c	666	0	0	204	187	0	1	4
-/dev/ttymxc	c	666	0	0	207	16	0	1	3
-
-# Input stuff
-/dev/input		d	755	0	0	-	-	-	-	-
-/dev/input/mice		c	640	0	0	13	63	0	0	-
-/dev/input/mouse	c	660	0	0	13	32	0	1	4
-/dev/input/event	c	660	0	0	13	64	0	1	4
-#/dev/input/js		c	660	0	0	13	0	0	1	4
-
-
-# MTD stuff
-/dev/mtd	c	640	0	0	90	0	0	2	4
-/dev/mtdblock	b	640	0	0	31	0	0	1	4
-
-#Tun/tap driver
-/dev/net	d	755	0	0	-	-	-	-	-
-/dev/net/tun	c	660	0	0	10	200	-	-	-
-
-# Audio stuff
-#/dev/audio	c	666	0	29	14	4	-	-	-
-#/dev/audio1	c	666	0	29	14	20	-	-	-
-#/dev/dsp	c	666	0	29	14	3	-	-	-
-#/dev/dsp1	c	666	0	29	14	19	-	-	-
-#/dev/sndstat	c	666	0	29	14	6	-	-	-
-
-# User-mode Linux stuff
-#/dev/ubda	b	640	0	0	98	0	0	0	-
-#/dev/ubda	b	640	0	0	98	1	1	1	15
-
-# IDE Devices
-/dev/hda	b	640	0	0	3	0	0	0	-
-/dev/hda	b	640	0	0	3	1	1	1	15
-/dev/hdb	b	640	0	0	3	64	0	0	-
-/dev/hdb	b	640	0	0	3	65	1	1	15
-#/dev/hdc	b	640	0	0	22	0	0	0	-
-#/dev/hdc	b	640	0	0	22	1	1	1	15
-#/dev/hdd	b	640	0	0	22	64	0	0	-
-#/dev/hdd	b	640	0	0	22	65	1	1	15
-#/dev/hde	b	640	0	0	33	0	0	0	-
-#/dev/hde	b	640	0	0	33	1	1	1	15
-#/dev/hdf	b	640	0	0	33	64	0	0	-
-#/dev/hdf	b	640	0	0	33	65	1	1	15
-#/dev/hdg	b	640	0	0	34	0	0	0	-
-#/dev/hdg	b	640	0	0	34	1	1	1	15
-#/dev/hdh	b	640	0	0	34	64	0	0	-
-#/dev/hdh	b	640	0	0	34	65	1	1	15
-
-# SCSI Devices
-/dev/sda	b	640	0	0	8	0	0	0	-
-/dev/sda	b	640	0	0	8	1	1	1	15
-/dev/sdb	b	640	0	0	8	16	0	0	-
-/dev/sdb	b	640	0	0	8	17	1	1	15
-#/dev/sdc	b	640	0	0	8	32	0	0	-
-#/dev/sdc	b	640	0	0	8	33	1	1	15
-#/dev/sdd	b	640	0	0	8	48	0	0	-
-#/dev/sdd	b	640	0	0	8	49	1	1	15
-#/dev/sde	b	640	0	0	8	64	0	0	-
-#/dev/sde	b	640	0	0	8	65	1	1	15
-#/dev/sdf	b	640	0	0	8	80	0	0	-
-#/dev/sdf	b	640	0	0	8	81	1	1	15
-#/dev/sdg	b	640	0	0	8	96	0	0	-
-#/dev/sdg	b	640	0	0	8	97	1	1	15
-#/dev/sdh	b	640	0	0	8	112	0	0	-
-#/dev/sdh	b	640	0	0	8	113	1	1	15
-#/dev/sg	c	640	0	0	21	0	0	1	15
-#/dev/scd	b	640	0	0	11	0	0	1	15
-#/dev/st	c	640	0	0	9	0	0	1	8
-#/dev/nst	c	640	0	0	9	128	0	1	8
-#/dev/st	c	640	0	0	9	32	1	1	4
-#/dev/st	c	640	0	0	9	64	1	1	4
-#/dev/st	c	640	0	0	9	96	1	1	4
-
-# USB block devices (ub driver)
-/dev/uba	b	640	0	0	180	0	0	0	-
-/dev/uba	b	640	0	0	180	1	1	1	6
-/dev/ubb	b	640	0	0	180	8	0	0	-
-/dev/ubb	b	640	0	0	180	65	1	1	6
-
-# Floppy disk devices
-#/dev/fd	b	640	0	0	2	0	0	1	2
-#/dev/fd0d360	b	640	0	0	2	4	0	0	-
-#/dev/fd1d360	b	640	0	0	2	5	0	0	-
-#/dev/fd0h1200	b	640	0	0	2	8	0	0	-
-#/dev/fd1h1200	b	640	0	0	2	9	0	0	-
-#/dev/fd0u1440	b	640	0	0	2	28	0	0	-
-#/dev/fd1u1440	b	640	0	0	2	29	0	0	-
-#/dev/fd0u2880	b	640	0	0	2	32	0	0	-
-#/dev/fd1u2880	b	640	0	0	2	33	0	0	-
-
-# All the proprietary cdrom devices in the world
-#/dev/aztcd	b	640	0	0	29	0	0	0	-
-#/dev/bpcd	b	640	0	0	41	0	0	0	-
-#/dev/capi20	c	640	0	0	68	0	0	1	2
-#/dev/cdu31a	b	640	0	0	15	0	0	0	-
-#/dev/cdu535	b	640	0	0	24	0	0	0	-
-#/dev/cm206cd	b	640	0	0	32	0	0	0	-
-#/dev/sjcd	b	640	0	0	18	0	0	0	-
-#/dev/sonycd	b	640	0	0	15	0	0	0	-
-#/dev/gscd	b	640	0	0	16	0	0	0	-
-#/dev/sbpcd	b	640	0	0	25	0	0	0	-
-#/dev/sbpcd	b	640	0	0	25	0	0	1	4
-#/dev/mcd	b	640	0	0	23	0	0	0	-
-#/dev/optcd	b	640	0	0	17	0	0	0	-
-
-# I2C device nodes
-/dev/i2c-	c	666	0	0	89	0	0	1	4
-
-# Xtensa special devices
-/dev/simdisk0        b      640      0       0       240     0       0       0
-/dev/simdisk1        b      640      0       0       240     1       0       0
diff --git a/target/xtensa/.gitignore b/target/xtensa/.gitignore
deleted file mode 100644
index cff61bf..0000000
--- a/target/xtensa/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/busybox-config
diff --git a/target/xtensa/Makefile.in b/target/xtensa/Makefile.in
deleted file mode 100644
index 8a654b9..0000000
--- a/target/xtensa/Makefile.in
+++ /dev/null
@@ -1 +0,0 @@
--include target/xtensa/*/*.mk
diff --git a/target/xtensa/defconfig b/target/xtensa/defconfig
deleted file mode 100644
index 0eee5c0..0000000
--- a/target/xtensa/defconfig
+++ /dev/null
@@ -1,129 +0,0 @@
-# Default buildroot configuration for running Linux on an Xtensa processor
-# on an LX60 board.
-
-#
-# Project Options
-#
-BR2_BANNER="Welcome to your custom Xtensa processor based uClibc environment."
-BR2_HAVE_DOT_CONFIG=y
-BR2_xtensa=y
-BR2_xtensa_dc232b=y
-BR2_xtensa_core_name="dc232b"
-BR2_ARCH="xtensa"
-
-#
-# Build options
-#
-BR2_WGET="wget --passive-ftp"
-# BR2_STRIP_strip is not set
-# BR2_STRIP_none=y
-
-## Added by Maxim
-
-#
-# Kernel Header Options
-#
-BR2_KERNEL_none=y
-BR2_KERNEL_HEADERS_2_6_22_1=y
-BR2_DEFAULT_KERNEL_HEADERS="2.6.22.1"
-
-#
-# uClibc Options
-#
-BR2_UCLIBC_VERSION_0_9_30=y
-# BR2_UCLIBC_VERSION_SNAPSHOT is not set
-BR2_UCLIBC_CONFIG="target/xtensa/uClibc-0.9.30.config"
-BR2_PTHREADS_OLD=y
-# BR2_PTHREADS_NATIVE is not set
-BR2_PTHREAD_DEBUG=y
-
-#
-# Binutils Options
-#
-BR2_BINUTILS_VERSION_2_19=y
-BR2_BINUTILS_VERSION="2.19"
-BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
-
-#
-# Gcc Options
-#
-BR2_GCC_VERSION_4_3_2=y
-# BR2_GCC_IS_SNAP is not set
-BR2_GCC_VERSION="4.3.2"
-BR2_TOOLCHAIN_SYSROOT=y
-BR2_EXTRA_GCC_CONFIG_OPTIONS=""
-BR2_GCC_CROSS_CXX=y
-BR2_INSTALL_LIBSTDCPP=y
-BR2_GCC_SHARED_LIBGCC=y
-
-#
-# Gdb Options
-#
-BR2_PACKAGE_GDB=y
-BR2_PACKAGE_GDB_SERVER=y
-BR2_PACKAGE_GDB_HOST=y
-# BR2_GDB_VERSION_6_2_1 is not set
-# BR2_GDB_VERSION_6_3 is not set
-# BR2_GDB_VERSION_6_4 is not set
-# BR2_GDB_VERSION_6_5 is not set
-# BR2_GDB_VERSION_6_6 is not set
-# BR2_GDB_VERSION_6_7_1 is not set
-BR2_GDB_VERSION_6_8=y
-# BR2_GDB_VERSION_SNAPSHOT is not set
-BR2_GDB_VERSION="6.8"
-
-#
-# Common Toolchain Options
-#
-# BR2_PACKAGE_SSTRIP_TARGET is not set
-# BR2_PACKAGE_SSTRIP_HOST is not set
-BR2_LARGEFILE=y
-BR2_INET_RPC=y
-BR2_TARGET_OPTIMIZATION="-Os -pipe"
-
-
-## Added by Maxim
-BR2_TOOLCHAIN_BUILDROOT=y
-
-
-# BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is not set
-
-#
-# Other development stuff
-#
-# BR2_PACKAGE_LIBINTL is not set
-#  For NFS mount:
-BR2_PACKAGE_PORTMAP=y
-
-#
-# Other stuff
-#
-
-#
-# filesystem for target device
-#
-BR2_ROOTFS_DEVICE_TABLE="target/device/xtensa/device_table.txt"
-BR2_TARGET_ROOTFS_CPIO=y
-BR2_TARGET_ROOTFS_CPIO_GZIP=y
-BR2_TARGET_ROOTFS_INITRAMFS=y
-
-#
-# Linux Options
-#
-# BR2_PACKAGE_LINUX is not set
-
-#
-# Board Support Options
-#
-BR2_TARGET_XTENSA=y
-
-#
-# Tensilica Xtensa/Diamond based Device Support
-#
-BR2_TARGET_XTENSA_XTAV60=y
-
-#
-# Compressors / decompressors
-#
-
-BR2_PACKAGE_ZLIB=y
diff --git a/target/xtensa/patch.in b/target/xtensa/patch.in
deleted file mode 100644
index 3fe5cc8..0000000
--- a/target/xtensa/patch.in
+++ /dev/null
@@ -1,33 +0,0 @@
-ifneq ($(filter xtensa%,$(ARCH)),)
-#############################################################
-#
-#  Xtensa processor architecture (including Diamond Standard cores)
-#
-#############################################################
-
-#  The following defines a function to be used like this:
-#	$(call XTENSA_PATCH, <module>, <patchdir>, <relative dir list...>)
-#  which returns the first overlay patch file for <module> found
-#  in the list of directories <relative dir list...> which are
-#  relative to <patchdir> (itself either absolute or relative to the
-#  current directory).  The returned filename is relative to <patchdir>.
-#  For example:
-#	$(call XTENSA_PATCH, binutils, some/dir/path, . ..)
-#  (no commas between directory paths in the list).
-#
-#  A selected overlay patch must exist ("fsf" means no specific
-#  overlay is selected).  So the function emits a Makefile error
-#  if a selected patch file is not found.
-
-XTENSA_CORENAME:=$(call qstrip,$(BR2_xtensa_core_name))
-ifeq ($(XTENSA_CORENAME),fsf)
-XTENSA_PATCH =
-else
-XTENSA_PATCH_SUFFIX = $(1)-xtensa_$(XTENSA_CORENAME).tgz
-XTENSA_PATCH_FILE = $(firstword $(wildcard $(patsubst %,$(2)/%/*$(XTENSA_PATCH_SUFFIX),$(3))))
-# FULLPATH = $(if $(filter /%,$(1)),$(1),$(PWD)/$(1))
-XTENSA_PATCH = $(if $(XTENSA_PATCH_FILE),$(patsubst $(2)/%,%,$(XTENSA_PATCH_FILE)),\
-	$(error Missing $(1) patch for Xtensa $(XTENSA_CORENAME) processor (*$(XTENSA_PATCH_SUFFIX) in $(addprefix $(2)/,$(3)))))
-endif
-
-endif
diff --git a/target/xtensa/setup-config b/target/xtensa/setup-config
deleted file mode 100644
index 7ef8fe8..0000000
--- a/target/xtensa/setup-config
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-#  Convenience script for setting up a default buildroot config
-#  for Xtensa processor targets..
-
-usage() {
-    echo "Usage (invoke from top of buildroot tree):"
-    echo "    ./target/xtensa/setup-config <corename>"
-   #echo "    ./target/xtensa/setup-config <corename> [<overlaypath>]"
-    echo "where:"
-    echo "    <corename> is the Xtensa core overlay name, as specified in the -c option"
-    echo "    of the ./target/xtensa/xt-buildroot-overlay-install script."
-    echo ""
-    echo "For example:"
-    echo "   ./target/xtensa/setup-config dc232b"
-    echo ""
-    echo "Currently installed (available) core overlay names are:"
-    echo "   " `ls toolchain/binutils/binutils-xtensa_*.tgz | sed -e 's,toolchain\/binutils\/binutils-xtensa_\(.*\)\.tgz,\1,g'`
-    exit 1
-}
-
-if [ $# -ne 1 ]; then
-    usage
-fi
-
-core=$1 ; shift
-
-if [ ! -f toolchain/binutils/binutils-xtensa_${core}.tgz \
-  -o ! -f toolchain/gcc/gcc-xtensa_${core}.tgz \
-  -o ! -f toolchain/gdb/gdb-xtensa_${core}.tgz ]; then
-    echo "ERROR: Did not find an installed Xtensa core overlay named '${core}'."
-    echo "ERROR: Please install it first with ./target/xtensa/xt-buildroot-overlay-install"
-    echo ""
-    usage
-fi
-
-#  Use preset buildroot config:
-cp target/xtensa/defconfig .defconfig-xtensa
-#  Set core name:
-sed -i -e 's,^BR2_xtensa_\(.*\)=y,BR2_xtensa_custom=y\nBR2_xtensa_custom_name="'${core}'",' .defconfig-xtensa
-##  sed -i -e 's,^.*BR2_xtensa_core_name.*,BR_xtensa_core_name="'${core}'",'  .defconfig-xtensa
-#  Create full .config with defaults:
-make clean defconfig CONFIG_DEFCONFIG=.defconfig-xtensa || exit 1
-
-#  Busybox adjustments:  turn off 'ar' (can't create archives yet overrides real one)
-#  and turn on NFS mounting (Xtensa defconfig turns on RPC so this can work):
-#
-bborig=`grep '^BR2_PACKAGE_BUSYBOX_CONFIG=' .config | sed -e 's,.*"\(.*\)".*,\1,'`
-bbconf=target/xtensa/busybox-config
-cp $bborig $bbconf
-sed -i -e 's,^CONFIG_AR=y,# CONFIG_AR is not set,' $bbconf
-sed -i -e 's,^.*CONFIG_FEATURE_MOUNT_NFS.*,CONFIG_FEATURE_MOUNT_NFS=y,' $bbconf
-#  Make use of above busybox adjustments:
-sed -i -e 's,.*\(BR2_PACKAGE_BUSYBOX_CONFIG\).*,\1="'$bbconf'",' .config
-
-echo "Done."
-
diff --git a/target/xtensa/uClibc-0.9.30.config b/target/xtensa/uClibc-0.9.30.config
deleted file mode 100644
index 5701fe4..0000000
--- a/target/xtensa/uClibc-0.9.30.config
+++ /dev/null
@@ -1,245 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Thu Jan 23 14:50:00 2009
-#
-# TARGET_alpha is not set
-# TARGET_arm is not set
-# TARGET_avr32 is not set
-# TARGET_bfin is not set
-# TARGET_cris is not set
-# TARGET_e1 is not set
-# TARGET_frv is not set
-# TARGET_h8300 is not set
-# TARGET_hppa is not set
-# TARGET_i386 is not set
-# TARGET_i960 is not set
-# TARGET_ia64 is not set
-# TARGET_m68k is not set
-# TARGET_microblaze is not set
-# TARGET_mips is not set
-# TARGET_nios is not set
-# TARGET_nios2 is not set
-# TARGET_powerpc is not set
-# TARGET_sh is not set
-# TARGET_sh64 is not set
-# TARGET_sparc is not set
-# TARGET_v850 is not set
-# TARGET_vax is not set
-# TARGET_x86_64 is not set
-TARGET_xtensa=y
-
-#
-# Target Architecture Features and Options
-#
-TARGET_ARCH="xtensa"
-FORCE_OPTIONS_FOR_ARCH=y
-# ARCH_LITTLE_ENDIAN is not set
-# ARCH_BIG_ENDIAN is not set
-# ARCH_WANTS_LITTLE_ENDIAN is not set
-# ARCH_WANTS_BIG_ENDIAN is not set
-
-#
-# Using ELF file format
-#
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
-UCLIBC_HAS_FLOATS=y
-UCLIBC_HAS_FPU=y
-DO_C99_MATH=y
-# UCLIBC_HAS_FENV is not set
-UCLIBC_HAS_LONG_DOUBLE_MATH=y
-KERNEL_HEADERS="/usr/src/linux/include"
-HAVE_DOT_CONFIG=y
-
-#
-# General Library Settings
-#
-# HAVE_NO_PIC is not set
-DOPIC=y
-# ARCH_HAS_NO_SHARED is not set
-# ARCH_HAS_NO_LDSO is not set
-HAVE_SHARED=y
-# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
-LDSO_LDD_SUPPORT=y
-LDSO_CACHE_SUPPORT=y
-# LDSO_PRELOAD_FILE_SUPPORT is not set
-LDSO_BASE_FILENAME="ld.so"
-# UCLIBC_STATIC_LDCONFIG is not set
-# LDSO_RUNPATH is not set
-UCLIBC_CTOR_DTOR=y
-# LDSO_GNU_HASH_SUPPORT is not set
-# HAS_NO_THREADS is not set
-UCLIBC_HAS_THREADS=y
-PTHREADS_DEBUG_SUPPORT=y
-LINUXTHREADS_OLD=y
-UCLIBC_HAS_SYSLOG=y
-UCLIBC_HAS_LFS=y
-# MALLOC is not set
-# MALLOC_SIMPLE is not set
-MALLOC_STANDARD=y
-MALLOC_GLIBC_COMPAT=y
-UCLIBC_DYNAMIC_ATEXIT=y
-# COMPAT_ATEXIT is not set
-UCLIBC_SUSV3_LEGACY=y
-UCLIBC_SUSV3_LEGACY_MACROS=y
-# UCLIBC_HAS_STUBS is not set
-UCLIBC_HAS_SHADOW=y
-UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
-UCLIBC_HAS___PROGNAME=y
-UCLIBC_HAS_PTY=y
-UNIX98PTY_ONLY=y
-# UCLIBC_HAS_GETPT is not set
-ASSUME_DEVPTS=y
-UCLIBC_HAS_TM_EXTENSIONS=y
-UCLIBC_HAS_TZ_CACHING=y
-UCLIBC_HAS_TZ_FILE=y
-UCLIBC_HAS_TZ_FILE_READ_MANY=y
-UCLIBC_TZ_FILE_PATH="/etc/TZ"
-
-#
-# Advanced Library Settings
-#
-UCLIBC_PWD_BUFFER_SIZE=256
-UCLIBC_GRP_BUFFER_SIZE=256
-UCLIBC_HAS_NONREENTRANT=y
-
-#
-# Networking Support
-#
-
-UCLIBC_LINUX_MODULE_24=y
-UCLIBC_LINUX_SPECIFIC=y
-UCLIBC_HAS_GNU_ERROR=y
-UCLIBC_BSD_SPECIFIC=y
-UCLIBC_HAS_BSD_ERR=y
-UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
-UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL=y
-# UCLIBC_NTP_LEGACY is not set
-# UCLIBC_SV4_DEPRECATED is not set
-UCLIBC_HAS_REALTIME=y
-UCLIBC_HAS_ADVANCED_REALTIME=y
-UCLIBC_HAS_EPOLL=y
-UCLIBC_HAS_XATTR=y
-UCLIBC_HAS_PROFILING=y
-UCLIBC_HAS_CRYPT_IMPL=y
-UCLIBC_HAS_CRYPT=y
-UCLIBC_HAS_NETWORK_SUPPORT=y
-UCLIBC_HAS_SOCKET=y
-UCLIBC_HAS_IPV4=y
-UCLIBC_HAS_IPV6=y
-UCLIBC_HAS_RPC=y
-UCLIBC_HAS_FULL_RPC=y
-UCLIBC_HAS_REENTRANT_RPC=y
-UCLIBC_USE_NETLINK=y
-# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set
-# UCLIBC_HAS_BSD_RES_CLOSE is not set
-
-
-#
-# String and Stdio Support
-#
-# UCLIBC_HAS_STRING_GENERIC_OPT is not set
-# UCLIBC_HAS_STRING_ARCH_OPT is not set
-UCLIBC_HAS_CTYPE_TABLES=y
-UCLIBC_HAS_CTYPE_SIGNED=y
-# UCLIBC_HAS_CTYPE_UNSAFE is not set
-# UCLIBC_HAS_CTYPE_CHECKED is not set
-# UCLIBC_HAS_CTYPE_ENFORCED is not set
-# UCLIBC_HAS_WCHAR is not set
-# UCLIBC_HAS_LOCALE is not set
-UCLIBC_HAS_HEXADECIMAL_FLOATS=y
-UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
-# USE_OLD_VFPRINTF is not set
-UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
-UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
-# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
-UCLIBC_HAS_STDIO_BUFSIZ_4096=y
-# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
-UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
-# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
-# UCLIBC_HAS_STDIO_GETC_MACRO is not set
-# UCLIBC_HAS_STDIO_PUTC_MACRO is not set
-UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
-# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
-UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
-UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
-UCLIBC_HAS_PRINTF_M_SPEC=y
-UCLIBC_HAS_ERRNO_MESSAGES=y
-# UCLIBC_HAS_SYS_ERRLIST is not set
-UCLIBC_HAS_SIGNUM_MESSAGES=y
-# UCLIBC_HAS_SYS_SIGLIST is not set
-UCLIBC_HAS_GNU_GETOPT=y
-# UCLIBC_HAS_GNU_GETSUBOPT is not set
-
-#
-# Big and Tall
-#
-UCLIBC_HAS_REGEX=y
-# UCLIBC_HAS_REGEX_OLD is not set
-UCLIBC_HAS_FNMATCH=y
-# UCLIBC_HAS_FNMATCH_OLD is not set
-# UCLIBC_HAS_WORDEXP is not set
-UCLIBC_HAS_FTW=y
-UCLIBC_HAS_GLOB=y
-UCLIBC_HAS_GNU_GLOB=y
-
-#
-# Library Installation Options
-#
-SHARED_LIB_LOADER_PREFIX="/lib"
-RUNTIME_PREFIX="/"
-DEVEL_PREFIX="/usr/"
-
-#
-# Security options
-#
-# UCLIBC_BUILD_PIE is not set
-UCLIBC_HAS_ARC4RANDOM=y
-# HAVE_NO_SSP is not set
-# UCLIBC_HAS_SSP is not set
-UCLIBC_BUILD_RELRO=y
-UCLIBC_BUILD_NOW=y
-# UCLIBC_BUILD_NOEXECSTACK is not set
-
-#
-# uClibc development/debugging options
-#
-CROSS_COMPILER_PREFIX=""
-UCLIBC_EXTRA_CFLAGS=""
-# DODEBUG is not set
-# DODEBUG_PT is not set
-DOSTRIP=y
-# DOASSERTS is not set
-# SUPPORT_LD_DEBUG is not set
-# SUPPORT_LD_DEBUG_EARLY is not set
-# UCLIBC_MALLOC_DEBUGGING is not set
-WARNINGS="-Wall"
-# EXTRA_WARNINGS is not set
-# DOMULTI is not set
-# UCLIBC_MJN3_ONLY is not set
-
-# USE_BX is not set
-# CONFIG_GENERIC_ARM is not set
-# CONFIG_ARM610 is not set
-# CONFIG_ARM710 is not set
-# CONFIG_ARM7TDMI is not set
-# CONFIG_ARM720T is not set
-# CONFIG_ARM920T is not set
-# CONFIG_ARM922T is not set
-# CONFIG_ARM926T is not set
-# CONFIG_ARM10T is not set
-# CONFIG_ARM1136JF_S is not set
-# CONFIG_ARM1176JZ_S is not set
-# CONFIG_ARM1176JZF_S is not set
-# CONFIG_ARM_CORTEX_M3 is not set
-# CONFIG_ARM_CORTEX_M1 is not set
-# CONFIG_ARM_SA110 is not set
-# CONFIG_ARM_SA1100 is not set
-# CONFIG_ARM_XSCALE is not set
-# CONFIG_ARM_IWMMXT is not set
diff --git a/target/xtensa/uClibc.config b/target/xtensa/uClibc.config
deleted file mode 100644
index cd82fab..0000000
--- a/target/xtensa/uClibc.config
+++ /dev/null
@@ -1,190 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Thu Jan 10 00:46:51 2008
-#
-# TARGET_alpha is not set
-# TARGET_arm is not set
-# TARGET_avr32 is not set
-# TARGET_bfin is not set
-# TARGET_cris is not set
-# TARGET_e1 is not set
-# TARGET_frv is not set
-# TARGET_h8300 is not set
-# TARGET_hppa is not set
-# TARGET_i386 is not set
-# TARGET_i960 is not set
-# TARGET_ia64 is not set
-# TARGET_m68k is not set
-# TARGET_microblaze is not set
-# TARGET_mips is not set
-# TARGET_nios is not set
-# TARGET_nios2 is not set
-# TARGET_powerpc is not set
-# TARGET_sh is not set
-# TARGET_sh64 is not set
-# TARGET_sparc is not set
-# TARGET_v850 is not set
-# TARGET_vax is not set
-# TARGET_x86_64 is not set
-TARGET_xtensa=y
-
-#
-# Target Architecture Features and Options
-#
-TARGET_ARCH="xtensa"
-TARGET_SUBARCH=""
-
-#
-# Using ELF file format
-#
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
-UCLIBC_HAS_FLOATS=y
-UCLIBC_HAS_FPU=y
-DO_C99_MATH=y
-KERNEL_HEADERS="/usr/src/linux/include"
-HAVE_DOT_CONFIG=y
-
-#
-# General Library Settings
-#
-# HAVE_NO_PIC is not set
-DOPIC=y
-# HAVE_NO_SHARED is not set
-# ARCH_HAS_NO_LDSO is not set
-HAVE_SHARED=y
-# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
-LDSO_LDD_SUPPORT=y
-LDSO_CACHE_SUPPORT=y
-# LDSO_PRELOAD_FILE_SUPPORT is not set
-LDSO_BASE_FILENAME="ld.so"
-# UCLIBC_STATIC_LDCONFIG is not set
-# LDSO_RUNPATH is not set
-UCLIBC_CTOR_DTOR=y
-# HAS_NO_THREADS is not set
-UCLIBC_HAS_THREADS=y
-PTHREADS_DEBUG_SUPPORT=y
-LINUXTHREADS_OLD=y
-UCLIBC_HAS_LFS=y
-# MALLOC is not set
-# MALLOC_SIMPLE is not set
-MALLOC_STANDARD=y
-MALLOC_GLIBC_COMPAT=y
-UCLIBC_DYNAMIC_ATEXIT=y
-# COMPAT_ATEXIT is not set
-# UCLIBC_SUSV3_LEGACY is not set
-UCLIBC_SUSV3_LEGACY_MACROS=y
-UCLIBC_HAS_SHADOW=y
-UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
-UCLIBC_HAS___PROGNAME=y
-# UNIX98PTY_ONLY is not set
-ASSUME_DEVPTS=y
-UCLIBC_HAS_TM_EXTENSIONS=y
-UCLIBC_HAS_TZ_CACHING=y
-UCLIBC_HAS_TZ_FILE=y
-UCLIBC_HAS_TZ_FILE_READ_MANY=y
-UCLIBC_TZ_FILE_PATH="/etc/TZ"
-
-#
-# Advanced Library Settings
-#
-UCLIBC_PWD_BUFFER_SIZE=256
-UCLIBC_GRP_BUFFER_SIZE=256
-
-#
-# Networking Support
-#
-UCLIBC_HAS_IPV6=y
-UCLIBC_HAS_RPC=y
-UCLIBC_HAS_FULL_RPC=y
-UCLIBC_HAS_REENTRANT_RPC=y
-# UCLIBC_USE_NETLINK is not set
-# UCLIBC_HAS_BSD_RES_CLOSE is not set
-
-#
-# String and Stdio Support
-#
-UCLIBC_HAS_STRING_GENERIC_OPT=y
-UCLIBC_HAS_STRING_ARCH_OPT=y
-UCLIBC_HAS_CTYPE_TABLES=y
-UCLIBC_HAS_CTYPE_SIGNED=y
-# UCLIBC_HAS_CTYPE_UNSAFE is not set
-UCLIBC_HAS_CTYPE_CHECKED=y
-# UCLIBC_HAS_CTYPE_ENFORCED is not set
-# UCLIBC_HAS_WCHAR is not set
-# UCLIBC_HAS_LOCALE is not set
-UCLIBC_HAS_HEXADECIMAL_FLOATS=y
-UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
-# USE_OLD_VFPRINTF is not set
-UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
-UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
-# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
-UCLIBC_HAS_STDIO_BUFSIZ_4096=y
-# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
-UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
-# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
-UCLIBC_HAS_STDIO_GETC_MACRO=y
-UCLIBC_HAS_STDIO_PUTC_MACRO=y
-UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
-# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
-UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
-UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
-UCLIBC_HAS_PRINTF_M_SPEC=y
-UCLIBC_HAS_ERRNO_MESSAGES=y
-# UCLIBC_HAS_SYS_ERRLIST is not set
-UCLIBC_HAS_SIGNUM_MESSAGES=y
-# UCLIBC_HAS_SYS_SIGLIST is not set
-UCLIBC_HAS_GNU_GETOPT=y
-UCLIBC_HAS_GNU_GETSUBOPT=y
-
-#
-# Big and Tall
-#
-UCLIBC_HAS_REGEX=y
-UCLIBC_HAS_REGEX_OLD=y
-UCLIBC_HAS_FNMATCH=y
-UCLIBC_HAS_FNMATCH_OLD=y
-# UCLIBC_HAS_WORDEXP is not set
-UCLIBC_HAS_FTW=y
-UCLIBC_HAS_GLOB=y
-UCLIBC_HAS_GNU_GLOB=y
-
-#
-# Library Installation Options
-#
-SHARED_LIB_LOADER_PREFIX="/lib"
-RUNTIME_PREFIX="/"
-DEVEL_PREFIX="/usr/"
-
-#
-# Security options
-#
-# UCLIBC_HAS_ARC4RANDOM is not set
-# HAVE_NO_SSP is not set
-# UCLIBC_HAS_SSP is not set
-UCLIBC_BUILD_RELRO=y
-UCLIBC_BUILD_NOW=y
-# UCLIBC_BUILD_NOEXECSTACK is not set
-
-#
-# uClibc development/debugging options
-#
-CROSS_COMPILER_PREFIX=""
-UCLIBC_EXTRA_CFLAGS=""
-# DODEBUG is not set
-# DOSTRIP is not set
-# DODEBUG_PT is not set
-# DOASSERTS is not set
-SUPPORT_LD_DEBUG=y
-# SUPPORT_LD_DEBUG_EARLY is not set
-# UCLIBC_MALLOC_DEBUGGING is not set
-WARNINGS="-Wall"
-EXTRA_WARNINGS=y
-# DOMULTI is not set
-# UCLIBC_MJN3_ONLY is not set
diff --git a/target/xtensa/xt-buildroot-overlay-install b/target/xtensa/xt-buildroot-overlay-install
deleted file mode 100644
index d2afce1..0000000
--- a/target/xtensa/xt-buildroot-overlay-install
+++ /dev/null
@@ -1,488 +0,0 @@
-#!/bin/sh
-#  Not every host installs perl at the same location, handle many locations:
-PATH=/usr/bin:/usr/local/bin:$PATH
-exec perl -x -S $0 ${1+"$@"}
-exit $?
-#!perl -w
-#line 8
-
-#  xt-buildroot-overlay-install [-t overlay_tarball] [-b buildroot_dir] \
-#				[-k kernel_dir] \
-#				[-c config_name] [-l long_name] [-f] [--help]
-#
-#  Creates individual overlay tarballs for gcc, binutils, gdb, and
-#  the Linux kernel, out of the Xtensa Configuration Overlay tarball from
-#  a Tensilica Core Package.  And installs these individual tarballs
-#  at the appropriate locations within a buildroot source tree.
-#
-#  The Xtensa configuration overlay tarball is located in:
-#	<xtensa_root>/src/xtensa-config-overlay.tar.gz
-#  where <xtensa_root> is the path to the Tensilica Core Package.
-#
-# Copyright (c) 2003-2009 by Tensilica Inc.
-#  History:
-#  2007-NOV-08	1.0	meg	Initial version
-#  2007-NOV-21	1.1	meg	Add -k parameter
-#  2007-DEC-06	1.2	meg	Make -k and -b optional, check overlay sw vers.
-#  2008-FEB-27	1.3	meg	Accept Xtensa Tools RB-2008.3 overlays
-
-$progvers = "1.3";
-$progname = $0;
-$progname =~ s|.*[/\\:]||;
-
-
-######################################################################
-#
-#  Parse cmdline
-#
-
-my $overlay_tarball = undef;
-my $buildroot_dir = undef;
-my $kernel_dir = undef;
-my $config_name = undef;
-my $config_long_name = undef;
-my $force_clobber = 0;
-my $prompt = 1;		# undocumented option
-
-sub usage {
-    print "$progname version $progvers\n"
-    	 ."Usage:  $progname <parameters> [<options>]\n"
-	 ."Where <parameters> are:\n"
-	 ."  -t file.tgz     Specify path to the Xtensa Linux overlay tarball, typically\n"
-	 ."                  <xtensa_root>/src/xtensa-config-overlay.tar.gz\n"
-	 ."  -b dir          Path to the base of the buildroot source tree, in which\n"
-	 ."                  package specific overlay tarballs get installed.\n"
-	 ."  -k dir          Path to the base of the Linux kernel source tree, in which\n"
-	 ."                  the Linux kernel specific overlay gets installed.\n"
-	 ."  -c config_name  Name for the Xtensa processor configuration as it will be\n"
-	 ."                  known to the open source community.  Must be a lowercase\n"
-	 ."                  identifier, starting with a letter, consisting of letters\n"
-	 ."                  and numbers and underscores, not ending with underscore\n"
-	 ."                  and not containing consecutive underscores.  For examples:\n"
-	 ."                     dc232b , dc232b_be , mmubasele , fsf , s5000 .\n"
-	 ."  -l long_name    Long name for the Xtensa processor configuration, human-\n"
-	 ."                  readable with spaces etc allowed (must be quoted).\n"
-	 ."                  For example:  'Diamond 232L Standard Core Rev.B (LE)'\n"
-	 ."                  Try to keep it within approximately 40 characters.\n"
-	 ."And <options> are:\n"
-	 ."  -f              If package specific overlay tarballs already exist in\n"
-	 ."                  the destination source tree, overwrite them without asking.\n"
-	 ."  --help          Show this usage message.\n";
-}
-
-#  Get arguments:
-if (!@ARGV) {
-    usage();
-    exit 0;
-}
-while( defined($_ = shift) ) {
-    if( /^-[tbclk]$/ ) {		# option taking an argument
-	my $arg = shift;
-	if( !defined($arg) ) {
-	    print STDERR "$progname: ERROR: missing parameter after '$_' option\n\n";
-	    usage();
-	    exit 1;
-	}
-	$overlay_tarball = $arg if $_ eq "-t";
-	$buildroot_dir = $arg if $_ eq "-b";
-	$kernel_dir = $arg if $_ eq "-k";
-	$config_name = $arg if $_ eq "-c";
-	$config_long_name = $arg if $_ eq "-l";
-	next;
-    }
-    if( /^-f$/ ) {
-	$force_clobber = 1;
-	next;
-    }
-    if( /^--[m-t]{8}$/ && /[new]([wow])([pup])[fur]\1[maze]\2[tuff]/ ) {
-	$prompt = 0;
-	next;
-    }
-    if( /^-(h|help|\-h|\-help|\?)$/i ) {
-	usage();
-	exit 0;
-    }
-    print STDERR "$progname: ERROR: unrecognized option or argument '$_'\n\n";
-    usage();
-    exit 1;
-}
-
-
-######################################################################
-#
-#  Validate cmdline arguments
-#
-
-ErrorU("missing -c argument (core name)")
-	unless defined($config_name);
-#  Try to enforce reasonable names:
-ErrorU("-c: malformed core name '$config_name' (must be lowercase, letter followed by letters/digits, may contain underscore separators)")
-	unless $config_name =~ /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
-ErrorU("-c: core name too short '$config_name'")
-	unless length($config_name) >= 2;
-ErrorU("-c: core name too long '$config_name'")
-	unless length($config_name) <= 16;
-
-
-ErrorU("missing -l argument (core long name)")
-	unless defined($config_long_name);
-$config_long_name =~ s/^\s+//;	# trim extra whitespace...
-$config_long_name =~ s/\s+$//;
-$config_long_name =~ s/\s+/ /g;
-#  Try to enforce reasonable names:
-ErrorU("-l: invalid (non-ASCII-printable) characters in core long name '$config_long_name'")
-	unless $config_long_name =~ /^[\x20-\x7E]+$/;
-ErrorU("-l: disallowed characters (\"\'\\) in core long name '$config_long_name'")
-	if $config_long_name =~ /[\'\"\\]/;
-ErrorU("-l: core long name too short '$config_long_name'")
-	unless length($config_long_name) >= 5;
-ErrorU("-l: core long name too long '$config_long_name'")
-	unless length($config_long_name) <= 60;
-
-
-#ErrorU("missing -b argument (buildroot source tree directory)")
-#	unless defined($buildroot_dir);
-if (defined($buildroot_dir)) {
-    ErrorU("-b: not a directory: $buildroot_dir")
-	    unless -d $buildroot_dir;
-    foreach my $p ("toolchain/gcc", "toolchain/binutils", "toolchain/gdb", "target/xtensa") {
-	ErrorU("-b: not a buildroot directory: missing $buildroot_dir/$p")
-	    unless -d $buildroot_dir . "/" . $p;
-    }
-}
-
-
-#ErrorU("missing -k argument (Linux kernel source tree directory)")
-#	unless defined($kernel_dir);
-if (defined($kernel_dir)) {
-    ErrorU("-k: not a directory: $kernel_dir")
-	    unless -d $kernel_dir;
-    foreach my $p ("kernel", "arch/xtensa/kernel", "include/asm-xtensa") {
-	ErrorU("-k: not a Linux kernel directory: missing $kernel_dir/$p")
-	    unless -d $kernel_dir . "/" . $p;
-    }
-}
-
-
-if (!defined($buildroot_dir) and !defined($kernel_dir)) {
-    print STDERR "$progname: WARNING:\n";
-    print STDERR "$progname: WARNING: Test run only, NOTHING WILL BE INSTALLED\n";
-    print STDERR "$progname: WARNING: (use -b and -k to specify install destination)\n";
-    print STDERR "$progname: WARNING:\n";
-}
-
-
-my @ovpaths = ( "/src/xtensa-config-overlay.tar.gz",
-		"/xtensa-elf/src/linux/misc/linux-overlay.tar.gz" );
-if (!defined($overlay_tarball)) {
-    #  Try to locate the overlay tarball based on XTENSA_SYSTEM and XTENSA_CORE
-    #  settings:
-    my $xtensa_root = `xt-xcc --show-config=config 2>/dev/null`;
-    $xtensa_root = "" unless defined($xtensa_root);
-    chomp($xtensa_root);
-    if ($xtensa_root ne "") {
-	($overlay_tarball) = grep(-f $xtensa_root.$_, @ovpaths);
-	if (!defined($overlay_tarball)) {
-	    ErrorU("Xtensa configuration overlay tarball not found: ".$xtensa_root.$ovpaths[0])
-	}
-    } else {
-	ErrorU("missing -t argument (Xtensa configuration overlay tarball filename)\n"
-	     ."and no default Xtensa Core Package defined in the environment");
-    }
-} else {
-    foreach my $p ("", @ovpaths) {
-	if (-f $overlay_tarball.$p) {
-	    $overlay_tarball .= $p;
-	    last;
-	}
-    }
-    ErrorU("-t: file not found: $overlay_tarball") unless -f $overlay_tarball;
-}
-
-
-######################################################################
-#
-#  Misc
-#
-
-my $overlay_unpacked = 0;
-my $ovdir;
-
-sub cleanup {
-    if ($overlay_unpacked) {
-	system("rm -rf '$ovdir' 2>/dev/null");
-    }
-}
-
-sub ErrorEmit {
-    my ($msg,$usage) = @_;
-    $msg =~ s|\n|"\n${progname}: ERROR: "|ge;
-    print STDERR "$progname: ERROR: $msg\n";
-    if ($usage) {
-	print "\n";
-	usage();
-    }
-    cleanup();
-    exit 1;
-}
-sub ErrorU { ErrorEmit(shift,1); }
-sub Error  { ErrorEmit(shift); }
-
-
-#  Read specified file (as binary), returning contents.
-#
-sub readfile {
-    my ($filename) = @_;
-    #  Read the file:
-    open(INFILE,"<$filename") or Error("error reading from '$filename': $!");
-    my $savesep = $/;
-    undef $/;
-    my $file = <INFILE>;
-    $/ = $savesep;
-    close(INFILE);
-    $file;
-}                                                                                                       
-
-#  Write specified file (as binary) with first argument (string).
-#
-sub writefile {
-    my ($filename, $file) = @_;
-    #  Read the file:
-    open(INFILE,">$filename") or Error("error writing to '$filename': $!");
-    print INFILE $file;
-    close(INFILE) or Error("error closing file '$filename': $!");
-}                                                                                                       
-
-
-######################################################################
-#
-#  Determine a temporary directory.
-#
-
-my $tmpdir = "/tmp";
-if (defined($ENV{"TMP"}) and -d $ENV{"TMP"}) {
-    $tmpdir = $ENV{"TMP"};
-} elsif (defined($ENV{"TEMP"}) and -d $ENV{"TEMP"}) {
-    $tmpdir = $ENV{"TEMP"};
-}
-
-
-######################################################################
-#
-#  Unpack the general overlay tarball
-#
-
-my $user = defined($ENV{"USER"}) ? $ENV{"USER"} : "xtensa";
-$ovdir = $tmpdir."/tmp-overlay-${user}-$$";
-mkdir $ovdir or Error("cannot create directory $ovdir");
-$overlay_unpacked = 1;
-system("tar xfz '$overlay_tarball' -C '$ovdir'")
-	and Error("tar failed...");
-
-
-######################################################################
-#
-#  Define and sanity check contents of overlay
-#
-
-my $oldpack = -f $ovdir."/xtensa-elf/src/linux/misc/core.h";
-my $pf1 = ($oldpack ? "src/" : "");
-my $pf2 = ($oldpack ? "xtensa-elf/src/linux/misc/" : "config/");
-
-my @packages = (
-	["binutils", "toolchain/binutils",
-		["${pf1}/binutils/xtensa-modules.c",	"bfd/"],
-		["${pf1}/binutils/xtensa-config.h",	"include/"],
-		#["${pf1}/binutils/xtensa-config.sh",	"ld/emulparams/"],
-		],
-	["gcc", "toolchain/gcc",
-		["${pf1}/gcc/xtensa-config.h",	"include/"],
-		],
-	["gdb", "toolchain/gdb",
-		["${pf1}/gdb/xtensa-modules.c",	"bfd/"],
-		["${pf1}/gdb/xtensa-config.h",	"include/"],
-		["${pf1}/gdb/xtensa-config.c",	"gdb/"],
-		["${pf1}/gdb/xtensa-regmap.c",	"gdb/gdbserver/"],
-		["${pf1}/gdb/xtensa-regmap.c",	"gdb/gdbserver/xtensa-xtregs.c"],	# for GDB 6.8
-		["${pf1}/gdb/xtensa-regmap.c",	"gdb/xtensa-xtregs.c"],			# for GDB 6.8
-		["${pf1}/gdb/reg-xtensa.dat",	"gdb/regformats/"],
-		],
-	["kernel", "target/xtensa",		# ???
-		["${pf2}core.h",	"include/asm-xtensa/variant-${config_name}/"],
-		["${pf2}tie.h",		"include/asm-xtensa/variant-${config_name}/"],
-		["${pf2}tie-asm.h",	"include/asm-xtensa/variant-${config_name}/"],
-		],
-);
-
-#  Check that all files are present ...
-foreach my $pack (@packages) {
-    my ($pname, $buildroot_subdir, @files) = @$pack;
-    print "Checking files for $pname ...\n";
-    foreach my $f (@files) {
-	my ($src, $dst) = @$f;
-	-f $ovdir."/".$src or Error("missing '$src' in overlay tarball");
-    }
-}
-
-
-######################################################################
-#
-#  Extract some useful information
-#
-
-#  Extract core name as specified in the build.
-my $coreh = readfile($ovdir."/".$pf2."core.h");
-
-$coreh =~ /^\s*\#\s*define\s+XCHAL_SW_VERSION\s+(\w+)/m;
-my $swversion = $1;
-defined($swversion) or Error("missing XCHAL_SW_VERSION in overlay core.h file;\n"
-	."overlay is too old, need RB-2008.3 (SW version 7.1.1) or later");
-
-$coreh =~ /^\s*\#\s*define\s+XCHAL_CORE_ID\s+"([^"]+)"/m;
-my $coreid = $1;
-defined($coreid) or Error("missing XCHAL_CORE_ID in overlay core.h file");
-
-$coreh =~ /^\s*\#\s*define\s+XCHAL_HW_VERSION_NAME\s+"([^"]+)"/m;
-my $hwversion = $1;
-defined($hwversion) or Error("missing XCHAL_HW_VERSION_NAME in overlay core.h file");
-
-
-$swvers_human = sprintf("%u.%u.%u",
-	$swversion/100000, (($swversion/1000) % 100), ($swversion % 1000));
-my $release = "software version $swvers_human";
-if (-f $ovdir."/release") {
-    $release = readfile($ovdir."/release");
-    chomp($release);
-}
-
-
-######################################################################
-#
-#  Prompt user to be sure this is what he wants to do
-#
-
-#  Catch Ctrl-C so we can do a proper cleanup:
-sub catch_term {
-    my $signame = shift;
-    #print STDERR "whoa!\n";
-    cleanup();
-    print STDERR "\n$progname: Cleaned up.\n";
-    exit 3;
-}
-$SIG{TERM} = \&catch_term;
-$SIG{HUP} = \&catch_term;
-$SIG{INT} = \&catch_term;
-
-$| = 1;
-print	"\n",
-	"About to generate package-specific overlay tarballs for the following:\n",
-	"\n",
-	"   Xtensa processor short name:   $config_name\n";
-print	"      This short name overrides the name specified in the XPG:  $coreid\n" if $coreid ne $config_name;
-#print	"      Please ensure that's the name you want.  If submitted to the open source\n",
-#	"      community, it can be a hassle to change later on.\n";
-print	"   Xtensa processor description:  $config_long_name\n",
-	"   Targeting Xtensa HW version:   $hwversion\n",
-	"   Xtensa configuration overlay:  $overlay_tarball\n",
-	"           (release of overlay):  $release\n",
-	"   Destination buildroot dir:     ".(defined($buildroot_dir)?$buildroot_dir:"(none, not installed)")."\n",
-	"   Destination Linux kernel dir:  ".(defined($kernel_dir)?$kernel_dir:"(none, not installed)")."\n",
-	"\n",
-	"Are you sure? (y/n) ";
-if ($prompt) {
-    my $line = <STDIN>;
-    chomp($line);
-    if ($line !~ /^y(es)?$/i) {
-	print "\nInstallation aborted.\n";
-	cleanup();
-	exit 2;
-    }
-} else {
-    print "YES [no prompt]\n";
-}
-print "\n";
-
-
-######################################################################
-#
-#  Now generate the tarballs
-#
-
-#  Now generate each tarball ...
-foreach my $pack (@packages) {
-    my ($pname, $buildroot_subdir, @files) = @$pack;
-    my $tarname = "${pname}-xtensa_${config_name}.tgz";
-    my $fulltarname;
-    if (defined($buildroot_dir)) {
-	my $tarsubname = $buildroot_subdir . "/" . $tarname;
-	print "Generating and installing $tarsubname ...\n";
-	$fulltarname = $buildroot_dir . "/" . $tarsubname;
-    } else {
-	print "Generating $tarname ...\n";
-	$fulltarname = $ovdir . "/" . $tarname;
-    }
-    if (-e $fulltarname) {
-	if ($force_clobber or !defined($buildroot_dir)) {
-	    unlink($fulltarname) or Error("could not delete '$fulltarname': $!");
-	} else {
-	    Error("destination tarball already exists: '$fulltarname'");
-	}
-    }
-    my $pdir = $ovdir."/tmp-".$pname;
-    system("rm -fr '${pdir}' 2>/dev/null");
-    mkdir $pdir or Error("cannot create directory $pdir");
-    foreach my $f (@files) {
-	my ($src, $dst) = @$f;
-	#  If $dst ends in / , take filename from $src :
-	if ($dst =~ m|/$|) {
-	    my $fname = $src;
-	    $fname =~ s|^.*/||;
-	    $dst .= $fname;
-	}
-	#  Ensure destination directory exists:
-	my $dstdir = $pdir;
-	while ($dst =~ s|^([^/]+)/+||) {
-	    $dstdir .= "/" . $1;
-	    mkdir($dstdir);
-	}
-	#  Read file:
-	my $content = readfile($ovdir."/".$src);
-
-	#  Adjust contents of file.
-	#  Fix-up typo:
-	$content =~ s/XCHAL_SA_(NCP|CP\d+)_/XCHAL_$1_SA_/g;
-	#  Update core name info:
-	my $iscore = ($content =~ s/^(\s*\#\s*define\s+XCHAL_CORE_ID\s+)"[^"]+"/$1"$config_name"/mg);
-	$iscore or $content =~ s{^(\s*\#\s*define\s+XCHAL_INST_FETCH_WIDTH\s+\S+\s*(/\*[^\*]*\*/)?\s*$)}
-				{$1\n\#undef XCHAL_CORE_ID\n\#define XCHAL_CORE_ID\t\t\t"$config_name"\n}smg;
-	#  Update core description info:
-	$content =~ s/^(\s*\#\s*define\s+XCHAL_CORE_DESCRIPTION\s+)"[^"]+"/$1"$config_long_name"/mg
-	  or $content =~ s{^(\s*\#\s*define\s+XCHAL_CORE_ID\s+\S+\s*(/\*[^\*]*\*/)?\s*$)}
-			  {"$1\n" . ($iscore ? "" : "\n\#undef XCHAL_CORE_DESCRIPTION\n")
-			   . "\#define XCHAL_CORE_DESCRIPTION\t\t\"${config_long_name}\""}smge;
-
-	#  Write (possibly modified) file:
-	writefile($dstdir."/".$dst, $content);
-    }
-    my $tarcmd = "tar cfz '${fulltarname}' -C '${pdir}' .";
-    system($tarcmd) and Error("failed executing: $tarcmd");
-
-    #  Install Linux kernel overlay:
-    if ($pname eq "kernel" and defined($kernel_dir)) {
-	print "Installing Linux kernel overlay from $tarname ...\n";
-	my $untarcmd = "tar xfz '${fulltarname}' -C '${kernel_dir}' .";
-	system($untarcmd) and Error("failed executing: $tarcmd");
-    }
-    #  Possible TODO:  update arch/xtensa/{Kconfig,Makefile} to add this config?
-}
-
-
-######################################################################
-#
-# The End
-#
-
-cleanup();
-print "Done.\n";
-exit 0;
-
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index a4faf4f..06e4f67 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -33,11 +33,6 @@ else
  GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION)
 endif
 
-ifneq ($(filter xtensa%,$(ARCH)),)
-include target/xtensa/patch.in
-GCC_PATCH_EXTRA:=$(call XTENSA_PATCH,gcc,$(GCC_PATCH_DIR),. ..)
-endif
-
 GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2
 GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION)
 GCC_DIR:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)
diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index b5c085b..b8f49e5 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -16,11 +16,6 @@ else
  GDB_PATCH_DIR:=toolchain/gdb/$(GDB_VERSION)
 endif
 
-ifneq ($(filter xtensa%,$(ARCH)),)
-include target/xtensa/patch.in
-GDB_PATCH_EXTRA:=$(call XTENSA_PATCH,gdb,$(GDB_PATCH_DIR),. ..)
-endif
-
 GDB_DIR:=$(TOOLCHAIN_DIR)/gdb-$(GDB_VERSION)
 
 $(DL_DIR)/$(GDB_SOURCE):
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index fb87a88..3c3fd0d 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -75,7 +75,7 @@ config BR2_NEEDS_GETTEXT_IF_LOCALE
 	default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
 
 config BR2_USE_MMU
-	bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_sh || BR2_xtensa
+	bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_sh
 	default y if !BR2_bfin
 	help
 	  If your target has a MMU, you should say Y here.  If you
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 02/22] Remove cc-option: not used anywhere
  2012-04-17 14:45 ` [Buildroot] [PATCH 02/22] Remove cc-option: not used anywhere Thomas Petazzoni
@ 2012-04-19 13:54   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 13:54 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 03/22] Remove filename extension crap for OS compatibility
  2012-04-17 14:45 ` [Buildroot] [PATCH 03/22] Remove filename extension crap for OS compatibility Thomas Petazzoni
@ 2012-04-19 14:03   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 14:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The only variable that is used is HOST_LOADLIBES, defined for the
 Thomas> cygwin case in the kconfig build. Since we don't support cygwin,
 Thomas> simply get rid of this.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 04/22] kconfig: do not use HOST_LOADLIBES anymore
  2012-04-17 14:45 ` [Buildroot] [PATCH 04/22] kconfig: do not use HOST_LOADLIBES anymore Thomas Petazzoni
@ 2012-04-19 14:05   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 14:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 06/22] Rename Makefile.cmake.in to pkg-cmaketargets.mk
  2012-04-17 14:45 ` [Buildroot] [PATCH 06/22] Rename Makefile.cmake.in to pkg-cmaketargets.mk Thomas Petazzoni
@ 2012-04-19 14:06   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 14:06 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 07/22] Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk
  2012-04-17 14:45 ` [Buildroot] [PATCH 07/22] Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk Thomas Petazzoni
@ 2012-04-19 14:07   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 14:07 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 05/22] Rename Makefile.autotools.in to pkg-autotargets.mk
  2012-04-17 14:45 ` [Buildroot] [PATCH 05/22] Rename Makefile.autotools.in to pkg-autotargets.mk Thomas Petazzoni
@ 2012-04-19 14:08   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 14:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 08/22] pkg-*.mk: add some comments, update some existing comments
  2012-04-17 14:45 ` [Buildroot] [PATCH 08/22] pkg-*.mk: add some comments, update some existing comments Thomas Petazzoni
@ 2012-04-19 14:08   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 14:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 09/22] Remove unused .fakeroot.* mechanism
  2012-04-17 14:45 ` [Buildroot] [PATCH 09/22] Remove unused .fakeroot.* mechanism Thomas Petazzoni
@ 2012-04-19 14:09   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 14:09 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> There used to be a mechanism using which packages could leave a
 Thomas> .fakeroot.<something> file which could contain commands to be executed
 Thomas> within the fakeroot environment. Since this mechanism is no longer
 Thomas> used by any package, remove it from the common infrastructure.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 10/22] Move the manual build infrastructure to docs/manual/manual.mk
  2012-04-17 14:45 ` [Buildroot] [PATCH 10/22] Move the manual build infrastructure to docs/manual/manual.mk Thomas Petazzoni
@ 2012-04-19 22:01   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 22:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 11/22] cmake: move creation of toolchain file to package/pkg-cmaketargets.mk
  2012-04-17 14:45 ` [Buildroot] [PATCH 11/22] cmake: move creation of toolchain file to package/pkg-cmaketargets.mk Thomas Petazzoni
@ 2012-04-19 22:01   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-19 22:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> This also requires moving a few include directives below the "all:"
 Thomas> target in the main Makefile, otherwise the new target to create the
 Thomas> toolchain file in pkg-cmaketargets.mk gets used as the default make
 Thomas> target instead of "all:".

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 01/22] Remove the DATE variable
  2012-04-17 14:45 ` [Buildroot] [PATCH 01/22] Remove the DATE variable Thomas Petazzoni
@ 2012-04-21 13:05   ` Arnout Vandecappelle
  2012-04-22  8:23     ` Peter Korsgaard
  0 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2012-04-21 13:05 UTC (permalink / raw)
  To: buildroot

On Tuesday 17 April 2012 16:45:13 Thomas Petazzoni wrote:
> This variable was only used by uboot.mk to add a #define DATE into the
> U-Boot .h configuration file. But such a definition does not seem to
> be used by the mainline U-Boot, so there's no reason to keep it.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 This patch could be considered risky, because the DATE thing may be used
by some custom U-Boot source.  But then, the only way to find out if it is
is to commit it and see if anyone complains :-)

 Regards,
 Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 01/22] Remove the DATE variable
  2012-04-21 13:05   ` Arnout Vandecappelle
@ 2012-04-22  8:23     ` Peter Korsgaard
  2012-04-22 15:32       ` Thomas Petazzoni
  0 siblings, 1 reply; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-22  8:23 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 Arnout> On Tuesday 17 April 2012 16:45:13 Thomas Petazzoni wrote:
 >> This variable was only used by uboot.mk to add a #define DATE into the
 >> U-Boot .h configuration file. But such a definition does not seem to
 >> be used by the mainline U-Boot, so there's no reason to keep it.
 >> 
 >> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

 Arnout> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Arnout>  This patch could be considered risky, because the DATE thing
 Arnout> may be used by some custom U-Boot source.  But then, the only
 Arnout> way to find out if it is is to commit it and see if anyone
 Arnout> complains :-)

I know we have been (are?) using it at work to add some info about the
build date and name some files with the date.

Chances are others might have been doing the same, so I'm hessitating
about removing it (which is why I didn't commit it right away). It
doesn't really cost us much to keep it (single line).

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 01/22] Remove the DATE variable
  2012-04-22  8:23     ` Peter Korsgaard
@ 2012-04-22 15:32       ` Thomas Petazzoni
  2012-04-22 19:55         ` Peter Korsgaard
  0 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-22 15:32 UTC (permalink / raw)
  To: buildroot

Le Sun, 22 Apr 2012 10:23:15 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> I know we have been (are?) using it at work to add some info about the
> build date and name some files with the date.
> 
> Chances are others might have been doing the same, so I'm hessitating
> about removing it (which is why I didn't commit it right away). It
> doesn't really cost us much to keep it (single line).

Well, it's just that I don't very much like to have unused variables
here and there. One way to make it useful is for example to store the
build date into some file in the target filesystem.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 01/22] Remove the DATE variable
  2012-04-22 15:32       ` Thomas Petazzoni
@ 2012-04-22 19:55         ` Peter Korsgaard
  2012-04-24  7:43           ` Thomas De Schampheleire
  0 siblings, 1 reply; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-22 19:55 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> Well, it's just that I don't very much like to have unused
 Thomas> variables here and there. One way to make it useful is for
 Thomas> example to store the build date into some file in the target
 Thomas> filesystem.

True. We could perhaps add it to /etc/os-release?

http://www.freedesktop.org/software/systemd/man/os-release.html

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 01/22] Remove the DATE variable
  2012-04-22 19:55         ` Peter Korsgaard
@ 2012-04-24  7:43           ` Thomas De Schampheleire
  2012-04-24  8:31             ` Peter Korsgaard
  0 siblings, 1 reply; 55+ messages in thread
From: Thomas De Schampheleire @ 2012-04-24  7:43 UTC (permalink / raw)
  To: buildroot

On Sun, Apr 22, 2012 at 9:55 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
> Hi,
>
> ?Thomas> Well, it's just that I don't very much like to have unused
> ?Thomas> variables here and there. One way to make it useful is for
> ?Thomas> example to store the build date into some file in the target
> ?Thomas> filesystem.
>
> True. We could perhaps add it to /etc/os-release?
>
> http://www.freedesktop.org/software/systemd/man/os-release.html
>

A disadvantage of adding changing variables like DATE is that two
builds that are built from the exact same set of sources, are not
binary equal. You cannot simply compare the rootfs image and expect no
differences.
You'd have to unpack the rootfs and compare file by file, leaving out
files like /etc/os-release that would contain a date.

I haven't yet looked at which binaries inside a typical rootfs do
contain such changing variables, but I will do that for my
configuration in the near future. My intention is to ensure binary
equality for the entire rootfs.

With this in mind, I would not favor adding a DATE of some kind to a
file in buildroot just to mark a variable as used, unless we provide a
way to override DATE in the config file (in the Linux kernel, the
'user' and 'machine' etc. build variables are also overridable.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 01/22] Remove the DATE variable
  2012-04-24  7:43           ` Thomas De Schampheleire
@ 2012-04-24  8:31             ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-24  8:31 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:

Hi,

 Thomas> A disadvantage of adding changing variables like DATE is that
 Thomas> two builds that are built from the exact same set of sources,
 Thomas> are not binary equal. You cannot simply compare the rootfs
 Thomas> image and expect no differences.  You'd have to unpack the
 Thomas> rootfs and compare file by file, leaving out files like
 Thomas> /etc/os-release that would contain a date.

 Thomas> I haven't yet looked at which binaries inside a typical rootfs do
 Thomas> contain such changing variables, but I will do that for my
 Thomas> configuration in the near future. My intention is to ensure binary
 Thomas> equality for the entire rootfs.

I think you'll find that this is quite common. From the top of my head I
know that atleast the Linux kernel and busybox adds the build time to
the binary, so I doubt this will really work.

 Thomas> With this in mind, I would not favor adding a DATE of some kind
 Thomas> to a file in buildroot just to mark a variable as used, unless
 Thomas> we provide a way to override DATE in the config file (in the
 Thomas> Linux kernel, the 'user' and 'machine' etc. build variables are
 Thomas> also overridable.

You can always build with make DATE=foo

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 12/22] package: remove unused STRIP_DISCARD_ALL variable
  2012-04-17 14:45 ` [Buildroot] [PATCH 12/22] package: remove unused STRIP_DISCARD_ALL variable Thomas Petazzoni
@ 2012-04-24 22:03   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-24 22:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 13/22] Remove unused GNU_TARGET_SUFFIX
  2012-04-17 14:45 ` [Buildroot] [PATCH 13/22] Remove unused GNU_TARGET_SUFFIX Thomas Petazzoni
@ 2012-04-25  6:55   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  6:55 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 14/22] toolchain: remove useless indirect variables
  2012-04-17 14:45 ` [Buildroot] [PATCH 14/22] toolchain: remove useless indirect variables Thomas Petazzoni
@ 2012-04-25  6:56   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  6:56 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The BR2_CONFIGURE_DEVEL_SYSROOT, BR2_CONFIGURE_STAGING_SYSROOT and
 Thomas> BR2_CONFIGURE_BUILD_TOOLS were used only in a few places, and it is in
 Thomas> fact clearer to just use their value in the various places they are
 Thomas> used.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 15/22] gcc: remove unused EXTRA_GCC2_CONFIG_OPTIONS
  2012-04-17 14:45 ` [Buildroot] [PATCH 15/22] gcc: remove unused EXTRA_GCC2_CONFIG_OPTIONS Thomas Petazzoni
@ 2012-04-25  6:58   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  6:58 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 16/22] gcc: remove unused EXTRA_GCC4_CONFIG_OPTIONS
  2012-04-17 14:45 ` [Buildroot] [PATCH 16/22] gcc: remove unused EXTRA_GCC4_CONFIG_OPTIONS Thomas Petazzoni
@ 2012-04-25  6:59   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  6:59 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 17/22] gcc: remove unused ARCH_FPU_SUFFIX
  2012-04-17 14:45 ` [Buildroot] [PATCH 17/22] gcc: remove unused ARCH_FPU_SUFFIX Thomas Petazzoni
@ 2012-04-25  7:00   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  7:00 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 18/22] gcc: move version/snap variables to gcc-uclibc-4.x.mk
  2012-04-17 14:45 ` [Buildroot] [PATCH 18/22] gcc: move version/snap variables to gcc-uclibc-4.x.mk Thomas Petazzoni
@ 2012-04-25  7:01   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  7:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 19/22] toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in
  2012-04-17 14:45 ` [Buildroot] [PATCH 19/22] toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in Thomas Petazzoni
@ 2012-04-25  7:47   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  7:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Re-integrate in gcc-uclibc-4.x.mk things from
 Thomas> toolchain/gcc/Makefile.in that were completely gcc-specific. There was
 Thomas> no reason to pull that when building with other backends than the
 Thomas> internal one.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 20/22] gcc: remove unused EXTRA_GCC1_CONFIG_OPTIONS
  2012-04-17 14:45 ` [Buildroot] [PATCH 20/22] gcc: remove unused EXTRA_GCC1_CONFIG_OPTIONS Thomas Petazzoni
@ 2012-04-25  7:47   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  7:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 21/22] mklibs: remove support
  2012-04-17 14:45 ` [Buildroot] [PATCH 21/22] mklibs: remove support Thomas Petazzoni
@ 2012-04-25  7:56   ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  7:56 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The support for mklibs has been marked broken since more than a
 Thomas> year and nobody cared to bring it up to a working state.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture
  2012-04-17 14:45 ` [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture Thomas Petazzoni
@ 2012-04-25  8:44   ` Peter Korsgaard
  2012-04-25  9:09     ` Thomas Petazzoni
  0 siblings, 1 reply; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  8:44 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The support for Xtensa has been added in July 2009, and no updates
 Thomas> have ever been done to it, and it requires some special handling, in
 Thomas> gcc/gdb, has some special Perl scripts, etc.

As discussed on IRC, I would prefer to simply mark Xtensa as deprecated
for now, and then remove in the next cycle if nothing happens.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture
  2012-04-25  8:44   ` Peter Korsgaard
@ 2012-04-25  9:09     ` Thomas Petazzoni
  2012-04-25  9:21       ` Peter Korsgaard
  2012-04-26  4:55       ` Marc Gauthier
  0 siblings, 2 replies; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-25  9:09 UTC (permalink / raw)
  To: buildroot

Le Wed, 25 Apr 2012 10:44:38 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 
>  Thomas> The support for Xtensa has been added in July 2009, and no updates
>  Thomas> have ever been done to it, and it requires some special handling, in
>  Thomas> gcc/gdb, has some special Perl scripts, etc.
> 
> As discussed on IRC, I would prefer to simply mark Xtensa as deprecated
> for now, and then remove in the next cycle if nothing happens.

I am fine with this decision, and will send a patch that implements it.
My patch removing Xtensa support was mainly to get the discussion
started.

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture
  2012-04-25  9:09     ` Thomas Petazzoni
@ 2012-04-25  9:21       ` Peter Korsgaard
  2012-04-25 11:02         ` Thomas Petazzoni
  2012-04-26  4:55       ` Marc Gauthier
  1 sibling, 1 reply; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-25  9:21 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Le Wed, 25 Apr 2012 10:44:38 +0200,
 Thomas> Peter Korsgaard <jacmet@uclibc.org> a ?crit :

 >> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
 >> 
 Thomas> The support for Xtensa has been added in July 2009, and no updates
 Thomas> have ever been done to it, and it requires some special handling, in
 Thomas> gcc/gdb, has some special Perl scripts, etc.
 >> 
 >> As discussed on IRC, I would prefer to simply mark Xtensa as deprecated
 >> for now, and then remove in the next cycle if nothing happens.

 Thomas> I am fine with this decision, and will send a patch that implements it.
 Thomas> My patch removing Xtensa support was mainly to get the discussion
 Thomas> started.

Good. I already added the BR2_DEPRECATED (555c2585b).

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture
  2012-04-25  9:21       ` Peter Korsgaard
@ 2012-04-25 11:02         ` Thomas Petazzoni
  0 siblings, 0 replies; 55+ messages in thread
From: Thomas Petazzoni @ 2012-04-25 11:02 UTC (permalink / raw)
  To: buildroot

Le Wed, 25 Apr 2012 11:21:56 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

>  Thomas> I am fine with this decision, and will send a patch that implements it.
>  Thomas> My patch removing Xtensa support was mainly to get the discussion
>  Thomas> started.
> 
> Good. I already added the BR2_DEPRECATED (555c2585b).

Ok, thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture
  2012-04-25  9:09     ` Thomas Petazzoni
  2012-04-25  9:21       ` Peter Korsgaard
@ 2012-04-26  4:55       ` Marc Gauthier
  2012-04-26  6:07         ` Peter Korsgaard
  1 sibling, 1 reply; 55+ messages in thread
From: Marc Gauthier @ 2012-04-26  4:55 UTC (permalink / raw)
  To: buildroot

Thomas Petazzoni wrote:
> Le Wed, 25 Apr 2012 10:44:38 +0200,
> Peter Korsgaard <jacmet@uclibc.org> a ?crit :
>
> > >>>>> "Thomas" == Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> writes:
> >
> >  Thomas> The support for Xtensa has been added in July
> >  Thomas> 2009, and no updates
> >  Thomas> have ever been done to it, and it requires some
> >  Thomas> special handling, in
> >  Thomas> gcc/gdb, has some special Perl scripts, etc.
> >
> > As discussed on IRC, I would prefer to simply mark Xtensa
> > as deprecated
> > for now, and then remove in the next cycle if nothing happens.
>
> I am fine with this decision, and will send a patch that
> implements it.
> My patch removing Xtensa support was mainly to get the discussion
> started.


Thanks for the reprieve.  How far is that "next cycle"?

-Marc

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture
  2012-04-26  4:55       ` Marc Gauthier
@ 2012-04-26  6:07         ` Peter Korsgaard
  0 siblings, 0 replies; 55+ messages in thread
From: Peter Korsgaard @ 2012-04-26  6:07 UTC (permalink / raw)
  To: buildroot

>>>>> "Marc" == Marc Gauthier <marc@tensilica.com> writes:

Hi,

 >> I am fine with this decision, and will send a patch that implements
 >> it.  My patch removing Xtensa support was mainly to get the
 >> discussion started.

 Marc> Thanks for the reprieve.  How far is that "next cycle"?

Buildroot gets released every 3 months. The next release is for end of
May, so June->August.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2012-04-26  6:07 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 14:45 [Buildroot] [pull request] Pull request for branch for-2012.05/misc-cleanups Thomas Petazzoni
2012-04-17 14:45 ` [Buildroot] [PATCH 01/22] Remove the DATE variable Thomas Petazzoni
2012-04-21 13:05   ` Arnout Vandecappelle
2012-04-22  8:23     ` Peter Korsgaard
2012-04-22 15:32       ` Thomas Petazzoni
2012-04-22 19:55         ` Peter Korsgaard
2012-04-24  7:43           ` Thomas De Schampheleire
2012-04-24  8:31             ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 02/22] Remove cc-option: not used anywhere Thomas Petazzoni
2012-04-19 13:54   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 03/22] Remove filename extension crap for OS compatibility Thomas Petazzoni
2012-04-19 14:03   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 04/22] kconfig: do not use HOST_LOADLIBES anymore Thomas Petazzoni
2012-04-19 14:05   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 05/22] Rename Makefile.autotools.in to pkg-autotargets.mk Thomas Petazzoni
2012-04-19 14:08   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 06/22] Rename Makefile.cmake.in to pkg-cmaketargets.mk Thomas Petazzoni
2012-04-19 14:06   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 07/22] Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mk Thomas Petazzoni
2012-04-19 14:07   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 08/22] pkg-*.mk: add some comments, update some existing comments Thomas Petazzoni
2012-04-19 14:08   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 09/22] Remove unused .fakeroot.* mechanism Thomas Petazzoni
2012-04-19 14:09   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 10/22] Move the manual build infrastructure to docs/manual/manual.mk Thomas Petazzoni
2012-04-19 22:01   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 11/22] cmake: move creation of toolchain file to package/pkg-cmaketargets.mk Thomas Petazzoni
2012-04-19 22:01   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 12/22] package: remove unused STRIP_DISCARD_ALL variable Thomas Petazzoni
2012-04-24 22:03   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 13/22] Remove unused GNU_TARGET_SUFFIX Thomas Petazzoni
2012-04-25  6:55   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 14/22] toolchain: remove useless indirect variables Thomas Petazzoni
2012-04-25  6:56   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 15/22] gcc: remove unused EXTRA_GCC2_CONFIG_OPTIONS Thomas Petazzoni
2012-04-25  6:58   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 16/22] gcc: remove unused EXTRA_GCC4_CONFIG_OPTIONS Thomas Petazzoni
2012-04-25  6:59   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 17/22] gcc: remove unused ARCH_FPU_SUFFIX Thomas Petazzoni
2012-04-25  7:00   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 18/22] gcc: move version/snap variables to gcc-uclibc-4.x.mk Thomas Petazzoni
2012-04-25  7:01   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 19/22] toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in Thomas Petazzoni
2012-04-25  7:47   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 20/22] gcc: remove unused EXTRA_GCC1_CONFIG_OPTIONS Thomas Petazzoni
2012-04-25  7:47   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 21/22] mklibs: remove support Thomas Petazzoni
2012-04-25  7:56   ` Peter Korsgaard
2012-04-17 14:45 ` [Buildroot] [PATCH 22/22] xtensa: remove support for this architecture Thomas Petazzoni
2012-04-25  8:44   ` Peter Korsgaard
2012-04-25  9:09     ` Thomas Petazzoni
2012-04-25  9:21       ` Peter Korsgaard
2012-04-25 11:02         ` Thomas Petazzoni
2012-04-26  4:55       ` Marc Gauthier
2012-04-26  6:07         ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.