Commit Graph

309 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Paul Spooren eda3da56a6 toolchain: add PKG_RELEASE if local files
The toolchain packages partly contain local code like patches and
configuration files. These files are not tracked via PKG_VERSION as this
variable only covers the upstream package version.

To allow versioning of the buildsystem, this commit adds PKG_RELEASE:=1
to all toolchain packages with local files. Whenever a local file is
changed the release must be increased.

This does not touch binutils and gcc for now, as these provide multiple
versions within one package.

Also update the copyright of touched files to 2020.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[exclude binutils/gcc from patch, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
protonesso d018b55a18 update uClibc-ng from 1.0.30 to 1.0.31
Signed-off-by: protonesso <nagakamira@gmail.com>
5 years ago
Evgeniy Didin 83e9262703 uClibc-ng: update to 1.0.30
uClibc-ng 1.0.28 does not provide PF_VSOCK/AF_VSOCK definitions,
which causes iproute2 v4.16.0 compile errors.
In commit 57f2f80383b5 ("bits/socket.h: add missing defines")
necessary defines were included and iproute2 builds fine.
This commit now is part of uClibc-ng 1.0.30.
Lets update uClibc-ng to latest 1.0.30 version.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
6 years ago
Evgeniy Didin 53021ce7f2 uClibc-ng: update to 1.0.28
Lets update uClibc-ng to 1.0.28 version for compatibility with gcc 7.x.

Since 1.0.22 there were significant patches for compatibility with gcc 7.x:
 https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=5b0f49037e8ea8500b05c8f31ee88529ccac4cee
 https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=cee0b058fa0b4501b289a2da365182d60314d746

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
CC: Alexey Brodkin <abrodkin@synopsys.com>
CC: John Crispin <john@phrozen.org>
6 years ago
Alexey Brodkin a3408a5271 toolchain/uclibc: Bump version to 1.0.22
Important change was made in 1.0.18: all sub-libs were merged
in one and only libc similarly to musl.

See [1] for more details.

To support that we had to remove refences to those sub-libs like
libpthread, libcrypt, libdl, libm, libutil etc.

[1] http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=29ff9055c80efe77a7130767a9fcb3ab8c67e8ce

Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
7 years ago
Alexey Brodkin eed6c85b7f toolchain/uclibc: Fix unmanned configuration with "V=s"
Currently on attempt to configure uClibc with "V=s" user is prompted
to answer on configuration questions. Major inconvenience here is
build procedure get paused until user answers all questions.
That happens because not all symbols are defined in our .config.

Solution is as simple as usage of "olddefconfig" target instead of
simple "oldconfig". In that case default values get silently set
for symbols not defined by our .config explicitly.

We haven't noticed that subtle issue before because without "V=s"
what we do is "make oldconfig < /dev/null" which automatically
answers all questions :)

Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
7 years ago
Felix Fietkau 38fcd2a865 build: remove libc version config code
We only support one version per libc type

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jo-Philipp Wich 46b02131d7 Revert "uClibc-ng: update to 1.0.21"
This reverts commit dde5c729ec.

The uClibc update was completely untested, does not build with Kernel 4.4 and
did not adjust the configuration to predeclare new config symbols.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Etienne Haarsma dde5c729ec uClibc-ng: update to 1.0.21
Signed-off-by: Etienne Haarsma <bladeoner112@gmail.com>
7 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Florian Fainelli c8e68150bf toolchain: Rework external toolchain libc selection
Make it a choice menu which offers the 3 C libraries we know about: glibc,
uClibc and musl. While at it, make it possible for the external toolchain libc
to select USE_GLIBC, USE_UCLIBC or USE_MUSL which is used by several packages
to conditionally include specific CFLAGS (e.g: iproute2).

Because USE_GLIBC et al. can now be selected by external toolchains, we need to
restrict the per-libc menus to check on !EXTERNAL_TOOLCHAIN.

While at it, make musl the default C library for external toolchain to match
the internal toolchain.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Matthias Schiffer 77f54eae45
config: enable shadow passwords unconditionally
Configurations without shadow passwords have been broken since the removal
of telnet: as the default entry in /etc/passwd is not empty (but rather
unset), there will be no way to log onto such a system by default. As
disabling shadow passwords is not useful anyways, remove this configuration
option.

The config symbol is kept (for a while), as packages from feeds depend on
it.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Stijn Tintel c14485d41a toolchain/uClibc: add missing config symbol
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
8 years ago
Felix Fietkau 74c9b9cfeb toolchain: skip gcc/minimal for musl
No extra libc header build step is done, so no extra toolchain is needed
for preparing it.
This saves a significant amount of build time and disk space

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Alexey Brodkin 0c920e3281 toolchain: uClibc: Bump to the most recent version 1.0.14
This change updates uClibc version to the most recent 1.0.14 release.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
8 years ago
Hauke Mehrtens 336ad4c9aa toolchain/uClibc: enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
This is required to build net-snmp.

