Commit Graph

38 Commits (4a6795409d1520fd3da3e909a8bcf9d7fd0927bb)

Author SHA1 Message Date
Chen Minqiang a57fb86d6a toolchain: glibc ldd env path fixup
This replace the shell script header of ldd
when it install to `/usr/bin/ldd` where
`#! /..../staging_dir/host/bin/bash`
should be
`#!/bin/sh`

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
4 years ago
Ian Cooper b933f9cf0c toolchain: remove gcc libssp and use libc variant
Removes the standalone implementation of stack smashing protection
in gcc's libssp in favour of the native implementation available
in glibc and uclibc. Musl libc already uses its native ssp, so this
patch does not affect musl-based toolchains.

Stack smashing protection configuration options are now uniform
across all supported libc variants.

This also makes kernel-level stack smashing protection available
for x86_64 and i386 builds using non-musl libc.

Signed-off-by: Ian Cooper <iancooper@hotmail.com>
4 years ago
Yousong Zhou 69b9f0161e toolchain: gcc: enable sanitizers for glibc toolchain
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years ago
Luiz Angelo Daros de Luca 0d0617ff14 musl: ldso/dlsym: fix mips returning undef dlsym
This happens only the second time a library is loaded by dlopen().
After lib1 is loaded, dlsym(lib1,"undef1") correctly resolves the undef
symbol from lib1 dependencies. After the second library is loaded,
dlsym(lib2,"undef1") was returning the address of "undef1" in lib2
instead of searching lib2 dependencies.

Using upstream fix which now uses the same logic for relocation time
and dlsym.

Fixes openwrt/packages#9297

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
5 years ago
Eneas U de Queiroz c47eff0df3 libs/toolchain: remove eglibc remnant file
This removes package/libs/toolchain/eglibc-files/etc/nsswitch.conf.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years ago
Jo-Philipp Wich 0e70f69a35 treewide: revise library packaging
- Annotate versionless libraries (such as libubox, libuci etc.) with a fixed
  ABI_VERSION resembling the source date of the last incompatible change
- Annotate packages shipping versioned library objects with ABI_VERSION
- Stop shipping unversioned library symlinks for packages with ABI_VERSION

Ref: https://openwrt.org/docs/guide-developer/package-policies#shared_libraries
Ref: https://github.com/KanjiMonster/maintainer-tools/blob/master/check-abi-versions.pl
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Julien Dusser 241e6dd3e9 build: cleanup SSP_SUPPORT configure option
Configure variable SSP_SUPPORT is ambiguous for packages (tor, openssh,
avahi, freeswitch). It means 'toolchain supporting SSP', but for toolchain
and depends it means 'build gcc with libssp'.

Musl no longer uses libssp (1877bc9d8f), it has internal support, so
SSP_SUPPORT was disabled leading some package to not use SSP.

No information why Glibc and uClibc use libssp, but they may also provide
their own SSP support. uClibc used it own with commit 933b588e25 but it was
reverted in f3cacb9e84 without details.

Create an new configure GCC_LIBSSP and automatically enable SSP_SUPPORT
if either USE_MUSL or GCC_LIBSSP.

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
6 years ago
Florian Fainelli c258bc781f toolchain: Package libgomp
Some external toolchains may be configured to enable OpenMP. Provide a
package for these libraries which can be used by other packages.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Hauke Mehrtens b6a8b43dd2 toolchain: add musl libc.so to external toolchain
musl provides a /lib/libc.so file which should be integrated into the libc
package when the external toolchain with musl is used.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Florian Fainelli 7f0c95a7df toolchain: Allow external toolchains to specify libthread-db
We need to let external toolchains be able to specify the path and
specification file to the libthread-db POSIX thread debugging shared
libraries.

This fixes GDB not being able to be installed because it is depending on
libthread-db:

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies
 * for gdb:
 *      libthread-db *
 * opkg_install_cmd: Cannot install package gdb.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 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
