156 Commits

Author SHA1 Message Date
Matthias Reichl
f5f9a9e1cc scripts/build: properly honor strip build flag
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>
2023-03-30 17:19:48 +02:00
SupervisedThinking
b76b39d823 scripts/build: update TRACE_BUILD_TIMING 2022-12-06 16:31:24 +01:00
Matthias Reichl
8022ec23bf scripts/build: use wrapper scripts when building with local-cc flag
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
2022-12-02 01:11:39 +01:00
SupervisedThinking
0ffe017fa9 scripts/build: fix meson 0.64.0 deprecation warning 2022-11-16 09:32:46 +01:00
Matthias Reichl
546e7c653f buildsystem: add support for reporting build timing details
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>
2022-09-22 19:33:30 +02:00
CvH
5125de9624
Merge pull request #5144 from mglae/le10_autoreconf
autoreconf: support custom PKG_CONFIGURE_SCRIPT
2021-12-27 08:06:54 +01:00
SupervisedThinking
8d70c35a3d scripts/build: load meson host conf as native file 2021-11-29 17:31:58 +01:00
CvH
7812192049
Merge pull request #5436 from antonlacon/functions-cleanup
Reduce subprocesses in buildsystem
2021-10-03 08:00:07 +02:00
Ian Leonard
5db456bcba scripts/build: eliminate use of dirname
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-10-01 19:41:50 +00:00
mglae
5789d3dff9 buildsystem: allow specifying our optimizing level for packages build with cmake
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.
2021-09-17 18:20:08 +02:00
mglae
c328de8278 build: export PKG_ORIG_SYSROOT_PREFIX
Required to create $PKG_NAME-config scripts in $TOOLCHAIN/bin
2021-07-01 23:42:56 +02:00
mglae
730db0768a autoreconf: support custom PKG_CONFIGURE_SCRIPT 2021-02-16 19:25:05 +01:00
mglae
c03f7a75a2 build: check package for wrong toolchain configured 2021-01-08 20:13:02 +01:00
MilhouseVH
a1e700fd87 buildsystem: log pkg_call that failed 2020-02-19 07:49:35 +00:00
MilhouseVH
70b69ebffa
Merge pull request #4191 from HiassofT/le10-fix-obj-remove
allow packages to install *.o files into the image
2020-02-13 17:26:09 +00:00
Andre Heider
64c73805fe build: add PKG_DEPENDS_CONFIG to set PKG_CONFIG_PATH for packages
To be used for "-sysroot" packages.
2020-02-10 08:53:39 +01:00
Matthias Reichl
24c4c14ab2 scripts/build: allow installation of *.o files
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>
2020-02-09 11:27:26 +01:00
Matthias Reichl
80f1b14da0
Merge pull request #4092 from MilhouseVH/le10_generator
buildsystem: switch to dynamic scheduler
2020-01-21 00:13:51 +01:00
MilhouseVH
fe1dd1e8ac buildsystem: use an update lock when updating image and sysroot
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.
2020-01-15 18:49:15 +00:00
MilhouseVH
99ed1d6e31 buildsystem: recursive unpack & build is only needed by sequential builds 2020-01-15 18:49:15 +00:00
MilhouseVH
06e0928840
Merge pull request #3140 from InuSasha/features/build-root
buildsystem: add possibility to move the build paths outside the git …
2020-01-08 15:21:22 +00:00
Andre Heider
8e4663912a build: move install dirs out of the build dir
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
2019-12-31 11:26:49 +01:00
Andre Heider
1dffafae2a build: add a "sysroot" build flag
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.
2019-12-31 11:26:49 +01:00
Andre Heider
d31c44664c build: clean usr/local/ on packages too
Some packages use configure_target() but don't set the /usr prefix.
2019-12-31 11:26:49 +01:00
Andre Heider
912a91619b build: don't wipe devel files from packages, just don't install them
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.
2019-12-31 11:26:49 +01:00
Andre Heider
267d57d7f3 build: add and use PKG_INSTALL
Set it depending on the target, so there's no need to hardcode
$PKG_BUILD/.install_[pkg|init] in multiple places.
2019-12-31 11:26:49 +01:00
MilhouseVH
a41d4f1e6b buildsystem: fix Python native modules that are using build host ABI (PEP3149) 2019-10-29 12:19:07 +00:00
Sascha Kuehndel (InuSasha)
2d78194f84
fix strip with new meson 2019-09-19 11:18:33 +02:00
Sascha Kuehndel (InuSasha)
266f0932c8
buildsystem: swap setup_toolchain parameter 2019-09-19 11:14:43 +02:00
Sascha Kuehndel (InuSasha)
73eef7432f
buildsystem: convert to support mesonbuild >= 0.51.0
- meson needs a host environment for cross-compile
- allow setup_toolchain to setup toolchain based on used build-system
- adjust creation of meson.conf
2019-09-19 11:14:43 +02:00
MilhouseVH
622c11872d buildsystem: fix /usr targets 2019-07-04 20:18:03 +01:00
MilhouseVH
7ccb58b507 buildsystem: don't dereference LINK_NAME when fixing up sym links 2019-07-03 23:18:28 +01:00
MilhouseVH
3facec5d91 buildsystem: unpack should recursively unpack, not build 2019-06-29 11:06:42 +01:00
Sascha Kuehndel (InuSasha)
4bd4f58dbe
buildsystem: allow to set BUILD_ROOT via BUILD_DIR 2019-06-26 19:54:28 +02:00
MilhouseVH
f9a2623d06 buildsystem: build/unpack - simplify some logic 2019-06-17 01:48:38 +01:00
MilhouseVH
90be11322a buildsystem: consistently use braces 2019-06-16 03:35:56 +01:00
MilhouseVH
2e3a2dab67 buildsystem: cleanup - PACKAGE_NAME is redundant 2019-06-16 02:59:20 +01:00
MilhouseVH
1d81d22225 buildsystem: add pre_configure() function that is not target specific 2019-05-26 19:17:08 +01:00
kszaq
834e11c9d0 scripts/build: strip all executables in /usr
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.
2019-05-13 23:20:09 +02:00
Jonas Karlman
60fc0b29ed u-boot: use PKG_STAMP to trigger rebuild 2019-04-01 20:58:13 +00:00
MilhouseVH
eff50203e1 scripts/build: clobber existing files 2019-03-09 22:02:33 +00:00
MilhouseVH
7c327b2d56 scripts/build: fix broken sym links due to isolated sysroot 2019-02-28 06:19:13 +00:00
MilhouseVH
83922eef4f scripts/build: add TODO 2019-02-22 20:12:20 +00:00
MilhouseVH
527ea323b8 scripts/build: a shared sysroot is not thread-safe 2019-02-22 20:11:23 +00:00
MilhouseVH
d71fbfaec7 scripts/build: cosmetic 2019-02-13 15:10:54 +00:00
MilhouseVH
9f1ea7d175 PKG_DEPENDS_UNPACK: solution for packages using source code of another 2019-02-08 17:17:43 +00:00
MilhouseVH
d0034ab95e scripts/build: use global lock as sed -i $SYSROOT_PREFIX/usr/lib/*.la is racy 2019-02-08 17:17:43 +00:00
MilhouseVH
0ebc6fef63 build system: add parallel build support; use new "image" package 2019-02-08 17:17:43 +00:00
MilhouseVH
fb7bfa02f9 config/path: get rid of MAKEINSTALL 2019-02-08 17:17:43 +00:00
MilhouseVH
0661263dd8 buildsystem: restore set -e fail-on-error behaviour 2019-01-24 19:17:39 +00:00