If that options is disabled in uClibc then net-snmp doesn't
detect sighold support on its configuration stage and so
defines HAVE_SIGHOLD as 0. That in its turn causes compilation of
the following branch of timerPause() in apps/snmpnetstat:
------------------>8----------------
    int             oldmask;
    oldmask = sigblock(sigmask(SIGALRM));
    if (!signalled) {
        sigpause(0);
    }
    sigsetmask(oldmask);
------------------>8----------------

Now in uClibc all 3 sigblock(), sigmask() and sigsetmask()
were removed back in 2005, see:
https://git.busybox.net/uClibc/commit/?id=5aa7aa7fa7ec2a0fe567ac0b2595b46add6f3594

And all that causes net-snmp linkage to fail this way:
------------------>8----------------
.libs/if.o: In function `intpr':
if.c:(.text+0x908): undefined reference to `sigmask'
if.c:(.text+0x90e): undefined reference to `sigblock'
if.c:(.text+0x924): undefined reference to `sigsetmask'
------------------>8----------------

If we enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL in uClibc then
branch with sighold is used in timerPause() and everything builds as
expected.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49178
8 years ago
John Crispin 7b821a5ae8 toolchain: add support of ARCv2 architecture
This change adds support of ARC ISAv2 processors in
OpenWRT toolchain.

In general gcc for ARC may compile code for both ISA versions
simultaneously but libgcc will be built only for default
architecture that's why it's necessary to specify --with-cpu
on gcc configuration.

As for uClibc we need to use different configurations for
different ARC ISAs.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: Jo-Philipp Wich <jow@openwrt.org>
Cc: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 48739
8 years ago
Felix Fietkau e4d186b109 uClibc-ng: update to 1.0.9
Update to 1.0.9, switch to XZ tarball.

Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>

SVN-Revision: 47715
9 years ago
Felix Fietkau 8b5d644bb3 toolchain: add support of ARC architecture
This includes binutils, gcc, gdb and uClibc-ng.

Latest release of ARC gcc (as of today it is "arc-2015.06")
is based on upstream gcc 4.8.4.

Sources are available on GitHub, see:
https://github.com/foss-for-synopsys-dwc-arc-processors/gcc

Latest release of ARC binutils (as of today it is "arc-2015.06")
is based on upstream binutils 2.23.

Sources are available on GitHub, see:
https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06

Latest release of ARC GDB (as of today this is "arc-2015.06-gdb")
is based on upstream gdb 7.9.1.

Sources are available on GitHub, see:
https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb

Note that for binutils and gdb that come from unified git repository
(which is the case for upstream binutils/gdb today) we need to disable
building of gdb in binutils and binutils in gdb hence in binutils:
------>8------
--disable-sim
--disable-gdb
------>8------

and in gdb:
------>8------
--disable-binutils
--disable-ld
--disable-gas
------>8------

Also in gdb we disable sim because if the following breakage while
building with it:
------------>8------------
/usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \
        -mono -fast -pbb -switch sem5-switch.c \
        -cpu a5f -infile ./mloop5.in \
        -outfile-suffix 5
unknown option: bash
Makefile:699: recipe for target 'stamp-5mloop' failed
make[7]: *** [stamp-5mloop] Error 1
------------>8------------

Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Cc: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

SVN-Revision: 47438
9 years ago
Felix Fietkau 014194de60 uclibc: remove version 0.9.33
Latest uClibc-ng is now the only supported option

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47357
9 years ago
Felix Fietkau 02df774b52 uclibc-ng: bump version from 1.0.6 to 1.0.8
2 new architectures were added in between 1.0.6 and 1.0.8 in uClibc-ng,
these are:
 * lm32
 * or1k

Even thought both are not yet supported in OpenWRT it's important to
disable them both in default config file otherwise user prompt will
appear during uClibc configuration asking to select desired
architecture.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Waldemar Brodkorb <wbx@uclibc-ng.org>
Cc: Mathieu Olivari <mathieu@codeaurora.org>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>

SVN-Revision: 47356
9 years ago
John Crispin b49cbdff6e uClibc: enable xattr support to make feature sets of libc implementations closer to each other
Size increase is about 3-4k: this is how big xattr.os in uClibc after stripping is.

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>

SVN-Revision: 47271
9 years ago
Felix Fietkau 57a70e8a64 toolchain/uClibc: add support of uClibc-ng
uClibc-ng is a spin-off of original uClibc, see http://www.uclibc-ng.org/

