Commit Graph

259 Commits

Author SHA1 Message Date
Yann E. MORIN
9806bf5a9a Makefile: rename USER_HOOKS_EXTRA_ENV to EXTRA_ENV
This variable contains extra environment variables that we can not export
since they are clashing with some build systems (eg. BUILD_DIR with
u-boot).

So, we may need these variables for uses other than the user's hooks
for instrumentation. For example, we'll use them later on to export
BUILD_DIR to the download helper scripts.

Fix comment, too.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-17 23:07:58 +02:00
Samuel Martin
57eb048c30 Makefile: add PATH to the USER_HOOKS_EXTRA_ENV
This can be useful for post-{build,image} scripts, in case some host-tools
were specifically built to be used by these scripts.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-16 19:29:33 +02:00
Samuel Martin
b989976475 infra: remove unused {TARGET, HOST}_PATH definition
Since the variables TARGET_PATH and HOST_PATH are not used anymore,
let's remove them.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-16 19:29:13 +02:00
Samuel Martin
8445501740 *.mk: replace (TARGET|HOST)_PATH by BR_PATH
Thanks to the 2 previous patches of the series, BR_PATH contains
all locations in which host-packages may install programs.

This patch replaces the occurrences TARGET_PATH and HOST_PATH with
BR_PATH, everywhere these variables are used in the *.mk files.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-16 19:28:56 +02:00
Samuel Martin
caa329bffd Makefile: introduce BR_PATH
Since the HOST_PATH and TARGET_PATH variables almost contain the same
things, let's factorize this in a single BR_PATH.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-16 19:28:34 +02:00
Noam Camus
65c2400ff2 toolchain: control vendor part in GNU_TARGET_NAME
This option allows to customize the "vendor" part of the
toolchain tuple, where the toolchain tuple has the form
<arch>-<vendor>-<os>-<libc>. Use this option in situations
where gcc might make different decisions based on the vendor
part of the tuple.

[Thomas: move the config option in a slightly different place, so that
it does not appear between the C library selection and the C library
options.]

Signed-off-by: "Noam Camus" <noamc@ezchip.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-06 14:16:06 +02:00
Yann E. MORIN
7439824412 packages: add infrastructure for virtual packages
The virtual-package infrastructure allows to easily define a
virtual package in a single line:

    $ cat package/some-virtual-package/some-virtual-package.mk
    $(eval $(virtual-package))

And that's all. :-)

Thanks to Éric for his work on the manual, that prompted the
idea for this virtual-package infrastructure! ;-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-05 19:20:59 +02:00
Max Filippov
c6277e4b31 Makefile.in: add -mtext-section-literals to xtensa ABI
Collecting literals into separate section can be advantageous if that
section is placed into DTCM at link time. This is applicable for code
running on bare metal, but makes no sense under linux, where userspace
is isolated from the physical memory details. OTOH placing literals into
separate section breaks build of huge source files, because l32r
instruction can only access literals in 256 KBytes range.

Add -mtext-section-literals into xtensa ABI to fix build issues of
packages with huge sources.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-03 21:35:21 +02:00
Francois Perrad
9fbb169976 pkg-perl: new infrastructure
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-23 22:36:42 +01:00
Francois Perrad
f99a66de95 host-perl: export and rename PERL5LIB
The official Perl documentation refers only to PERL5LIB.
PERLLIB is obsolete, we don't need to be compatible with Perl4.

