Commit Graph

102 Commits

Author SHA1 Message Date
Thomas Petazzoni
841185df93 uclibc: two-stage gcc simplifications
After switching to a two stage gcc solution, there is no longer a need
to do weird things in the uclibc build. We can greatly simplify
UCLIBC_CONFIGURE_CMDS to only do the configuration, and let the
existing UCLIBC_BUILD_CMDS do the build. Note that we have to build
the headers before starting the C library build, otherwise there is a
build failure (probably a uClibc bug).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-14 23:21:37 +02:00
Thomas Petazzoni
6063a8fbcf toolchain: switch to a two stage gcc build
Currently, the internal toolchain backend does a three stage gcc
build, with the following sequence of builds:

 - build gcc-initial
 - configure libc, install headers and start files
 - build gcc-intermediate
 - build libc
 - build gcc-final

However, it turns out that this is not necessary, and only a two stage
gcc build is needed. At some point, it was believed that a three stage
gcc build was needed for NPTL based toolchains with old gcc versions,
but even a gcc 4.4 build with a NPTL toolchain works fine.

So, this commit switches the internal toolchain backend to use a two
stage gcc build: just gcc-initial and gcc-final. It does so by:

 * Removing the custom dependency of all C libraries build step to
   host-gcc-intermediate. Now the C library packages simply have to
   depend on host-gcc-initial as a normal dependency (which they
   already do), and that's it.

 * Build and install both gcc *and* libgcc in
   host-gcc-initial. Previously, only gcc was built and installed in
   host-gcc-initial. libgcc was only done in host-gcc-intermediate,
   but now we need libgcc to build the C library.

 * Pass appropriate environment variables to get SSP (Stack Smashing
   Protection) to work properly:

    - Tell the compiler that the libc will provide the SSP support, by
      passing gcc_cv_libc_provides_ssp=yes. In Buildroot, we have
      chosen to use the SSP support from the C library instead of the
      SSP support from the compiler (this is not changed by this patch
      series, it was already the case).

    - Tell glibc to *not* build its own programs with SSP support. The
      issue is that if glibc detects that the compiler supports
      -fstack-protector, then glibc uses it to build a few things with
      SSP. However, at this point, the support is not complete (we
      only have host-gcc-initial, and the C library is not completely
      built). So, we pass libc_cv_ssp=no to tell the C library to not
      use SSP support itself. Note that this is not a big loss: only a
      few parts of the C library were built with -fstack-protector,
      not the entire library.

 * A special change is needed for ARC, because its libgcc depends on
   the C library, which breaks building libgcc in
   host-gcc-initial. This looks like a bug in the ARC compiler, as it
   does not obey the inhibit_libc variable which tells the compiler
   build process to *not* enable things that depend on the C
   library. So for now, in host-gcc-initial, we simply disable the
   build of libgmon.a for ARC. It's going to be built as part of
   host-gcc-final, so the final compiler will have gmon support.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-14 23:20:23 +02:00
Waldemar Brodkorb
5bce172187 uclibc: fix duplicate vfork problems when static linking
Reported on uClibc mailinglist by Thomas Petazzoni
Should fix:
* SuperH
 http://autobuild.buildroot.org/results/a81/a810c2f27dee1978808461c05cbdcbf51a214e09/build-end.log
* i386
 http://autobuild.buildroot.org/results/f83/f83b65bfc6ea7c7406a02e92afda43e4c5db6e7c/build-end.log
* x86-64
 http://autobuild.buildroot.org/results/64f/64f418f54885e8b5093dc8949c2d1d1ff3c938ea/build-end.log
* powerpc
 http://autobuild.buildroot.org/results/d5b/d5b7ac84dde0e4e26cd7cc46d79e66c39ed5cd53/build-end.log

Tested with i386 static build of alsa-utils.
Patch will be send to uClibc soon, need to finish test-suite run.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-14 22:26:59 +02:00
Alexey Brodkin
a484a6ca2c ARC: bump tools to 2014.08 release
Now when new shiny tools are released by Synopsys we're ready for version
update in Buildroot.

Important change in this release is switching to combined "binutils-gdb" repo
in accordance to upstream move.

Following patch now is a part of the most recent relese:
e6ab8cac62

