Go to file
Arnout Vandecappelle 919c06c282 gcc: use toolchain wrapper
We have a toolchain wrapper for external toolchain, but it is also
beneficial for internal toolchains, for the following reasons:

1. It can make sure that BR2_TARGET_OPTIMIZATION is passed to the
   compiler even if a package's build system doesn't honor CFLAGS.
2. It allows us to do the unsafe path check (i.e. -I/usr/include)
   without patching gcc.
3. It makes it simpler to implement building each package with a
   separate staging directory (per-package staging).
4. It makes it simpler to implement a compiler hash check for ccache.

The wrapper is reused from the external toolchain. A third CROSS_PATH_
option is added to the wrapper: in this case, the real executable is in
the same directory, with the extension .real.

The creation of the simple symlinks is merged with the creation of the
wrapper symlinks, otherwise part of the -gcc-ar handling logic would
have to be repeated.

The complex case-condition could be refactored with the one for the
external toolchain, but then it becomes even more complex because
they each have special corner cases. For example, the internal
toolchain has to handle *.real to avoid creating an extra indirection
after host-gcc-{final,initial}-rebuild.

Instead of creating the .real files, it would also have been possible
to install the internal toolchain in $(HOST_DIR)/opt, similar to what
we do for the external toolchain. However, then we would also have to
copy things to the sysroot and do more of the magic that the external
toolchain is doing. So keeping it in $(HOST_DIR)/usr/bin is much
simpler.

Note that gcc-initial has to be wrapped as well, because it is used for
building libc and we want to apply the same magic when building libc.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jérôme Oufella <jerome.oufella@savoirfairelinux.com>
Reviewed-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-04 18:22:20 +02:00
arch arch/arm: add missing arm1136j-s variant 2015-08-24 00:43:12 +02:00
board olimex_a20_olinuxino_lime2: new board 2015-10-03 14:50:47 +01:00
boot grub2: pass target NM, OBJCOPY and STRIP 2015-09-20 14:52:19 +02:00
configs configs: add ARC HS38 VDK virtual boards 2015-10-04 15:39:36 +01:00
docs docs/manual: document new actual source package variables 2015-10-04 17:04:16 +01:00
fs fs: iso9660: change boot menu entry text 2015-08-18 21:42:51 +02:00
linux linux: bump default version to 4.2.3 2015-10-03 23:21:29 +02:00
package gcc: use toolchain wrapper 2015-10-04 18:22:20 +02:00
support pkg-perl: refactor perl infrastructure 2015-10-02 20:56:52 +01:00
system skeleton: Pretty fixes for /etc/profile 2015-10-04 15:53:07 +01:00
toolchain gcc: use toolchain wrapper 2015-10-04 18:22:20 +02:00
.defconfig arch: kill avr32 2015-02-14 17:39:50 +01:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
CHANGES Update for 2015.08 2015-08-31 23:06:58 +02:00
Config.in blackbox: remove deprecated package 2015-09-13 23:28:42 +02:00
Config.in.legacy zxing-cpp: new package, replacing zxing 2015-10-04 15:11:57 +01:00
COPYING clarify license and fix website license link 2009-05-08 09:29:41 +02:00
Makefile legal-info: allow to declare the actual sources for binary packages 2015-10-04 16:59:05 +01:00
Makefile.legacy Makefile.legacy: fix recursive invocation with BUILDROOT_DL_DIR and _CONFIG 2014-02-11 08:14:57 +01:00
README README: mention 'make list-defconfigs' 2015-04-04 15:19:43 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.