Commit Graph

365 Commits

Author SHA1 Message Date
Ian Leonard
79a4a5dd8c functions: add_user: replace python with openssl
python's crypt module is deprecated in 3.11 and to be removed in 3.13.
Replace its usage with openssl's passwd.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2022-11-21 22:21:13 +00:00
SupervisedThinking
e485a16a8d build system: add support for mold & linker PKG_BUILD_FLAGS 2022-10-06 19:39:45 +02:00
Frank Hartung
f15e1de7ee
Merge pull request #6928 from HiassofT/le11-default-linker
buildsystem: support choosing default linker
2022-10-05 23:59:20 +02:00
Matthias Reichl
4bcc171bd2 buildsystem: support choosing default linker
Default linker can be set with DEFAULT_LINKER in options.

Packages can influence linker selection both by positive and/or
negative PKG_BUILD_FLAGS, eg +bfd or -gold.

Positive build flags take priority over the default linker so eg
DEFAULT_LINKER="gold" and PKG_BUILD_FLAGS="+bfd" will select bfd.

Negative flags mean a specific linker should not be used, eg -gold
prevents using gold.

If the default linker is disabled via a build flag then any other
available linker will be used.

Optional linkers like gold have to be enabled with eg GOLD_SUPPORT="yes"
in options. If an optional linker is not enabled it won't be a candidate
for linker selection. So eg "+mold" will have no effect if MOLD_SUPPORT
isn't set to "yes".

Signed-off-by: Matthias Reichl <hias@horus.com>
2022-09-27 19:00:27 +02: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
8aaaa82fab
Merge pull request #6666 from lrusak/qa-checks
Add support for logging and reporting QA Checks
2022-07-18 12:19:21 +02:00
Matthias Reichl
27c6321afe rust: use MACHINE_HARDWARE_NAME instead of MACHINE_HARDWARE_CPU
Signed-off-by: Matthias Reichl <hias@horus.com>
2022-06-30 16:35:04 +02:00
Matthias Reichl
210049e5cc config/functions: set build cpu in meson.conf to MACHINE_HARDWARE_NAME
This is also what meson does by default on Linux as Linux doesn't
support reporting CPU type.

Signed-off-by: Matthias Reichl <hias@horus.com>
2022-06-30 16:35:04 +02:00
Lukas Rusak
27b48ddff2
config/functions: log safe_remove as a qa check 2022-06-28 15:24:23 -07:00
Lukas Rusak
3fa587eb52
add ability to log qa checks 2022-06-28 15:24:22 -07:00
CvH
825503c729
Merge pull request #6502 from lrusak/rust
Compile rust compiler from scratch
2022-05-21 09:36:08 +02:00
Lukas Rusak
a5dedbd369
rust: add package 2022-05-17 14:57:32 -07:00
Lukas Rusak
4ec7fb1638
llvm: cleanup target build 2022-05-16 09:01:30 -07:00
Rudi Heitbaum
5c6663237e config/functions: improve error message when there in not a device directory 2022-05-11 13:15:34 +00:00
heitbaum
4762f8a1d0 config/functions: add libtool_remove_rpath function
This function can be used on "autotools" and "configure" packages.

Use libtool_remove_rpath() to remove hardcode rpath when --disable-rpath
is not supported by "configure".

usage: `libtool_remove_rpath libtool`

If there are multiple libtool scripts or they are in subdirectories,
then you may need to run this function using the path to libtool or run
the function multiple times.

If binaries and shared objects installed by the package to target have
incorrect or system libraries then this function can be used. After
using the function, these example command below should NOT have a
RPATH/RUNPATH.

e.g. (before using the fucntion)
  $ readelf --dynamic ${filename} | grep PATH
    RPATH           Library runpath: [.....]
    RUNPATH         Library runpath: [.....]

Before using this function; check if the package supports
--disable-rpath (and that it works.) Work with upstream and have a
working --disable-rpath added to the package.
2022-01-23 21:39:17 +00:00
CvH
4e16eba336
Merge pull request #5916 from SupervisedThinking/meson_native_build
[le11] use Meson native build for package:host
2021-12-08 12:04:13 +01:00
Peter
3c5b47bb32 config/functions: fix file get_handler_support with manual toolchain
Currently building a package with

GET_HANDLER_SUPPORT="file"
PKG_URL="file:///some_path_to_file_with_sources"

throws an error

ERROR: using manual toolchain but PKG_TAR_COPY_OPTS is configured.
2021-12-01 07:21:18 +01:00
SupervisedThinking
6f2ccfae7e config/functions: add build_machine to meson conf 2021-11-29 17:31:58 +01:00
CvH
8d6e4ac9a7
Merge pull request #5453 from antonlacon/le11-passwd
buildsystem: cleanup password hashing; drop busybox:host
2021-10-03 08:00:41 +02:00
CvH
7812192049
Merge pull request #5436 from antonlacon/functions-cleanup
Reduce subprocesses in buildsystem
2021-10-03 08:00:07 +02:00
CvH
f4096df37c
Merge pull request #5539 from mglae/le10_buildsystem_cmake_optimization
buildsystem: cmake: allow specifying our optimization level
2021-10-02 13:45:36 +02:00
Ian Leonard
279d726b9f config/functions: reduce use of basename and dirname
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-10-01 19:41:49 +00:00
Ian Leonard
2e21000d38 config/functions: cleanup buildsystem check_ functions
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-10-01 19:41:49 +00:00
heitbaum
beb663428d config/functions: fix spelling mistake 2021-09-19 21:29:07 +10:00
mglae
131654d937 buildsystem: use -DNDEBUG not only for cmake release builds 2021-09-17 18:20:08 +02: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
heitbaum
ad84c1e24b toolchain: always use cross compile and exe_wrapper with meson
This needs to be done even on target=host due to libraries of the host
being newer than the target. This fixes tests where target glibc is
different from host glibc and meson tries to check existance of 2
functions which are in GLIBC_2.34 in this example. It is also correct
functionality, as we will never be building for the host the compile is
on.

