Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFCv1 00/11] Convert toolchain backends to packages to fix source/external-deps/legal-info
@ 2013-09-05 21:27 Thomas Petazzoni
  2013-09-05 21:27 ` [Buildroot] [RFCv1 01/11] Makefile: make $(BUILD_DIR)/.root rule idempotent Thomas Petazzoni
                   ` (12 more replies)
  0 siblings, 13 replies; 49+ messages in thread
From: Thomas Petazzoni @ 2013-09-05 21:27 UTC (permalink / raw)
  To: buildroot

Hello,

The final goal of this patch set is to get 'make source' and 'make
external-deps' to behave properly after the conversion of the internal
toolchain backend to the package infrastructure.

To do so, the idea of this patch is to:

 (1) Create a 'toolchain' virtual package, which will depend on the
     particular toolchain backend depending on the configuration.

 (2) Turn the toolchain backends into normal packages. In this patch
     set, only the internal and external backends are converted, the
     Crosstool-NG backend is removed. If we feel it's too early or not
     desirable to remove the Crosstool-NG backend, it can be converted
     to the package infrastructure as well.

 (3) Rely on new package infrastructure targets <pkg>-all-source and
     <pkg>-all-legal-info to properly get the complete list of sources
     (or legal informations).

Note that I am not sure that this patch set is fully bisectable. When
touching such core stuff, it's quite hard to ensure that things work
at every step of the patch series.

With an internal toolchain:

$ make external-deps
binutils-2.21.1.tar.bz2
busybox-1.21.1.tar.bz2
gcc-4.7.3.tar.bz2
gmp-5.1.2.tar.bz2
linux-3.11.tar.xz
mpc-1.0.1.tar.gz
mpfr-3.1.2.tar.bz2
uClibc-0.9.33.2.tar.xz
$ make legal-info
[...]
$ cat output/legal-info/manifest.csv
"PACKAGE","VERSION","LICENSE","LICENSE FILES","SOURCE ARCHIVE"
"buildroot","2013.11-git-00096-g7756e14","GPLv2+","COPYING","not saved"
"busybox","1.21.1","GPLv2","LICENSE","busybox-1.21.1.tar.bz2"
"binutils","2.21.1","GPLv3+, libiberty LGPLv2.1+","COPYING3 COPYING.LIB","binutils-2.21.1.tar.bz2"
"gmp","5.1.2","LGPLv3+","COPYING.LIB","gmp-5.1.2.tar.bz2"
"mpfr","3.1.2","LGPLv3+","COPYING.LESSER","mpfr-3.1.2.tar.bz2"
"mpc","1.0.1","LGPLv3+","COPYING.LESSER","mpc-1.0.1.tar.gz"
"gcc-initial","4.7.3","unknown","not saved","gcc-4.7.3.tar.bz2"
"linux-headers","3.11","unknown","not saved","linux-3.11.tar.xz"
"uclibc","0.9.33.2","unknown","not saved","uClibc-0.9.33.2.tar.xz"
"gcc-final","4.7.3","unknown","not saved","gcc-4.7.3.tar.bz2"

This patch set is sent as an RFC for now, since it really needs some
testing from various people. The dependencies of this core stuff are
pretty tricky to get right, it's pretty likely that I have overlooked
something.

In the long term, I'm thinking of:

 (1) Making 'toolchain' a dependency of all target packages, because
     it's really what it is.

 (2) Maybe create a 'host-toolchain' package which would encapsulate
     the logic to ensure that the host toolchain is ready to be used
     by Buildroot, especially the fact of building ccache if
     needed. All host packages woudl depend on host-toolchain, and
     some target packages could also depend on it (for example the
     busybox-menuconfig target could depend on host-toolchain to
     ensure that ccache is built before the menuconfig interface of
     Busybox gets built).

This of course remains to be discussed and implemented. I do not
intend to implement this until this series (or the evolutions of it)
are merged.

Best regards,

Thomas

Thomas Petazzoni (11):
  Makefile: make $(BUILD_DIR)/.root rule idempotent
  toolchain-crosstool-ng: remove support
  toolchain-external: make ext-tool.mk includable in all cases
  toolchain: move helpers.mk into toolchain-external/
  toolchain: introduce a virtual package
  toolchain-buildroot: convert to the package infrastructure
  toolchain: intermediate .mk files no longer needed
  package: package-based implementation of source, external-deps and
    legal-info
  package: add a <pkg>_SOURCE_ADDONS variable
  toolchain-external: convert to the package infrastructure
  dependencies: remove useless targets

 Makefile                                           |  61 +--
 package/pkg-generic.mk                             |   5 +
 support/dependencies/dependencies.mk               |   8 -
 toolchain/Config.in                                |  13 -
 toolchain/toolchain-buildroot.mk                   |   9 -
 .../toolchain-buildroot/toolchain-buildroot.mk     |  17 +
 toolchain/toolchain-common.in                      |   4 -
 toolchain/toolchain-crosstool-ng.mk                |   5 -
 toolchain/toolchain-crosstool-ng/Config.in         | 133 ------
 .../crosstool-ng.config-eglibc                     | 502 ---------------------
 .../crosstool-ng.config-glibc                      | 491 --------------------
 .../crosstool-ng.config-uClibc                     | 473 -------------------
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk   | 396 ----------------
 toolchain/toolchain-external.mk                    |   4 -
 toolchain/{ => toolchain-external}/helpers.mk      |   4 +-
 .../{ext-tool.mk => toolchain-external.mk}         | 155 +++----
 toolchain/toolchain/toolchain.mk                   |  18 +
 17 files changed, 124 insertions(+), 2174 deletions(-)
 delete mode 100644 toolchain/toolchain-buildroot.mk
 create mode 100644 toolchain/toolchain-buildroot/toolchain-buildroot.mk
 delete mode 100644 toolchain/toolchain-crosstool-ng.mk
 delete mode 100644 toolchain/toolchain-crosstool-ng/Config.in
 delete mode 100644 toolchain/toolchain-crosstool-ng/crosstool-ng.config-eglibc
 delete mode 100644 toolchain/toolchain-crosstool-ng/crosstool-ng.config-glibc
 delete mode 100644 toolchain/toolchain-crosstool-ng/crosstool-ng.config-uClibc
 delete mode 100644 toolchain/toolchain-crosstool-ng/crosstool-ng.mk
 delete mode 100644 toolchain/toolchain-external.mk
 rename toolchain/{ => toolchain-external}/helpers.mk (99%)
 rename toolchain/toolchain-external/{ext-tool.mk => toolchain-external.mk} (86%)
 create mode 100644 toolchain/toolchain/toolchain.mk