PERL5LIB is used in all environment, so it is simpler to just export it.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-10 19:48:49 +01:00
Thomas De Schampheleire
e20df632c4 infra: remove separate definition of DISABLE_DOCUMENTATION
Since we now always disable documentation on target, there is no need to
have a separate variable DISABLE_DOCUMENTATION anymore.

Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-08 23:44:48 +01:00
Thomas De Schampheleire
7164a32632 packages: remove support for documentation on target
This patch removes deprecated symbol BR2_HAVE_DOCUMENTATION and all its
usage. Additionally, it removes the now unused BR2_DEPRECATED_SINCE_2012_11.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-08 23:31:21 +01:00
Francois Perrad
72afb294ff luarocks: new infrastructure
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[yann.morin.1998@free.fr: apply Thomas' comments]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-13 23:17:18 +01:00
Thomas Petazzoni
a6bba674a2 package: introduce Python package infrastructure
[Peter: fix s/BUILD_TYPE/SETUP_TYPE/ typo in manual as noted by Samuel]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-15 13:32:12 +01:00
Thomas Petazzoni
f1f4451aa7 package: add objcopy and ranlib to HOST_CONFIGURE_OPTS
This commit adds the OBJCOPY and RANLIB variables to
HOST_CONFIGURE_OPTS, since grub legacy will need these defined in
order to build properly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-01 23:32:33 +01:00
Yann E. MORIN
cfd497d4c3 post-{build, images} hooks: export BUILD_DIR too
Also export BUILD_DIR for post-{build,images} hooks, so they do have
a place to store generated files.

Note: this will be more einteresting for the instrumentation of steps,
to come in a later patch.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-13 00:25:18 +01:00
Thomas Petazzoni
f742fe4407 toolchain-crosstool-ng: remove support
In order to avoid the work of converting the toolchain-crosstool-ng
logic to the package infrastructure, we remove it from Buildroot,
since it has been deprecated since quite some time.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-06 20:50:41 +02:00
Fabio Porcedda
4b3bc153ad package/Makefile.in: don't force jobs when BR2_JLEVEL is empty
When the "BR2_JLEVEL" variable is empty use "make" without
the "-j" option, because to be able to use top-level parallel
make we must not force the number of jobs in sub-make.

Example:
	make BR2_JLEVEL= -j8

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-04 15:08:30 +02:00
Thomas Petazzoni
c5866be0ad toolchain: refactor Stack Smashing Protection support
This commit refactors how Stack Smashing Protection support is handled
in Buildroot:

 *) It turns the BR2_TOOLCHAIN_BUILDROOT_USE_SSP option into an option
    that only enables the SSP support in uClibc, when using the internal
    toolchain backend.

 *) It adds an hidden BR2_TOOLCHAIN_HAS_SSP option that gets enabled
    when the toolchain has SSP support. Here we have the usual dance:
    glibc/eglibc in internal/external backend always select this
    option, in the case of uClibc/internal, it gets selected when
    BR2_TOOLCHAIN_BUILDROOT_USE_SSP is enabled, in the case of
    uClibc/external, there is a new configuration option that the user
    must select (or not) depending on whether the toolchain has SSP
    support.

 *) It adds a new options BR2_ENABLE_SSP in the "Build options" menu,
    to enable the usage of SSP support, by adding
    -fstack-protector-all to the CFLAGS.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-15 23:02:57 +02:00
Thomas Petazzoni
87bb439942 package/Makefile.in: fix incorrect comment
The TARGET_{CC,CXX,LD,...} variables no longer contain any --sysroot
option, since we're now using a toolchain wrapper for external
toolchains.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-15 22:48:28 +02:00
Gustavo Zacarias
71701eb6d7 nommu/flat: build packages with the correct FLAGS
When building for nommu flat targets the CFLAGS/CXXFLAGS/LDFLAGS must be
adjusted accordingly.
For gcc this means passing along -Wl,-elf2flt to signal the linker.
For ld this means -elf2flt.

Also correct the error in STACKSIZE settings from commit 9edf482d which
is setting gcc flags as ld flags and will surely fail (no package uses
it at the moment so it was never seen).

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-13 00:12:15 +02:00
Thomas Petazzoni
796621c56a package/Makefile.in: fix ABI name for EABIhf targets
The current code to set ABI on ARM does the following:

ifeq ($(BR2_arm)$(BR2_armeb),y)
... set ABI without 'hf' suffix ...
else ifeq ($(BR2_ARM_EABIHF),y)
... set ABI with 'hf' suffix ...
endif