So dropping it.
package/binutils/arc-4.8-R3/0001-arc-Honor-DESTDIR-in-custom-Makefile.patch

Since arc-2014.08 tools are still based on GCC 4.8 following patch is still
relevant so moving to the new folder to matxh ARC gcc bump.
package/gcc/arc-4.8-R3/100-libstdcxx-uclibc-c99.patch ->
package/gcc/arc-2014.08/100-libstdcxx-uclibc-c99.patch

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-01 16:14:42 +02:00
Thomas De Schampheleire
fdc5ad1588 infra/pkg-kconfig: incorporate oldconfig call to avoid endless rebuilds
The configure step of the busybox package performs 'make oldconfig', which
causes the .config file to be updated. Thus, the .config file is more recent
than our stamp file .stamp_kconfig_fixup_done. On a subsequent build, our
dependency rules would kick in, and run the config fixup again, thus
kicking in the package's configure, build and install steps yet once
more, that, ad infinitum.

One solution is to modify kconfig-package to introduce an explicit touch of
the .kconfig_fixup_config_done stamp file, as post-configure hook.

Another solution, implemented by this patch, is to move the oldconfig call
from the package's .mk file to the kconfig-package infrastructure and make
sure it is done as part of the fixup commands. This way, the stamp file will
only be touched once, after the full fixup (including oldconfig) and no
endless rebuilds will occur.

Reported-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: "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-08-06 19:57:22 +02:00
Thomas De Schampheleire
c8d8e8a536 uclibc: convert to kconfig-package infrastructure
This patch converts the uclibc package to the new kconfig-package
infrastructure, thus removing code duplication and ensuring a consistent
behavior of kconfig packages.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04 09:54:22 +02:00
Thomas De Schampheleire
c7e862d539 uclibc: fixup config before calling menuconfig
The uclibc-menuconfig command is currently run based on the user-specified
config file, while the fixup of the config file is done afterwards.
However, it makes more sense to do an initial fixup _before_ running
menuconfig, so that the options presented to the user are consistent with
the final configuration.

This patch changes the dependency of the menuconfig target from .config to
.stamp_config_fixup_done to achieve this.

Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04 09:49:10 +02:00
Thomas De Schampheleire
419f276c13 uclibc: use $(MAKE) iso $(MAKE1) for menuconfig target
There is no real reason to run uclibc-menuconfig in non-parallel mode,
even though one can neither expect performance benefits from a parallel
menuconfig.
Nevertheless, $(MAKE) is the default, so this patch removes the unnecessary
non-default $(MAKE1) usage for uclibc-menuconfig.

This is a simplification introduced in preparation of the kconfig-package
infrastructure.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 23:46:39 +02:00
Thomas De Schampheleire
8b8a60cd52 uclibc: update-config: preserve freshly configured settings
In the sequence:

make uclibc-menuconfig
make uclibc-update-config

the freshly configured settings from the menuconfig are lost during the
update-config step. This is because update-config depends on the configure
step, which starts by copying the config file to the build directory.

Instead, stop depending on the configure step from update-config, and
introduce a new stamp file .stamp_config_fixup_done, which applies any
fixups on the .config file.
An alternative solution would be to add a call to UCLIBC_FIXUP_DOT_CONFIG to
the relevant targets instead of depending on a new stamp file. The advantage
of the stamp file, though, is that we avoid redoing the fixup unnecessarily.
Moreover, in the light of the plan to extract the kconfig-specific bits into
a separate kconfig-package infrastructure, the stamp file rules are more
easily moved into such an infrastructure, while the alternative solution
requires the package .mk file to explicitly call the FIXUP rules which may
more easily be forgotten.

No longer depending on the configure step has the added bonus that
'uclibc-update-config' no longer needs the toolchain to be available, which
makes:
    make clean uclibc-menuconfig uclibc-update-config
much faster and user-friendly.

Additionally, make sure that 'make clean uclibc-update-config' works
properly, by depending on .stamp_config_fixup_done so that the config file
is present and fixed.

Fixes bug #7154 https://bugs.busybox.net/show_bug.cgi?id=7154

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 23:43:37 +02:00
Thomas De Schampheleire
c7b312ff41 uclibc: menuconfig: take into account initial settings from config file
When executing the sequence 'make clean uclibc-menuconfig', the configured
config file is not taken into account and one starts from the default
settings.