-- 
1.8.1.2

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

end of thread, other threads:[~2013-09-27 14:27 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 21:27 [Buildroot] [RFCv1 00/11] Convert toolchain backends to packages to fix source/external-deps/legal-info Thomas Petazzoni
2013-09-05 21:27 ` [Buildroot] [RFCv1 01/11] Makefile: make $(BUILD_DIR)/.root rule idempotent Thomas Petazzoni
2013-09-08 12:06   ` Thomas De Schampheleire
2013-09-08 13:13   ` Danomi Manchego
2013-09-08 13:30     ` Thomas Petazzoni
2013-09-08 16:59       ` Danomi Manchego
2013-09-08 17:31         ` Thomas Petazzoni
2013-09-09  8:54   ` Luca Ceresoli
2013-09-09 21:38   ` Peter Korsgaard
2013-09-10  7:23     ` Thomas Petazzoni
2013-09-05 21:27 ` [Buildroot] [RFCv1 02/11] toolchain-crosstool-ng: remove support Thomas Petazzoni
2013-09-06  9:35   ` Yann E. MORIN
2013-09-06 15:53   ` Yann E. MORIN
2013-09-06 15:56     ` Thomas Petazzoni
2013-09-08 12:52   ` Thomas De Schampheleire
2013-09-13 16:10   ` Luca Ceresoli
2013-09-05 21:27 ` [Buildroot] [RFCv1 03/11] toolchain-external: make ext-tool.mk includable in all cases Thomas Petazzoni
2013-09-08 15:31   ` Thomas De Schampheleire
2013-09-05 21:27 ` [Buildroot] [RFCv1 04/11] toolchain: move helpers.mk into toolchain-external/ Thomas Petazzoni
2013-09-08 17:50   ` Thomas De Schampheleire
2013-09-13 16:07   ` Luca Ceresoli
2013-09-05 21:27 ` [Buildroot] [RFCv1 05/11] toolchain: introduce a virtual package Thomas Petazzoni
2013-09-13 16:24   ` Luca Ceresoli
2013-09-15 14:27   ` Thomas De Schampheleire
2013-09-05 21:27 ` [Buildroot] [RFCv1 06/11] toolchain-buildroot: convert to the package infrastructure Thomas Petazzoni
2013-09-15 14:30   ` Thomas De Schampheleire
2013-09-05 21:27 ` [Buildroot] [RFCv1 07/11] toolchain: intermediate .mk files no longer needed Thomas Petazzoni
2013-09-15 14:33   ` Thomas De Schampheleire
2013-09-05 21:27 ` [Buildroot] [RFCv1 08/11] package: package-based implementation of source, external-deps and legal-info Thomas Petazzoni
2013-09-15 19:29   ` Thomas De Schampheleire
2013-09-15 20:09     ` Thomas Petazzoni
2013-09-16  1:21       ` Thomas De Schampheleire
2013-09-05 21:27 ` [Buildroot] [RFCv1 09/11] package: add a <pkg>_SOURCE_ADDONS variable Thomas Petazzoni
2013-09-16 13:39   ` Thomas De Schampheleire
2013-09-16 18:31     ` Thomas Petazzoni
2013-09-16 19:20       ` Arnout Vandecappelle
2013-09-17  7:21         ` Thomas De Schampheleire
2013-09-27 14:27           ` Luca Ceresoli
2013-09-05 21:27 ` [Buildroot] [RFCv1 10/11] toolchain-external: convert to the package infrastructure Thomas Petazzoni
2013-09-16 13:29   ` Thomas De Schampheleire
2013-09-27 14:21     ` Luca Ceresoli
2013-09-27 14:24   ` Luca Ceresoli
2013-09-05 21:27 ` [Buildroot] [RFCv1 11/11] dependencies: remove useless targets Thomas Petazzoni
2013-09-06  8:28 ` [Buildroot] [RFCv1 00/11] Convert toolchain backends to packages to fix source/external-deps/legal-info Fabio Porcedda
2013-09-06  8:38   ` Thomas Petazzoni
2013-09-06  8:50     ` Fabio Porcedda
2013-09-06 12:37   ` Ryan Barnett
2013-09-06  8:57 ` Jérôme Pouiller
2013-09-06  9:05   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox