Package building honor's the strip flag so we can prevent executables
from being stripped.
But copying files to INSTALL ignored that flag which meant the flag
had practically no effect.
Fix this by using the same logic as we do in the meson strip handling in
line 170 and in config/functions.
Also add the missing quotes in scripts/build to align it with config/functions
Signed-off-by: Matthias Reichl <hias@horus.com>
Several packages and buildsystems (most notably cmake) badly trip
over CC="ccache gcc" so create local wrapper scripts in the build
dir and set CC/CXX to them to work around that - like we do for
host-gcc and gcc in toolchain.
Signed-off-by: Matthias Reichl <hias@horus.com>
fixup scripts/build local-cc wrapper
Timing detail reporting can be enabled by setting
TRACE_BUILD_TIMING=1
This enables timestamping collecting at various build stages so we
can easily analyze how long eg configure, make/build, install etc
steps take.
Signed-off-by: Matthias Reichl <hias@horus.com>
Using -DCMAKE_BUILD_TYPE=MinSizeRel result in finally building with -Os. Our default
optimization or '+speed' are ignored, behavior is like always using '+size'.
Changing to default -DCMAKE_BUILD_TYPE="" is not allowed by to many packages including
Kodi, they are forcing a default option (in worst case "Debug", e.g. llvm)
Redefine the cmake parameters to not include any options and do the same for host choosing
"Release" as build type.
commit c468820ba9bab93c9d2fd34eba765e52b703b3ee "scripts/build: cleanup"
started to silently remove *.o files from the installation without
giving an explanation why this should be needed.
Drop that as it prevents packages from including *.o files in the
image, which eg is needed to include IR BPF decoders in LibreELEC.
Packages which install *.o files that should not end up in the image
should manually remove these in post_makeinstall_target.
Signed-off-by: Matthias Reichl <hias@horus.com>
cp (and potentially mkdir -p) are not atomic, and we have seen situations where two packages
concurrently copying the same file (eg. the udev rule for xf86-video-nvidia and
xf86-video-nvidia-legacy) will succeed for one package but the other package fails with
a "file exists" error (as the file didn't exist when it checked, but does exist when it
actually copies the file). Not even cp -f will avoid this issue.
There are several workarounds, but the most practical (and general) solution is to ensure
sequential updates of the image and shared sysroot directories.
Instead of cluttering $BUILD we now have
- $BUILD/build sources and builds of packages
- $BUILD/install_pkg installed packages
- $BUILD/install_init installed packages for initramfs
Some addon dependencies do this locally on their own. With this, these
packages can now use the standard makeinstall() functions and access build
artifacts using get_install_dir() without polluting the sysroot folder.
With the upcoming usage of the standard install_pkg folder for addon
dependencies, the devel files need to be accessible, e.g. ffmpegx for
tvheadend.
So don't wipe them from the package install folder, just skip copying
them to the image.
- meson needs a host environment for cross-compile
- allow setup_toolchain to setup toolchain based on used build-system
- adjust creation of meson.conf
Some packages install outside /usr/*bin, e.g. /usr/lib/bluetooth
and executables remain unstripped. Try to strip everything
executable except .ko and .so which are handled in separate cases.