But since $(BR2_arm)$(BR2_armeb) will always be 'y' in the cases where
BR2_ARM_EABIHF is 'y', it means that the 'else' part of the condition
will never be used.

Fix this by appending 'hf' to the ABI variable when BR2_ARM_EABIHF is
selected.

[Peter: put EABIhf handling under arm/armeb conditional for consistency]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-08-27 22:46:11 +02:00
Gustavo Zacarias
b32f186cfd blackfin: set GNU_TARGET_NAME accordingly
Blackfin for FDPIC targets uses *-linux-*, however for FLAT targets it
needs *-uclinux-* in order for gcc to build properly.

[Thomas: use a TARGET_OS variable instead of redefining
GNU_TARGET_NAME completely]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-07-27 16:11:41 +02:00
Gustavo Zacarias
808cc0a5e1 toolchain/buildroot: properly handle SSP
The current SSP handling is incomplete.

First we need to build uClibc with SSP support for a complete
"experience".

Second, it doesn't hurt to add -fstack-protector-all to the
CFLAGS/CXXFLAGS since most users would expect buildroot to do this
rather than adding the flags themselves.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-07-27 13:16:50 +02:00
Thomas Petazzoni
5f959a1c61 arch: improve ARM floating point support and add support for EABIhf
This commit introduces the support for the EABIhf ABI, next to the
existing support we have for EABI and OABI (even though OABI support
is deprecated). EABIhf allows to improve performance of floating point
workload by using floating point registers to transfer floating point
arguments when calling functions, instead of using integer registers
to do, as is done in the 'softfp' floating point model of EABI.

In addition to this, this commit introduces a list of options for the
floating point support:
 * Software floating point
 * VFP
 * VFPv3
 * VFPv3-D16
 * VFPv4
 * VFPv4-D16

and it introduces some logic to make sure the options are only visible
when it makes sense, depending on the ARM core being selected. This is
however made complicated by the fact that certain VFP capabilities are
mandatory on some cores, but optional on some other cores. The kconfig
logic tries to achieve the following goals:

 * Hide options that are definitely not possible.

 * Use safe default values (i.e for Cortex-A5 and A7, the presence of
   the VFPv4 unit is optional, so we default on software floating
   point on these cores)..

 * Show the available possibilities, even if some of them are not
   necessarily working on a particular core (again, for the Cortex-A5
   and A7 cores, there is no way of knowing whether the particular
   variant used by the user has VFPv4 or not, so we select software
   floating point by default, but still show VFP/VFPv3/VFPv4 options).

It is worth noting that this commit doesn't add support for all
possible -mfpu= values on ARM. We haven't added support for fpa, fpe2,
fpe3, maverick (those four are only used on very old ARM cores), for
vfpv3-fp16, vfpv3-d16-fp16, vfpv3xd, vfpv3xd-fp16, neon-fp16,
vfpv4-sp-d16. They can be added quite easily if needed thanks to the
new organization of the Config.in options.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-16 14:42:12 +02:00
Yann E. MORIN
b6a9829ebe pkg-infra: dump all ARM OABI references when setting ABI
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-14 22:17:26 +02:00
Thomas Petazzoni
381616e77a Introduce BR2_TOOLCHAIN_USES_{UCLIBC, GLIBC}
Currently, when we need to do a conditional on the type of C library
used, we need to take into account the three toolchain backends. As we
are going to add eglibc support to the Buildroot toolchain backend, it
would become even uglier, so this patch introduces two new hidden
options: BR2_TOOLCHAIN_USES_UCLIBC and BR2_TOOLCHAIN_USES_GLIBC, that
exist regardless of the toolchain backend. The entire Buildroot code
base is converted to use those options.

