Commit Graph

14 Commits

Author SHA1 Message Date
Michael Pratt
d87a8aa148
treewide: add ORIG_PATH variable
Add a variable that stores the original value of $PATH
in the host system's shell, before Make alters it.

This can be useful for when it is necessary
to ignore symlinks and programs made by the build system.

Define this new variable before all instances of
'export PATH:=' or similar.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2023-06-05 08:31:47 +02:00
Eneas U de Queiroz
ed81acdcc2
toolchain: wrapper.sh: use --rpath-link
Use --rpath-link option instead of --rpath.  The former is used only at
link-time, while the latter is searched at run-time as well.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2023-02-12 10:55:06 -03:00
Eneas U de Queiroz
9a49e257d6
toolchain: wrapper.sh: fix TOOLCHAIN_SYSROOT path
62c1740676 changed the location of the script from $(TOOLCHAIN_DIR)/usr
to $(TOOLCHAIN_DIR), but the TOOLCHAIN_SYSROOT used in wrapper.sh was
still expecting to find the script under usr/bin.

Fixes: 62c1740676 toolchain: fix the sysroot mess by getting...
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2023-02-12 10:55:05 -03:00
Petr Štetiar
df09cc6ddb toolchain/wrapper.sh: fix remaining shellcheck warnings
Fixes following warnings:

 In target/toolchain/files/wrapper.sh line 18:
 REALNAME=$(readlink -f $0)
                        ^-- SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 20:
 REALNAME_BASE=$(basename $REALNAME)
                          ^-------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 21:
 REALNAME_DIR=$(dirname $REALNAME)
                        ^-------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 74:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $GCC_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_CFLAGS $TARGET_ROOTFS_CFLAGS "$@"
                     ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 77:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $LD_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_LDFLAGS "$@"
                      ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 80:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $TARGET_FUNDAMENTAL_ASFLAGS "$@"
                      ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 83:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin "$@"
                      ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-11 13:33:28 +02:00
Rosen Penev
d8e6a92e7c toolchain/wrapper.sh: Replace read with read -r
Without -r, backslashes would get mangled.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-11 13:33:28 +02:00
Adrian Schmutzler
836d5395a5 toolchain: wrapper.sh: harmonize leading whitespaces
Convert leading spaces to tabs and generally harmonize leading
whitespace indent in the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-31 01:36:16 +01:00
Rosen Penev
ac42b916bc toolchain: wrapper.sh: use /bin/sh instead of bash
No bash features are actually used here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[slightly adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-31 01:34:55 +01:00
Rosen Penev
19be55aa37 toolchain/wrapper: replace legacy backticks with $()
This replaces deprecated backticks by more versatile $(...) syntax.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[alter commit title, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-31 01:00:04 +01:00
Eneas U de Queiroz
7d97bc19f0 target/toolchain/files/wrapper.sh: simplify 'case'
Removed an eglibc remnant, and while at it, grouped all of the
TOOLCHAIN_PLATFORMs using the same FLAGS together.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2019-07-15 19:29:08 +02:00
Zoltan HERPAI
d2c06eb075 merge: etc: update remaining files
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2017-12-08 19:41:18 +01:00
Alexander Couzens
4e84c6cbd2 toolchain: rename OpenWrt into LEDE
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2016-05-05 19:10:23 +01:00
Florian Fainelli
6b63716262 add preliminary support for musl
Musl is an alternative C-library, see http://www.musl-libc.org for more infos.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 34314
2012-11-23 20:02:29 +00:00
Felix Fietkau
60a4353fdd do not use the wrapper scripts for exportable toolchains internally. on some systems the wrapper scripts are broken, and their use should be opt-in
SVN-Revision: 18454
2009-11-19 17:23:31 +00:00
Felix Fietkau
44aa03f2f9 Add a target (CONFIG_MAKE_CONFIG) that creates an exportable toolchain. The toolchain will zipped and saved under $(TOPDIR)/bin directory.
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>

SVN-Revision: 18419
2009-11-14 17:51:32 +00:00