This patch adds an explicit target for the config file and lets the
configure and menuconfig steps depend on it, fixing the problem.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 23:43:04 +02:00
Thomas De Schampheleire
8f3c642413 uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG
In a subsequent patch, the behavior of UCLIBC_SETUP_DOT_CONFIG will change
so that it only applies fixups to the (already copied) configuration file.
This patch renames this function to UCLIBC_FIXUP_DOT_CONFIG to better match
the future behavior.

Suggested-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 23:42:52 +02:00
Alexey Brodkin
51e3820ff1 uclibc: build tests after uClibc libs are installed to staging location
If libuClibc is not installed to staging on attempt to build tests following
errors happen:

============
  TEST_LINK termios/ termios
.../host/usr/arc-buildroot-linux-uclibc/sysroot/usr/lib/crt1.o: In function `__start':
.../build/uclibc/libc/sysdeps/linux/arc/crt1.S:53: undefined reference to `__uClibc_main'
termios.o: In function `main':
.../build/uclibc/test/termios/termios.c:13: undefined reference to `printf'
.../build/uclibc/test/termios/termios.c:14: undefined reference to `printf'
.../build/uclibc/test/termios/termios.c:16: undefined reference to `stdout'
.../build/uclibc/test/termios/termios.c:16: undefined reference to `fileno'
.../build/uclibc/test/termios/termios.c:16: undefined reference to `ioctl'
.../build/uclibc/test/termios/termios.c:19: undefined reference to `perror'
.../build/uclibc/test/termios/termios.c:21: undefined reference to `printf'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `memcpy'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `malloc'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `abort'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `calloc'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `dl_iterate_phdr'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `realloc'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `memset'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `strlen'
.../host/usr/lib/gcc/arc-buildroot-linux-uclibc/4.8.0/../../../../arc-buildroot-linux-uclibc/lib/libgcc_s.so.1: undefined reference to `free'
collect2: error: ld returned 1 exit status
make[3]: *** [termios] Error 1
============

And the simplest solution is to build tests right before installation in
UCLIBC_INSTALL_TARGET_CMDS which follows UCLIBC_INSTALL_STAGING_CMDS so
all required libs are in place.

Interesting note - if one enables uClibc tests after initial full buildroot
build mentioned errors don't happen. This is because uClibc libc libs are
already installed to staging. That's why I didn't noticed this problem before.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 23:41:01 +02:00
Waldemar Brodkorb
edeee941c8 uclibc: fix networking support on sparc
While updating the default config for Sparc, I noticed that networking
is broken. The reason is a uClibc backport patch from uClibc
master. This commit adds a fix on top of it, which was submitted to
upstream uClibc.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 20:16:25 +02:00
Yann E. MORIN
822be87737 toolchain: include C libraries in legal-info
So far, the legal-info infrastructure was not exporting the legal
info for the C libraries. This is because the legal-info only acts
on packages defined in $(TARGETS).

But the C libraries are never added to $(TARGETS), since there is no
corresponding BR2_PACKAGE_<C-LIBRARY>.

This patch adds such symbols for the 4 C libraries we support in our
internal backend: uClibc, glibc, eglibc and musl.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-26 09:01:40 +02:00
Thomas Petazzoni
1aa42ad4ae make: bump to version 4.0
This commit bumps make to version 4.0. This version now uses fork(),
so it is no longer available on non-MMU platforms, which consequently
works around:

  http://autobuild.buildroot.org/results/2e1/2e1b11ccb501f1ab431c04435be52a6538d035cb/

The glob special options seem to no longer be needed, at least make
4.0 builds fine with both an ARM uClibc toolchain and an ARM glibc
toolchain.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-19 14:47:27 +02:00
Alexey Brodkin
8fa35b77f7 uclibc: fix tests building in uClibc 0.9.33.2
Following patches are required for successful bulding of uClibc built-int tests
(BR2_UCLIBC_INSTALL_TEST_SUITE=y):

1.
uclibc-0059-test-cater-for-config.patch
http://git.uclibc.org/uClibc/commit/test?id=7598eeaa1defa2884adaa890bb115c493d69cc35