Note that we have intentionally created only one option
(BR2_TOOLCHAIN_USES_GLIBC) for both glibc and eglibc, since they are
essentially the same, as far as Buildroot is concerned.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-04 09:08:42 +02:00
Alexandre Belloni
95442bb324 Normalize separator size to 80 in remaining makefiles
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-20 17:32:07 +02:00
Yann E. MORIN
df8d52fb02 package-infra: limit the number of // jobs
The current code spawns as many jobs as up to twice the number of CPUs.

On small-class machines like laptops, with a limitted amount of memory,
but still a few CPUs (real or hyperthreads), the HDD becomes a bottleneck,
and it becomes almost impossible to do anythiong else while there is a
build in progress.

Limit the number of jobs to the number of CPUs plus one.

Even on fast machines with fast HDDs, this settings keeps the machine
fully busy (for those packages that can build in parallel, of course).

For example, building qemu or the linux kernel kept my hyperthreaded
hexa Core i7 with 18GiB of RAM, busy at 99% (I never ever managed to
get 100% even with more jobs, not even 200); while on my hyperthreaded
dual Core i5 with only 4GiB and a slow HDD, I still topped at 100% CPU,
while still able to do some work involving the HDD.

If the number of processors is not available, assume one.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Nathan Lynch <ntl@pobox.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-11 22:49:59 +02:00
Sonic Zhang
9edf482d6b package: Introduce package-specific BINFMT_FLAT options.
Add new option <PKG>_FLAT_STACKSIZE. The document needs to be updated.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-05 22:55:50 +02:00
Sonic Zhang
57c0543291 arch: toolchain: Introduce binary format FLAT types.
Just introduce the symbol and options in arch generic Config.in.
Add FLAT types specific compiling flags into package makefile.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-05 22:54:37 +02:00
Arnout Vandecappelle
befb9a3ee0 Make external toolchain relocatable
The external toolchain wrapper sets sysroot etc. to an absolute path.
By changing this to a relative path, it is possible to move the host
directory to a different location and still have a working build
system.

This only works for a downloaded external toolchain.  For a pre-installed
external toolchain, it is possible to move the host directory to a
different location, but not the external toolchain directory (it does work
if the external toolchain directory lies within the host directory).  For
an internal or crosstool-ng toolchain, there is no wrapper so updating the
sysroot path should be done in a different way.

See http://lists.busybox.net/pipermail/buildroot/2012-February/050371.html
for information about others things to do to make the host directory
relocatable.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-02-05 15:06:31 +01:00
ANDY KENNEDY
0a4bd19f4a Pass --static rather than -static in LDFLAGS when BR2_PREFER_STATIC_LIB
The following changes LDFLAGS from -static to --static if building
with BR2_PREFER_STATIC_LIB so that various components actually build
statically.

