Relies on the assumption that the machine that will build the toolchain will
also be the machine to use said toolchain.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
The information within config/version contains information that is about
LibreELEC the distribution, so place it there. Config/version should contain
version information about the LibreELEC the buildsystem.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
brackets around variable names
shell builtin for inserting values into empty variables
line indent
variable quotes
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
die is meant to be a more flexible exit, printing a message to go with
the exit call. It works like:
die -- same as "exit 1"
die "It just broke." -- echo statement, exit value 1
die "Tried to do the thing." "2" -- echo statement, exit value 2
Exit codes other than 1 require a message to go with it.
it would replace existing code that looks like:
echo "ERROR: Everything went wrong. Sorry!"
exit 1
or be more helpful in picking up the pieces when something unexpected
happens then:
do_something || exit 1
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This reorganizes functions based on their purpose as well as strives to declare
a function prior to another function calling it. No changes in how any function
is implemented.
Purpose groupings:
Function - functions that make it easier to implement other functions
Buildsystem - functions around the build environment
Package - functions that work with packages or configure them
Kernel - functions for getting information on the kernel/firmware
Addon - functions around building kodi addons
Target Configuration - Functions that set something up on the target
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
eglibc ceased active development years ago and is no longer in tree, so no need
to check for it.
tolower() has been around since 2010 and is unused anywhere. Wish it well!
Should it return, tr '[:upper:]' '[:lower:]' is likely better.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
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>