We try to regularly add changes from uClibc to uClibc-ng.
We even sent patches and bug reports to the uClibc mailing list.
The config file is compatible between uClibc-ng 1.0 and uClibc git master.
This might change in the future.

Our main goal is to provide regularly a stable and tested release
to make embedded system developers happy.

The main advantage of uClibc-ng over olde good uClibc is regular releases
so there's no need to keep tons of patches on top of years old
0.9.33.2

Build-tested for
 [1] ARM: Sunxi generic
 [2] MIPS: Netgear WNDR3600/3700/3800

Run-tested for [yet out of the tree] Synopsys Designware ARC AXS101.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Waldemar Brodkorb <wbx@uclibc-ng.org>
Cc: Mathieu Olivari <mathieu@codeaurora.org>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>

SVN-Revision: 47077
9 years ago
Jonas Gorski 2086f7284c uclibc: fix _HAS_SSP replacement regex
A dot was dropped, making it match too much.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46116
9 years ago
Steven Barth 2fb09857e1 uclibc: unbreak after enabling SSP
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46034
9 years ago
Felix Fietkau f0150c65d0 uClibc: elf: Add STT_GNU_IFUNC from glibc
perf in upstream Linux kernel 3.17 onwards expects STT_GNU_IFUNC
replicate it from glibc

Patch cherry-picked from:
http://lists.busybox.net/pipermail/uclibc/2015-February/048825.html

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45752
9 years ago
John Crispin 6ab2bcfe72 uClibc: add signal info for seccomp related SIGSYS
uClibc doesn't define signal info for the SIGSYS signal which is issued
in case of hitting a syscall prohibited by seccomp.
This is sad as it makes debugging seccomp filter policies impossible on
some architectures (at least ARM and PowerPC, maybe also others) which
do not coincidentally set si_value.sival_int as the syscall number.