Florian Fainelli 200d932322 toolchain: Broaden the executable loader pattern
Some toolchains will produce executables with an interpreter that is e.g:
ld.so.1 (typically a symbolic link). Due to our current LIBC_SPEC_FILE value,
we would not be able to copy this symbolic link/file over to the rootfs and
executables would fail to load. Extend the search pattern to include all
ld*.so* files that could be needed.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Florian Fainelli 493b0f3f57 toolchain: Force installation into /lib
For 64-bit capable systems, a symbolic link is set up for /lib64 to point to
/lib, so make sure the installation goes into /lib, irrespective of where the C
library files come from in an external toolchain.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 9531e0fce5 package: fix toolchain ipk flags
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 9e04019024 package: flag essential components as nonshared
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 64da662a88 toolchain/glibc: remove obsolete versions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48780
8 years ago
Felix Fietkau 1981ee7d75 toolchain: Reverse glibc/eglibc conditionals to check for eglibc
This will make adding future glibc versions easier because the
conditionals won't have to be modified again.

Signed-off-by: Michael Marley <michael@michaelmarley.com>

SVN-Revision: 48399
8 years ago
Felix Fietkau f6e4badfe4 toolchain: Add glibc 2.22
Signed-off-by: Michael Marley <michael@michaelmarley.com>

SVN-Revision: 48383
8 years ago
Felix Fietkau 79e14650e0 toolchain: remove obsolete relinking code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47445
9 years ago
Felix Fietkau f7939f5e74 gcc: remove version 4.6, it is no longer needed
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47443
9 years ago
Felix Fietkau 6aba44bfe0 toolchain: drop obsolete references to the coldfire target
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44975
9 years ago
Felix Fietkau 512066dba4 toolchain: remove obsolete checks for avr32
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44963
9 years ago
John Crispin 3e2f578353 toolchain: The glorious return of glibc, ver 2.21
It's the eglibc packaging with a bit of spit-polishing. And testing. :-)

[blogic: merged glibc and eglibc into 1 and made eglibc a glibc variant]

Signed-off-by: Jeff Waugh <jdub@bethesignal.org>
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44701
9 years ago
John Crispin 09a08fb9e6 toolchain: Add libatomic when using external toolchain
Otherwise libatomic cannot be used in conjunction with external toolchains.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 43998
9 years ago
Felix Fietkau d54e759611 toolchain: do not include libatomic.so in the libc package
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43699
10 years ago
Felix Fietkau 0636bb43ae toolchain: disable libatomic for gcc 4.6
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43623
10 years ago
Jonas Gorski 4b16b90152 toolchain: musl: fix symlink for ldd
ld-musl-*.so* is a symlink "broken" for the hostsystem, so wildcard
will skip it, causing LD_MUSL_NAME to empty and the ldd symlink pointing
to ../../lib directly.
This causes sysupgrade failing to copy any linked libaries and
consequently failing to run anything after switching to ram disk.

Fix this by creating a symlink directly pointing to where ld-musl-*.so*
points to.

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

SVN-Revision: 43314
10 years ago
Nicolas Thill f4417f7ad8 package/*: replace occurences of 'ln -sf' to '$(LN)'
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 43205
10 years ago
Steven Barth bec9d38fa4 Add a few SPDX tags
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43151
10 years ago
Felix Fietkau f2a4294ab5 toolchain: drop the mips softfloat symlink hack
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42975
10 years ago
Felix Fietkau 4c4157e287 toolchain: when using musl, install a symlink from ld-musl-*.so to /usr/bin/ldd
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42974
10 years ago
Steven Barth 64e3cb9fe8 toolchain: Fix libthreaddb not being installed
Signed-off-by: Michel Stam <m.stam@fugro.nl>

SVN-Revision: 42752
10 years ago
Steven Barth 0a5caa47e5 toolchain: packetize libatomic
Based on a patch by Tobias Steinicke <tobias.steinicke@inet.tu-berlin.de>.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 42514
10 years ago
Jo-Philipp Wich 4255b2fde5 toolchain: only take last found libgcc* file
The current $(wildcard ...) match might return multiple files which will break subsequent cp commands
with an error like:

  cp: target `/home/user/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/tmp-libc/lib/libgcc_s_pic.a' is not a directory

Prevent this issue by only taking the last path returned by globbing.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41357
10 years ago
Felix Fietkau f7c29f0eb7 toolchain: remove accidental leftover debug code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39969
10 years ago
Felix Fietkau 6e6d7003bb toolchain: add a symlink for musl softfloat ldso to the path where our gcc expects it
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39966
10 years ago
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
11 years ago