2.
uclibc-0058-test-tls-fix-build-with-newer-binutils.patch
http://git.uclibc.org/uClibc/commit/test?id=931e8391565323ed2e589c83b83a7345813a5514

3.
uclibc-0060-test-Fix-math-c-dependency.patch
http://git.uclibc.org/uClibc/commit/test/math?id=a20a91ad7c042c46e4a2adee6d03315f857f9985

All mentioned patches must be removed as obsolete on bumping uClibc to the next
release.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-15 23:06:11 +02:00
Gustavo Zacarias
ddc67dad2c uclibc: don't install tools to staging when static
Don't try to install ld* tools to staging when it's a static build,
there's no point and it'll be broken once we build a purely-static
uclibc.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-15 20:52:15 +02:00
Thomas De Schampheleire
64b2db6a43 uclibc: replace custom kconfig helpers with those provided by pkg-utils
This patch removes the custom kconfig helpers UCLIBC_OPT_SET and
UCLIBC_OPT_UNSET with the common KCONFIG_SET_OPT, KCONFIG_ENABLE_OPT and
KCONFIG_DISABLE_OPT.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-15 19:19:04 +02:00
Thomas Petazzoni
1da3c9922b uclibc: remove BR2_UCLIBC_ARM_TYPE
The BR2_UCLIBC_ARM_TYPE was only used for uClibc 0.9.32 on ARM. Now
that only uClibc 0.9.33 is supported for ARM, there is no point in
keeping BR2_UCLIBC_ARM_TYPE, since the corresponding uClibc options no
longer exist.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-10 16:17:12 +02:00
Thomas Petazzoni
506b964df9 uclibc: remove version 0.9.32.1
This commit removes the 0.9.32.1 version of uClibc, which is very old,
and does not bring any specific advantage over 0.9.33, which has been
around for more than two years now.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-10 16:12:40 +02:00
Alexey Brodkin
4a530b6ed3 uclibc: disable parallel build for uClibc 0.9.31
This is only required for uClibc 0.9.31 and this veriosn is only used by
AVR32 so could be safely removed together with AVR32.

Even 0.9.32 builds well in parallel (at least on x86) so IMHO there's no need
in >= 0.9.33, just disable for a particular broken version.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-01 15:04:04 +02:00
Alexey Brodkin
8862ca3bc8 uclibc: enable parallel building of libraries
The use of MAKE1 for uClibc dates back 10 years:

commit 8e5fb3fb4a
Author: Eric Andersen <andersen@codepoet.org>
Date:   Sat Dec 11 13:01:10 2004 +0000

    Add initial BR2_JLEVEL support, with some exceptions for apps that
    have broken 'make -j' support

Since that time there were lots of improvements in uClibc that seem to allow
parallel building of libs finally.

Unfortunately uClibc tests have dependences on previously built files,
that's why tests left with MAKE1.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-29 13:20:07 +02:00
Gustavo Zacarias
f6c0085950 uclibc: add license information
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-06-26 17:07:11 +02:00
Alexey Brodkin
cde947f5f5 uclibc: prevent rebuilding after installation to staging
Currently we configure uClibc to use kernel headers from "staging" folder with
KERNEL_HEADERS="$(STAGING_DIR)/usr/include". This path is added to include
search path of uClibc build system in Rules.mak "CFLAGS += -I$(KERNEL_HEADERS)".

At the same time on uClibc installation to "staging" we point to the same
location "$(STAGING_DIR)/usr" (headers effectively go in "usr/include").

So after every installation to "staging" dependences get touched (even though we
copy the same headers every time) and so we may see lots of sources in uClibc
get rebuilt.

This has 2 consequences:
1. Longer build time - becase even on ordinary buildroot build uClibc is built
twice. On "uclibc building" and on "uclibc installation to target".

2. Symbols in libuClibc built initially (that is later installed in
"staging/sysroot") are situated with different offset compared to second build
(later copied in "target"). This happens because as described above only part
of sources get rebuilt and then on final linkage object files are linked in
different order.

And (2) leads to problems on remote rebugging: gdbserver reports offsets that
correspond to pointless assembly in libuClibc on host.

Here's how it looks like.