To fix this, import the definitions and macros needed from glibc.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 45720
9 years ago
Nicolas Thill 6a5a7db085 uClibc: backport sync_file_range fixes (closes: #19350)
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 45249
9 years ago
Felix Fietkau 4ecc5c8ffe uclibc: backport an upstream i386 syscall fix
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45137
9 years ago
Felix Fietkau b97c3b0249 uClibc: add another missing backport patch
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45102
9 years ago
Felix Fietkau 19150d393d toolchain/uClibc: backport madvise and fallocate (fixes #19336)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45100
9 years ago
John Crispin 384eb8ce7d uclibc: add LD_PRELOAD support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45004
9 years ago
Felix Fietkau 793a451584 toolchain: remove obsolete references to the cris architecture
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44964
9 years ago
Felix Fietkau 3a52795531 uClibc: remove avr32 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44961
9 years ago
John Crispin 0e6ecf707d uClibc: fix syscall() for syscalls with 6 arguments on PowerPC
Patch from the uClibc master.

Fixes the package fastd on PowerPC.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 44694
9 years ago
John Crispin 491f3fc048 Support for building an hardened OpenWRT
Introduce configuration options to build an "hardened" OpenWRT.

Options to enable Stack-Smashing Protection, FORTIFY_SOURCE and RELRO
have been introduced.

uClibc makefile now automatically detects if SSP support is necessary.

hostapd makefile has been fixed to use "^" as sed separator since
using a comma was problematic when using "-Wl,-z,now" and the like in
TARGET_CFLAGS.

Currently enabling SSP on user space depends on enabling SSP kernel
side, this is due to the fact that TARGET_CFLAGS are used to build
kernel modules (at least). Suggestions on how to avoid this are welcome.
Using "select" instead of "depends on" doesn't seem to work with choice
entries.

Tested with a lantiq (WBMR) router, GCC 4.8, uClibc and a subset of
the available packages.
Needs to be tested with GCC 4.9 and the remaining packages.
PIE not currently included.

Signed-off-by: Alessandro Di Federico <ale+owrt@clearmind.me>

SVN-Revision: 44005
9 years ago
Felix Fietkau b2bdea8ad4 uClibc: fix ptrace header files for powerpc
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43617
10 years ago
Felix Fietkau 309cdd6101 toolchain: uClibc: fix compile with full language support enabled (fixes #13095)
When building with CONFIG_BUILD_NLS=y, uClibc fails to compile with following
message (or similar, according to https://dev.openwrt.org/ticket/13095):

-snip-
...
Warning: adding UNDEFINED entry for ar_AE
Warning: adding UNDEFINED entry for am_ET
Warning: adding UNDEFINED entry for af_ZA
grep "^#define" extra/locale/locale_tables.h > extra/locale/lt_defines.h
grep "^#define __lc" extra/locale/locale_collate.h >> extra/locale/lt_defines.h
gcc extra/locale/gen_wctype.c  -o extra/locale/gen_wctype    -Os -Wall  -D__UCLIBC_GEN_LOCALE -I./
extra/locale/gen_wctype.c: In function 'main':
extra/locale/gen_wctype.c:684:2: warning: #warning fix the upper bound on the upper/lower tables... save 200 bytes or so [-Wcpp]
for locale in  en_US en_GB; do \
                extra/locale/gen_wctype  $locale > extra/locale/wctables.h || \
                extra/locale/gen_wctype  $locale.UTF-8 > extra/locale/wctables.h || \
                extra/locale/gen_wctype  $locale.iso8859-1 > extra/locale/wctables.h && break; \
        done
make[4]: *** [extra/locale/wctables.h] Error 1
-snap-

This seems to also depend on the host system used, e.g. running a fresh
checkout on a Debian 7.6 system triggered this error, while running the
very same stuff on an Ubuntu 12.10 Quantal Quetzal does not trigger it.

This is the configuration I used:

-snip-
buildbot@buildbot:~/openwrt-nls.git$ scripts/diffconfig.sh
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_Default=y
CONFIG_DEVEL=y
CONFIG_BUILD_NLS=y
CONFIG_DOWNLOAD_FOLDER="/srv/downloads/downloads"
-snap-

In the ticket mentioned above, a patch is referenced which solves this issue.

Note, that this issue is also present on 14.07.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 43446
10 years ago
Felix Fietkau 3f130f7a45 toolchain: uClibc: fix build with CONFIG_BUILD_NLS selected
Without this patch, selecting "Compile with full language support"
results in the following question during build:

...
Locale Support (UCLIBC_HAS_LOCALE) [Y/n/?] y
  Locale data
  > 1. All locales (UCLIBC_BUILD_ALL_LOCALE) (NEW)
    2. Only selected locales (UCLIBC_BUILD_MINIMAL_LOCALE) (NEW)
    3. Use Pre-generated Locale Data (UCLIBC_PREGENERATED_LOCALE_DATA) (NEW)
  choice[1-3]:

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 43445
10 years ago
John Crispin 70be73e153 uClibc: Backport uClibc master git commit fd355bc1dbcb794ae1abf0fad1459e28d8567ba0 (eventfd.h: Use new "bits/" scheme for arch-specific flags)
This patch adds missing architecture-specific headers for use with
eventfd(2). Fixes #16679.

Signed-off-by: Luis Dallos <ld@nkvd.ignorelist.com>

SVN-Revision: 42916
10 years ago
Felix Fietkau 7a324ed4c1 uClibc: fix copy&pasted typo in the stat fix
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41573
10 years ago
Felix Fietkau ded4c0675d uClibc: add a whole bunch of mips64 related fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41570
10 years ago
Felix Fietkau 171211c29f uClibc: add a patch to reduce vasprintf allocation size (fixes #13024)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40774
10 years ago
Luka Perkov deec514607 uClibc: backport mount.h update
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 40009
10 years ago
Felix Fietkau 8bd7e0b19b uClibc: Fix lookup with DNS search in multi-threaded application.
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>

SVN-Revision: 39179
10 years ago
Felix Fietkau c4b013f00b uClibc: make res_init() thread safe
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>

SVN-Revision: 39178
10 years ago
Felix Fietkau 8cabffaa3b uClibc: Fix threaded use of res_ functions.
This patch moves res_init() back above #undef _res. It fixes dns resolving issue in OpenWrt
(uClibc related - OpenWrt ticket #11929). It is a backport from uClibc master.

Further details are there:
http://git.uclibc.org/uClibc/commit/libc/inet/resolv.c?id=20b69920b299585265eb100d0b67e1097ccb1092

Signed-off-by: Jiri Slachta <slachta@cesnet.cz>

SVN-Revision: 39177
10 years ago
Felix Fietkau cc304329b3 uClibc: disable sha256 and sha512 for libcrypt - saves about 13k uncompressed in libcrypt
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39105
11 years ago
Imre Kaloz 61ad6831d3 replace the mips64 fixes patch with an upstream commit
The current one broke all other 64 bit targets.. DOH!

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 38889
11 years ago
Felix Fietkau edc8ac6246 uClibc: Deactivate oversized thread stack cache
A small system like the common home router doesn't have 40 MiB per process for
a dirty stack cache. This can easily lead to an overbooking OOM problem and
caused a lot of hangs+reboots on 32 MiB systems running nodogsplash.

Not using a stack cache can increase the time to spawn new threads. This is
hopefully no problem for system not running a lot of parallel computations.

Signed-off-by: Sven Eckelmann <sven@open-mesh.com>

SVN-Revision: 38851
11 years ago