Libtool interpret -static as linking statically with libraries that will not
be installed to the libdir; you have to pass it -all-static to force static
linking.  Or, pass --static, which libtool passes on blindly to gcc.  gcc
and (GNU) ld both interpret --static the same as -static (although this
isn't documented).

Signed-off-by: Andy Kennedy <andy.kennedy@adtran.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-01-14 20:40:26 +01:00
Arnout Vandecappelle
489970e047 pkg-infra: pass --disable-doc if documentation is not enabled
Many configure scripts support an option like --disable-doc, --disable-docs
or --disable-documentation.  Pass all of these to configure.

In addition, not all Xorg packages accept the --disable-xxx. Instead they
look for xmlto and/or fop and build documentation if they exist.  For host
packages, this may lead to build errors because /usr/bin/xmlto uses libxml2
and we set LD_LIBRARY_PATH to point to $(HOST_DIR)/lib, which may contain
a libxml2 as well.  So it's essential to disable xmlto for host packages.

Also some whitespace cleanup.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-12-12 17:11:15 +01:00
Chris Zankel
f7ccd30afb xtensa: add -mlongcalls to CFLAGS for xtensa
The longcalls option allows calls across a greater range of addresses.

This option may degrade both code size and performance, but
the linker can generally optimize away the unnecessary overhead
when a call ends up within range

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-12-10 22:25:45 +01:00
Richard Braun
6ae7886f84 Makefile: fix thread libraries stripping
Strip libthread_db the same as any other library, but strip libpthread
with --strip-debug. See the relevant mailing list discussion [1] for
additional details.

[1] http://lists.busybox.net/pipermail/buildroot/2012-October/060126.html

Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-30 13:59:40 -08:00
Arnout Vandecappelle (Essensium/Mind)
cc1cd3b267 legacy: move old GENTARGETS macros to Makefile.legacy
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-30 12:06:56 -08:00
Maxime Ripard
a32fa707e5 TARGET_CONFIGURE_OPTS: pass READELF
Give the path to the realdelf binary for the target, similar to how we
do for the other tools.

[Peter: reworded]
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-07 23:35:39 +01:00
Gustavo Zacarias
fbb872a0c1 package infra: remove empty TARGET_CPPFLAGS def
It's unneeded, just fills the next match (LARGEFILE) with a leading
space. Fixes
http://autobuild.buildroot.net/results/ad5772d19036a0c5564228ac7aba953d35a3cf85/build-end.log
since SCons can't handle leading whitespace in LDFLAGS gracefully.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-10-13 22:24:14 +02:00
Peter Korsgaard
6357223722 package/Makefile.in: whitespace fixup after CPPFLAGS addition
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-10-11 09:01:10 +02:00
Samuel Martin
bdac1ad29a Makefile.in: add CPPFLAGS support
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-10-10 23:50:26 +02:00
Arnout Vandecappelle
11017f081f pkg-infra: make sure cross compiling is enabled when host == target
When compiling for the same architecture and libc as the host,
GNU_TARGET_NAME and GNU_HOST_NAME are equal.  configure scripts use
these to detect cross-compilation, and will decide that we're doing
native compilation.  This may trigger running of executables,
which fail because of missing libraries in the host environment.

To solve this, set the vendor part in GNU_TARGET_NAME to buildroot.

This problem exists for instance in xserver_xorg-server on x86_64.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-10-04 22:49:58 +02:00
Arnout Vandecappelle
5e0d702b7c pkg-infra: warn about use of deprecated GENTARGETS
With the replacement of GENTARGETS by package-generic, there is a risk
that local packages don't work anymore without any indication of what
is wrong.  Therefore, generate an error message if the GENTARGETS,
AUTOTARGETS or CMAKETARGETS macro is still used.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-09-05 22:54:20 +02:00
Gustavo Zacarias
2bb39acb6a mips64: remove toolchain kludge
-mno-abicalls is an old kludge for some (probably) old issue.
Remove it since it's actually harmful, static busybox doesn't build with
it for a modern-ish toolchain (defaults as of this commit, uClibc
0.9.33.2 + gcc 4.5.4).

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-09-04 22:04:00 +02:00
Thomas Petazzoni
8e55f03a54 Clarify MIPS ABIs support
Practically speaking, MIPS has three useful ABIs:

 * o32 is for 32-bits CPUs, or 64-bit CPUs running only a 32-bit subset
   of the instruction set.
 * n32 is for 64-bits CPUs only. It has 32-bits pointers and long
   integers.
 * n64 is for 64-bits CPUs only. It has 64-bits pointers and long
   integers.

See http://www.linux-mips.org/wiki/MIPS_ABI_History and
http://www.linux-mips.org/wiki/WhatsWrongWithO32N32N64 for more
details.

So, this commit reworks the Buildroot MIPS support by:

 * Add separate mips64/mips64el top-level architectures.

 * Renaming the n32 ABI option to BR2_MIPS_NABI32, for consistency
   with BR2_MIPS_OABI32.

 * Renaming the n64 ABI option to BR2_MIPS_NABI64, for consistency
   with BR2_MIPS_OABI32.

 * Make the n32 and n64 ABI selections select the BR2_ARCH_IS_64,
   since those ABIs are valid on 64-bits CPUs only.

 * Removing the o64 ABI, which is practicaly never used.

 * Removing the "none" ABI, which really doesn't make sense.

 * Introduce the mips64 and mips64el architecture names when a 64-bits
   MIPS ABI is choosen. This will fix build issue like
   http://autobuild.buildroot.org/results/9b8c5ea86c953a89e85e7b67e9221de41773f652/build-end.log
   where gmp was confused by the fact of having a 32 bits architecture
   (detected by the mips- architecture part of the tuple) but 64 bits
   integer size when compiling.

 * Adjust the uclibc.mk logic to support the new mips64/mips64el
   architecture names, and take into account the renaming of the ABI
   options.

This has been build tested by generating Buildroot toolchains and
compiling a few packages for MIPS o32, MIPS n32 and MIPS n64.

This work is originally based on prior work done by Gustavo Zacarias.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-09-04 22:03:55 +02:00
Arnout Vandecappelle (Essensium/Mind)
2359e1223f Clean up naming of old GENTARGETS infrastructure
With the renaming of XXXTARGETS to xxx-package, the names of the
pkg-xxx.mk files is inconsistent, as well as some internal names in
the documentation.  These inconsistencies are cleaned up here.

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

 ...kages-autotargets.txt => adding-packages-autotools.txt} |    4 ++--
 ...packages-cmaketargets.txt => adding-packages-cmake.txt} |    4 ++--
 docs/manual/adding-packages-directory.txt                  |   12 ++++++------
 ...packages-gentargets.txt => adding-packages-generic.txt} |    4 ++--
 docs/manual/adding-packages.txt                            |    6 +++---
 package/Makefile.in                                        |    6 +++---
 package/{pkg-autotargets.mk => pkg-autotools.mk}           |    0
 package/{pkg-cmaketargets.mk => pkg-cmake.mk}              |    0
 package/{pkg-gentargets.mk => pkg-generic.mk}              |    0
 9 files changed, 18 insertions(+), 18 deletions(-)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:24:03 +02:00
