Storing the cache in an exported environment variable can
result in build failures if the cache exceeds the MAX_ARG_STRLEN
limit (128k on linux) which can be triggered by building in a
rather deeply nested directory.
Signed-off-by: Matthias Reichl <hias@horus.com>
This reverts commit 3b5986704e002602cf72c9e34206d2938dcc0a0b.
The config shell is set as an interpreter in libtool scripts
and as Linux has a hard limit of 127 bytes on the first line
in scripts (including the hashbang) this causes the build to
fail with a "bad interpreter" error if the path to the config
shell exceeds this limit.
These errors were first noticed on jenkins builds but can be
easily reproduced by building LibreELEC in a longer build dir.
eg RPi2 clean build failing on libtool invocation in kmod build:
./doltlibtool: /home/hias/rpi/libreelec-testing-with-a-long-directory-path-as-on-jenkins/build.LibreELEC-RPi2.arm-9.0-devel/kmod-24/.x86_64-linux-gnu/libtool: /home/hias/rpi/libreelec-testing-with-a-long-directory-path-as-on-jenkins/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/d: bad interpreter: No such file or directory
Signed-off-by: Matthias Reichl <hias@horus.com>
Builds use a mix of styles for the hash table in the ELF header. Only
one style of table is necessary, and the GNU one is more performant
for lookups. Eliminating the SysV style hash table trims ~450kb. This
is done via setting the default linker in gcc instead of LDFLAGS as
some packages ignore LDFLAGS.
Note that if MIPS is ever added as a supported architecture, it
does not support hash-style=gnu at this time.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Split up the LTO flags in config/optimize and assemble
full C/CXX/LDFLAGS in config/functions.
Add flags for parallel/single-threaded lto and fat/non-fat
lto object creation.
Change the default lto build flag to use non-fat lto objects.
Signed-off-by: Matthias Reichl <hias@horus.com>
Packages are only built with LTO if it's explicitly enabled via
the lto build flag or if a package enables LTO via configure / cmake
options.
Enabling LTO via configure / cmake is the preferred way as this
gives packages more fine grained control, eg enable parallel LTO
linking etc. When doing this packages should respect the
LTO_SUPPORT setting so LTO can be disabled globally.
To avoid conflicting C/CXX/LDFLAGS no FLAGS are added when the
lto build flag is not set.
Signed-off-by: Matthias Reichl <hias@horus.com>