`Program stderr:

/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-10.0-devel/build/glib-37e5dfd3a2ced10c395b38702ae15e0e128e457b/.x86_64-libreelec-linux-gnu/meson-private/tmpg908xy4s/output.exe:
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found
(required by
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-10.0-devel/build/glib-37e5dfd3a2ced10c395b38702ae15e0e128e457b/.x86_64-libreelec-linux-gnu/meson-private/tmpg908xy4s/output.exe)`
2021-09-11 23:21:26 +10:00
heitbaum
a5988425a1 toolchain: autoconf: add workaround for >autoconf-2.69
Since >autoconf-2.69, autoreconf will check for GTK_DOC_CHECK macro and
will call gtkdocize automatically [Link 1] when invoked with "--install"
parameter.

Because we do not care about docs in libreelec packages, we can stick to our poor
man's implementation of autoreconf and replace calls to gtkdocize with true.

Link 1: https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=dd880a0a6de5602cdd40b770ed6b083b34aa0768

source of patch:
https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=235fcd4e9c1f57af368ca9bbe9dd25effc0dc900
2021-09-11 23:21:26 +10:00
Ian Leonard
2cb6f17526 config/buildsystem: generate password hash in add_user using python
Python3's crypt module is capable of generating password hashes. Use that
instead of busybox:host's cryptpw function.

Move password hashing into config/function's add_user(), so one need not
remember to generate the hash and then pass it into add_user().

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-08-12 00:15:01 +00:00
Ian Leonard
a055e09c3b buildsystem: add .tar.zst handling for package tarballs
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-08-11 17:56:42 +00:00
CvH
d9785e5a8c
Merge pull request #5272 from heitbaum/tc
toolchain: enable correct handling of cmake-make in check_toolchain_config
2021-08-11 13:24:54 +02:00
CvH
4f8d8eabd3
Merge pull request #5276 from arthur-liberman/fix-glib
Update build system for new meson and fix up glib package
2021-08-11 13:19:20 +02:00
CvH
44d1b8dfb5
Merge pull request #5406 from antonlacon/le10-minors
Buildsystem minor cleanups
2021-08-11 13:08:00 +02:00
Alex Bee
f88d19b575 buildsystem: introduce $TARGET_KERNEL_PATCH_ARCH 2021-06-11 18:06:58 +02:00
Ian Leonard
c21412e1bd config/functions: drop unused fix_module_depends funnction
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-05-28 03:06:17 +00:00
Arthur Liberman
f5e7a83c88
glib: fix build on an aarch64 system for ARCH=arm 2021-03-27 17:31:09 +03:00
heitbaum
a1ce9ca5c5 toolchain: enable correct handling of cmake-make in check_toolchain_config 2021-03-26 09:44:10 +00:00
Wolfgang Haupt
bcfe027fc9 buildsystem: fix building meson:init 2021-03-03 14:57:04 +01:00
Portisch
7e418be01c config|scripts: keep source more generic 2021-01-26 16:26:56 +01:00
mglae
c03f7a75a2 build: check package for wrong toolchain configured 2021-01-08 20:13:02 +01:00
CvH
4018c2ec1c
Merge pull request #4344 from HiassofT/le10-remote-gdb
Support building of a remote/cross gdb
2020-05-31 11:02:37 +02:00
MilhouseVH
4d15490c67 config/functions: add go_configure() helpers 2020-05-05 17:54:02 +02:00
Matthias Reichl
3524d12878 allow building with separate debug info
Add SPLIT_DEBUG_INFO option, when it's set to yes the debug info is
stored in separate .dwo files.

This is mainly useful for remote debugging and reduces image size a lot.

See also https://gcc.gnu.org/wiki/DebugFission

Signed-off-by: Matthias Reichl <hias@horus.com>
2020-04-22 20:28:23 +02:00
mglae
99cf8bb62c linux: initramfs: use initramfs config file(s) and directory structure
Cpio file is generated as part of the kernel build process. No need
to force fakeroot cpio build any more.
2020-02-26 06:42:44 +01:00
MilhouseVH
653298b18a buildsystem: allow onexit trap to be selectively ignored 2020-02-19 10:24:15 +00: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
MilhouseVH
a11e063083 build: auto remove build dirs 2020-02-10 08:53:39 +01:00
Andre Heider
a6991f0aba pkg-config: add support for multiple sysroots 2020-02-10 08:53:39 +01:00
Andre Heider
a98010df72 build: automatically add dependencies for kernel packages
And add the missing "linux" to PKG_DEPENDS_UNPACK while at it, the tree
is required for building kernel modules.
2020-02-10 08:53:39 +01:00