Arnout Vandecappelle (Essensium/Mind)
7ea1e92bdd Remove -fPIC on x86_64
The -fPIC breaks the purgatory of kexec (= the code that passes command-line
arguments to the kernel): kexec doesn't know how to handle the GOT and PLT
relocation entries.

There is also no reason at all to pass -fPIC.  Shared libraries that require
it will add it to their local Makefiles, and normal executables have no
business with -fPIC (plus it adds overhead...).

The -fPIC was added by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
in commit 8027784c.  That commit adds sysroot parameters to CFLAGS.
There is no explanation why -fPIC is also added for x86_64.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2012-07-13 21:51:55 +02:00
Peter Korsgaard
eb421a8433 package/Makefile.in: link statically when BR2_PREFER_STATIC_LIB
Instead of explicitly adding it for each package.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-06-29 16:40:04 +02:00
Nathan Lynch
5016aa02fb automatically set PARALLEL_JOBS when BR2_JLEVEL is 0
When BR2_JLEVEL is 0, set PARALLEL_JOBS to double the number of CPUs
detected.  This allows one to more or less fully utilize the host
system without manually tuning the configuration.

Also make 0 the default value for BR2_JLEVEL.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-06-24 11:11:07 +02:00
Nathan Lynch
a72aed3a74 introduce PARALLEL_JOBS build system variable
BR2_JLEVEL currently is expanded directly in $(MAKE), and used in
invocations of other build software (e.g. ct-ng).  However, we are
going to allow "0" to be a meaningful value for BR2_JLEVEL, which
won't work for these uses.  Given that it is not permissible to modify
BR2_-prefixed variables in Makefiles, we need an intermediate
variable.

Define PARALLEL_JOBS to $(BR2_JLEVEL), and use the former in MAKE's
definition.  Uses of BR2_JLEVEL throughout the rest of the tree to be
adjusted similarly in follow-up patches.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-06-24 11:09:21 +02:00