Before this patch:
$ cd ~/br2_output/i586/target/lib
$ i586-buildroot-linux-uclibc-readelf -s libuClibc-0.9.33.2.so | grep kill
   423: 0000c42c    54 FUNC    GLOBAL DEFAULT    7 kill

$ cd ~/br2_output/i586/staging/lib
$ i586-buildroot-linux-uclibc-readelf -s libuClibc-0.9.33.2.so | grep kill
   423: 0000b518    54 FUNC    GLOBAL DEFAULT    7 kill

After this patch:
$ cd ~/br2_output/i586/target/lib
$ i586-buildroot-linux-uclibc-readelf -s libuClibc-0.9.33.2.so | grep kill
   423: 0000b518    54 FUNC    GLOBAL DEFAULT    7 kill

$ cd ~/br2_output/i586/staging/lib
$ i586-buildroot-linux-uclibc-readelf -s libuClibc-0.9.33.2.so | grep kill
   423: 0000b518    54 FUNC    GLOBAL DEFAULT    7 kill

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Noam Camus <noamc@ezchip.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-06-17 20:40:23 +02:00
James Hogan
54ba2704b0 uclibc: add patches to fix MIPS __SIGRTMAX and SIG127
Add two uClibc 0.9.33.2 patches which fix issues relating to high signal
number handling on MIPS.

The first patch (0056) fixes _NSIG (and as a result __SIGRTMAX) to match
glibc. This fixes GDB on MIPS with uClibc, which cannot handle
__SIGRTMAX == 128 and emits the error:
GDB bug: target.c (gdb_signal_from_host): unrecognized real-time signal
This patch is from uClibc commit 2da958760f79 (MIPS: set _NSIG to
128, not 129. This matches glibc.) and applies without conflicts.

The second patch (0057) fixes the wait status macros to correctly
interpret status 0x007f on MIPS (other arches don't have signal 127).
This patch is from uClibc commit 4a96b9486871 (bits/waitstatus.h:
correctly interpret status 0x007f on MIPS) and applies without
conflicts.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-09 11:27:04 +02:00
James Hogan
d712a018dd uclibc: add patch to fix arch specific eventfd defs
Add uClibc 0.9.33.2 patch to fix arch specific eventfd definitions,
particularly EFD_NONBLOCK. The definition in sys/eventfd.h was 04000
(0x800), however MIPS uses 0200 (0x80). This resulted in QEMU built for
MIPS hanging at various points until input is received due to a blocking
poll of stdin.

The patch is a backport of uClibc commit fd355bc1dbcb (eventfd.h: Use
new "bits/" scheme for arch-specific flags). The only conflict was minor
in Makefile.in.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-09 11:26:23 +02:00
Baruch Siach
c28a679080 uclibc: fix build without LARGEFILE for xtensa
The default uClibc version for xtensa is broken when LARGEFILE is disabled.
Add a patch to fix this.

Reported-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-06-03 09:17:29 +02:00
Baruch Siach
b9ebf97f9b uclibc: remove unused patch
Since commit c31d5bfdec (uclibc: arc: bump to arc-4.8-R3 release) uClibc
version f37101d94284 is no longer used for ARC. Remove a version specific
patch.

Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-06-03 09:16:47 +02:00
Gustavo Zacarias
befab216a2 arch/arm: drop ARM(7TDMI/720T/740T) support
The toolchain currently doesn't build for nommu ARM and is in need of
serious work.
Problem is there are no emulation targets and real ARM(7TDMI/720T/740T)
hardware that's capable of running linux (enough memory, having a
memory controller...) is VERY rare and uses very old versions to
make it usable.

The ARM nommu focus should go into Cortex M series processors that are
obtainable at reasonable cost on modern hardware that has external
memory controllers.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-08 16:53:49 +02:00
Bernd Kuhls
affb6a3853 arch: add support for "corei7" Intel CPU optimisations
gcc support was added in version 4.6:
http://gcc.gnu.org/gcc-4.6/changes.html

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 03:39:29 +02:00
Thomas De Schampheleire
be6a575d2c uclibc: re-add uclibc-update-config target
Commit a5e92d92e7 converted uClibc to the
package infrastructure, but while doing so removed support for the
documented uclibc-update-config make target. This make target copies the
uclibc .config file back to the original (typically version-controlled)
configuration file.

As this was an unintentional removal, this patch re-adds the
uclibc-update-config target.

Reported-by: Dan Moulding <dan.moulding@rackwareinc.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-01 23:36:30 +02:00
Anton Kolesov
485a55c9d6 uclibc: arc: bump to 8af9dc8
This will resolve uClibc build error for configurations without large file
support.

Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-01 22:48:04 +02:00
Anton Kolesov
c31d5bfdec uclibc: arc: bump to arc-4.8-R3 release
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-04-29 23:14:04 +02:00
Max Filippov
1b1b8fbca7 uclibc: add missing .literal_position directives
This allows building uclibc with -mtext-section-literals flag.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-03 21:35:08 +02:00
Peter Seiderer
57682973d4 uclibc: fix ARC compile
Add patch [1,2] to fix ARC uclibc snapshot compile (as suggested by
Baruch Siach [3]).

Fixes ARC uclibc compile failure ([4]) posix_fadvise/off64_t related.

[1] http://thread.gmane.org/gmane.comp.lib.uclibc.general/23714
[2] http://patchwork.ozlabs.org/patch/308533/mbox/
[3] http://lists.busybox.net/pipermail/buildroot/2014-March/092512.html
[4] http://lists.busybox.net/pipermail/buildroot/2014-March/092506.html

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-29 18:34:10 +01:00
Fabio Porcedda
b94266c925 Remove "dirs" dependencies
The package infrastructure add automatically the "dirs" dependency so
remove it when the package infrastructure is being used.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-03-27 23:32:15 +01:00
Peter Korsgaard
b108fdcb83 Merge branch 'next'
Conflicts:
	Makefile
	package/dmraid/Config.in
	package/gdb/Config.in.host
	package/linux-headers/linux-headers.mk
	package/python/python.mk
	package/python3/python3.mk
	package/rt-tests/Config.in
	package/sdl/sdl.mk
	package/systemd/systemd-01-fix-getty-unit.patch
	package/systemd/systemd-02-fix-page-size.patch
	package/systemd/systemd-03-uclibc-fix.patch
	package/udev/Config.in
	package/udisks/Config.in
	package/vlc/vlc.mk
	system/Config.in

Quite some merge conflicts, hopefully I didn't screw up anything.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-28 14:30:23 +01:00
Thomas Petazzoni
c64f948d2c toolchain: introduce a toolchain knob for NPTL
As our architecture support expands to a number of architectures that
do not implement NPTL threading, and the number of packages that
depend on NPTL specific features, it has become necessary to be able
to know whether the toolchain has NPTL support or not.

This commit adds a new BR2_TOOLCHAIN_HAS_THREADS_NPTL hidden Config.in
option that allows packages to know whether NPTL is available or not.

This hidden option is:

 * Automatically enabled when glibc/eglibc or musl toolchains are
   used, either internal or external.

 * Automatically enabled when an internal uClibc toolchain with NPTL
   support is configured. It is left disabled otherwise for internal
   uClibc toolchains.

 * Configured according to a visible Config.in option for custom
   external uClibc toolchains.

[Peter: factor _EXTERNAL_HAS_THREADS in single if as suggested by Arnout]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-22 23:39:01 +01:00
Thomas De Schampheleire
a25df76b39 uclibc: copy config file from configure iso patch step
The three typical packages that use .config files in buildroot copy the
config file at different times in the build process:

    busybox copies its .config from the post-extract hook.
    linux copies its .config in the configure_cmds.
    uclibc copies its .config from the post-patch hook.

Copying the .config file from the configure step is the only way to properly
support an OVERRIDE_SRCDIR that does not yet have the .config file, because
the extract and patch steps are skipped in that case.

In a previous patch, the situation was already fixed for busybox. This patch
applies the same fix to uclibc: copy the config file from the configure
step, as linux is doing.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-14 21:36:51 +01:00
Fabio Porcedda
6c5c08b854 package: add support for top-level parallel make
To be able to use top-level parallel make we must not depend in a rule
on the order of evaluation of the prerequisites, so instead of relying
on the left to right ordering of evaluation of the prerequisites add
an explicit rule to describe the dependencies.

We cannot use the pattern rules because they must have the same
dependency for every package, but we need to change the dependencies
depending on $(2)_OVERRIDE_SRCDIR variable value, so we must use a
more flexible way like $(2)_TARGET_% variables.

So add explicit dependencies for the following stamp files:
  $(2)_TARGET_EXTRACT
  $(2)_TARGET_PATCH
  $(2)_TARGET_CONFIGURE
  $(2)_TARGET_BUILD
  $(2)_TARGET_INSTALL_STAGING
  $(2)_TARGET_INSTALL_TARGET
  $(2)_TARGET_INSTALL_IMAGES
  $(2)_TARGET_INSTALL_HOST

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-14 21:08:45 +01:00
Fabio Porcedda
b2fd9f90e2 package: add toolchain dependency to every target package
This commit makes the dependency from the target toolchain explicit.
This way we can buid from command line a package that use
inner-generic-package right after the configuration phase, example:

	make clean <package-name>

Also remove TARGETS_ALL because the only purpose was to add toolchain
dependency so it's superseded by this commit.

To prevent circular dependency add the new variable
<pkgname>_ADD_TOOLCHAIN_DEPENDENCY to avoid adding the toolchain
dependency for toolchain packages.

This is also a step forward supporting top-level parallel make.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-14 21:08:35 +01:00
Anton Kolesov
3fd6918b8b uclibc: arc: bump to git commit f37101d
Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-13 22:13:29 +01:00
Jerzy Grzegorek
7bb2997280 uclibc/Config.in: indentation cleanup
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-06 23:11:27 +01:00
Thomas Petazzoni
e543f5a104 arch: remove sh2, sh3 and sh3eb support
This patch removes the sh2, sh3 and sh3eb support, because the user
base is inexistent, and the Linux support for these architectures is
poor. The sh2a support is preserved, because at least one user
expressed interest in this architecture, and is actually using it:

  http://lists.busybox.net/pipermail/buildroot/2013-April/070399.html

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-05 12:05:58 +01:00
Peter Korsgaard
4ed1dc6616 uClibc: 0.9.33.2: revert pread/pwrite patches from upstream git
The pread/pwrite handling on the 0.9.33 branch doesn't take into
consideration architectures with an ABI requiring natural alignment for
64bit arguments (afaik ARM EABI, MIPS O32, PPC, SH and Xtensa), causing
havoc.

The issue has been brought with the uClibc developers, but so far a fix is
not available - So lets revert the patches for now as they cause real
issues.

For further details, see:

http://lists.busybox.net/pipermail/buildroot/2014-January/087050.html

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-05 09:21:57 +01:00
Thomas Petazzoni
26cdb3568c uclibc: fix sh2a option definition
The uClibc options for sh2a is SH2A, not SHA2, and this value should
be used for sh2a, not sh2.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-04 15:25:52 +01:00
Yann E. MORIN
bbb1e7ae21 package/uClibc: ensure .config is writable
If $(UCLIBC_CONFIG_FILE) is read-only (eg. because Buildroot's
source dir is), the sed fixups to .config fail.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
[yann.morin.1998@free.fr: use $(INSTALL) instead of cp]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-28 22:56:40 +01:00
Baruch Siach
f2ec222ffa uclibc: bump xtensa snapshot version
This new version includes two xtensa fixes:

00571b43df2e libc: posix_fadvise: restore implementation for xtensa
de6561f66693 xtensa: use common ptrace.h

The first fixes (correctly)
http://autobuild.buildroot.net/results/ab1/ab1250c3d402ec3fbaf22eeffd07de218ffafb22/.

The second fixes
http://autobuild.buildroot.net/results/84f/84fb918efbcbf1312a228a9c11608edf096b3c40/.

The unifdef regression (the original motivation for the fixed xtensa snapshot
version introduced in commit cecaf09cd6) should now be fixed.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-20 22:33:44 +01:00
Noam Camus
e090aeaa87 uclibc: fix STRIP_none handling
It was with reversed logic

Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-15 14:11:05 +01:00
Baruch Siach
70de2d0128 uclibc: snapshot: add BSD obsolete signal functions
Fixes
http://autobuild.buildroot.net/results/70b/70b79ca0aa97ed451a5679029955ed3709c84b67/.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-11 00:09:44 +01:00