Commit Graph

4622 Commits

Author SHA1 Message Date
Roc Lai
d4c4ce36d1 Merge remote-tracking branch 'immortalwrt/master' into main-nss 2026-01-04 20:43:56 +08:00
Tianling Shen
9833aaab28
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2026-01-04 19:48:14 +08:00
Yanase Yuki
ac755f983a treewide: update u-boot URL
U-Boot website has been moved to docs.u-boot.org.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/21279
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:07:02 +01:00
George Sapkin
9b37b7185c build: provide virtual self in kmods
Add an implicit self-provide to kmods. apk can't handle self provides,
be it versioned or virtual, so opt for a prefix and a suffix instead.
Package name without a prefix/suffix is too generic and might conflict
with other packages, e.g. wireguard. This allows several variants to
provide the same virtual package without adding extra provides to the
default one, e.g. r8169 implicitly provides kmod-r8169-any and is marked
as default, so r8125 can explicitly provide @kmod-r8169-any as well.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
5ed650acbf build: add support for virtual provides
Allow defining virtual provides using the PROVIDES field by prefixing
them with @, e.g.:

PROVIDES:=@ca-certs

Virtual provides don't own the provided name and multiple packages with
the same virtual provides can be installed side-by-side. Packages must
still take care not to override each other's files.

Add an implicit self-provide to packages. apk can't handle self
provides, be it versioned or virtual, so opt for a suffix instead. This
allows several variants to provide the same virtual package without
adding extra provides to the default one, e.g. wget implicitly provides
wget-any and is marked as default, so wget-ssl can explicitly provide
@wget-any as well.

Filter out virtual provides when generating metadata.

Filter out virtual provides prefix and self provide where appropriate.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
cefbf1184f build: refactor provides logic
Refactor provides logic into a helper define and use it for both apk and
control. Document the behavior.

Store preformatted provides in Package/$(1)/PROVIDES similar to defines.

Remove unnecessary logging.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
Roc Lai
454143dd6b Merge remote-tracking branch 'immortalwrt/master' into main-nss 2025-12-29 08:12:59 +08:00
Tianling Shen
e30c97f13d
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-28 18:03:51 +08:00
Roc Lai
36f1bafb2a Merge remote-tracking branch 'immortalwrt/master' into main-nss 2025-12-26 19:08:55 +08:00
George Sapkin
56bc4a0d89 build: fix missing PKG_INFO_DIR
If the first built package has an ABI, PKG_INFO_DIR might not exist, so
ensure it does.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21265
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-24 10:05:52 +01:00
George Sapkin
18029977f6 build: fix apk packaging and ABI-versioning
The updated logic for the APK dependencies and provides is as follows:

- If ABI version is defined:
  - package is named `package_name-ABI_version`
  - package implicitly provides
    `package_name-ABI_version=package_version`
    this implies that only one version of a package per ABI can be
    installed at the same time
  - additionally provide `package_name` so multiple packages can be
    looked up by its base name
  - for each `provides`, provide `provide-ABI_version=package_version`
    this implies that only one version of a provide can be installed at
    the same time

- else if ABI version is _not_ defined
  - package is named `package_name`
  - package implicitly provides `package_name=package_version`
    this implies that only one version of a package can be installed at
    the same time
  - if `alternatives` is defined
    - for each `provides`, provide `provide`
      this implies that multiple versions of a provide can be installed
      at the same time
  - else if `alternatives` is _not_ defined
    - for each `provides`, provide `provide=package_version`
      this implies that only one version of a provide can be installed
      at the same time

Both cases a package can be looked up by its base name.

ABI version `alternatives`, `conffiles`, `conffiles_static`, `list` and
`rusers` files so multiple versions of the same ABI package can be
installed side by side, and so they don't overwrite each other's
packaging files.

ABI version `EXTRA_DEPENDS` so dependencies can be correctly looked up
using the existing OpenWrt semantics without the ABI specified. This is
needed since ABI-versioned libraries no longer provide
`package_name=package_version`, so that they can be installed side by
side.

Remove duplicate dependencies when `EXTRA_DEPENDS` specifies a versioned
one that is already in `DEPENDS`.

ABI is defined
------------------------------------------------------------------------

`libsqlite3` has `PROVIDES` set to `libfake` and has two different ABI
versions installed. `libfake` is just an example to demonstrate the
mechanics, as the library can already be depended upon using e.g.
`libsqlite3-0=3.51.0-r1`. Note the ABI-versioned lists.

```
root@OpenWrt:/tmp# apk add --allow-untrusted ./libsqlite3-0-3.51.0-r1.apk
(1/1) Installing libsqlite3-0 (3.51.0-r1)
libsqlite3-0-3.51.0-r1.post-install: Executing script...
OK: 22 MiB in 157 packages

root@OpenWrt:/tmp# apk add --allow-untrusted ./libsqlite3-1-4.00.0-r1.apk
(1/1) Installing libsqlite3-1 (4.00.0-r1)
libsqlite3-1-4.00.0-r1.post-install: Executing script...
OK: 23 MiB in 158 packages

root@OpenWrt:/tmp# apk query --fields name,version,contents,provides libsqlite3-0 libsqlite3-1
Name: libsqlite3-0
Version: 3.51.0-r2
Provides: libfake-0=3.51.0-r2 libsqlite3
Contents:
  lib/apk/packages/libsqlite3-0.list
  usr/lib/libsqlite3.so.0
  usr/lib/libsqlite3.so.3.51.0

Name: libsqlite3-1
Version: 4.00.0-r1
Provides: libfake-1=4.00.0-r1 libsqlite3
Contents:
  lib/apk/packages/libsqlite3-1.list
  usr/lib/libsqlite3.so.1
  usr/lib/libsqlite3.so.4.00.0

root@OpenWrt:/tmp# ls -lh /usr/lib/libsqlite3.so.*
lrwxrwxrwx    1 root     root          20 Nov 20 00:23 /usr/lib/libsqlite3.so.0 -> libsqlite3.so.3.51.0
lrwxrwxrwx    1 root     root          20 Nov 20 00:27 /usr/lib/libsqlite3.so.1 -> libsqlite3.so.4.00.0
-rwxr-xr-x    1 root     root        1.0M Nov  6 18:19 /usr/lib/libsqlite3.so.3.51.0
-rwxr-xr-x    1 root     root        1.0M Nov  6 18:19 /usr/lib/libsqlite3.so.4.00.0
```

ABI is not defined
------------------------------------------------------------------------

Both `avahi-dbus-daemon` and `avahi-nodbus-daemon` provide `avahi-daemon`,
but have no ABI specified. This results in `avahi-daemon=0.8-r11` provides
for both packages and only one being able to be installed at the same time:

```
root@OpenWrt:/tmp# apk add --allow-untrusted ./avahi-nodbus-daemon-0.8-r11.apk
(1/4) Installing libavahi-nodbus-support (0.8-r10)
libavahi-nodbus-support-0.8-r10.post-install: Executing script...
(2/4) Installing libdaemon (0.14-r5)
libdaemon-0.14-r5.post-install: Executing script...
(3/4) Installing libexpat (2.7.3-r1)
libexpat-2.7.3-r1.post-install: Executing script...
(4/4) Installing avahi-nodbus-daemon (0.8-r11)
avahi-nodbus-daemon-0.8-r11.post-install: Executing script...
23 MiB in 160 packages

root@OpenWrt:/tmp# apk query --fields provides avahi-nodbus-daemon
Provides: avahi-daemon=0.8-r11

root@OpenWrt:/tmp# apk add --allow-untrusted ./avahi-dbus-daemon-0.8-r11.apk
ERROR: unable to select packages:
  avahi-dbus-daemon-0.8-r11:
    conflicts: avahi-nodbus-daemon-0.8-r11[avahi-daemon=0.8-r11]
    satisfies: world[avahi-dbus-daemon><Q1R111s+ke9Vf+eCxDHX2BZVUK54Q=]
  avahi-nodbus-daemon-0.8-r11:
    conflicts: avahi-dbus-daemon-0.8-r11[avahi-daemon=0.8-r11]
    satisfies: world[avahi-nodbus-daemon><Q1BAu7nLI2MgRabpveLTGO2ksQz7E=]
```

Provides and alternatives
------------------------------------------------------------------------

Both `uclient-fetch` and `wget-nossl` provide `wget` and specify
alternatives, so provides are not versioned and both packages can be
installed at the same time:

```
root@OpenWrt:/tmp# apk query --fields name,version,contents,provides uclient-fetch wget-nossl
Name: uclient-fetch
Version: 2025.10.03~dc909ca7-r1
Provides: wget
Contents:
  bin/uclient-fetch
  lib/apk/packages/uclient-fetch.alternatives
  lib/apk/packages/uclient-fetch.list

Name: wget-nossl
Version: 1.25.0-r1
Provides: gnu-wget wget
Contents:
  lib/apk/packages/wget-nossl.alternatives
  lib/apk/packages/wget-nossl.list
  usr/libexec/wget-nossl

```

Fixes: https://github.com/openwrt/openwrt/issues/20582
Fixes: https://github.com/openwrt/openwrt/issues/20802
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/20819
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-22 10:44:46 +01:00
Tianling Shen
f3aa1966c5
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-22 14:20:38 +08:00
Markus Stockhausen
d34cef823e build: avoid errors during release candidate kernel packaging
The build system allows to use Linux release candidate kernels (-rcX).
For this a target/linux/generic/kernel-6.XY as follows is needed:

LINUX_VERSION-6.XY = -rc1
LINUX_KERNEL_HASH-6.XY-rc1 = 18ba6ebd72f46b881e0d73e390b2888b7b43...

Sadly the builds fail with a packaging error.

fakeroot /home/openwrt/openwrt/openwrt/staging_dir/host/bin/apk
mkpkg --info "name:kernel" --info "version:6.15-rc1~c4bf...1f6-r1"
ERROR: info field 'version' has invalid value: package version is invalid

The apk metadata specification reads:

"... Currently the APK version specification is as follows:
number{.number}...{letter}{_suffix{number}}...{~hash}{-r#} ...
Optionally one or more _suffix{number} components can follow.
The list of valid suffixes (and their sorting order) is: alpha,
beta, pre, rc, <no suffix>, cvs, svn, git, hg, p."

Given that the kernel uses "-rcX" naming scheme and apk requires
"_rcX" instead, simply translate the dash to an underscore for
these builds.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21214
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-20 11:06:47 +01:00
Roc Lai
a3679394c9 Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-12-17 18:51:10 +08:00
Tianling Shen
6723faf733
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-14 19:33:49 +08:00
David Woodhouse
24b8db118b
image: add CONFIG_EXTRA_IMAGE_NAME
This allows an optional tag to be put in the .config file which is
included in the filename of the resulting images, so it's easier to
build images with different functionality for the same target hardware.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Link: https://github.com/openwrt/openwrt/pull/20984
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2025-12-12 22:06:06 +00:00
Tianling Shen
589e0d8d4f
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-11 15:06:31 +08:00
Andreas Gnau
f3e4620f59
build: depend on tools/zstd for download
Downloading packages from git requires zstd to compress their tarballs.
Make sure that zstd from host tools is compiled when running make
download. Otherwise, either the download would fail because zstd is not
present or a random version from the host would be used leading to hash
mismatches.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/21125
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-12-10 19:04:44 +01:00
Roc Lai
ea02da03c0 Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-12-03 15:40:09 +08:00
Tianling Shen
1e5d7a4c7c
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-02 09:44:52 +08:00
Christian Marangi
4fd310a8d3
kernel: move .quilt_used to quilt.mk
Move .quilt_used from kernel-defaults.mk to quilt.mk.

This is done to be consistent with the parallel Build/Patch/Default and
Host/Patch/Default and permit better Quilt handling on any package that
might use Kernel/Patch/Default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-27 20:26:37 +01:00
Christian Marangi
30a863bea0
Revert "kernel: move .quilt_used to quilt.mk"
This reverts commit 61bfcc4bd7.

The change was wrong as it was placed on the wrong define section.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-27 20:24:05 +01:00
Christian Marangi
61bfcc4bd7
kernel: move .quilt_used to quilt.mk
Move .quilt_used from kernel-defaults.mk to quilt.mk.

This is done to be consistent with the parallel Build/Patch/Default and
Host/Patch/Default and permit better Quilt handling on any package that
might use Kernel/Patch/Default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-27 14:18:50 +01:00
Roc Lai
fc88a28b96 Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-11-25 23:25:44 +08:00
Tianling Shen
da0a9e8a80
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-25 19:23:24 +08:00
Jascha Sundaresan
46ab9f3f1c filogic: add support for Netgear EAX17
Hardware
--------

SOC:   MediaTek MT7981
RAM:   512MB DDR4
FLASH: 128MB SPI-NAND
WIFI:  Mediatek MT7915 (integrated) 2x2 802.11ax 2.4 / 5 GHz
ETH:   Mediatek MT7981 internal 1 GbE PHY
UART:  3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)

Installation
------------

1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
2. Connect the TFTP server to the EAX17. Conect to the serial console,
   interrupt the autoboot process by pressing '0' when prompted.
3. Download & Boot the OpenWrt initramfs image.

   $ tftpboot openwrt.bin
   $ bootm

4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
   using scp and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

Signed-off-by: Jascha Sundaresan <flizarthanon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20354
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-24 00:57:19 +01:00
Roc Lai
6cb86691ab Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-11-23 20:10:28 +08:00
Nick Hainke
557c174a3c toolchain: gcc: add fanalyzer config option
Add gcc config option for fanalyzer. As a result of this option, a static
analysis of the program flow is conducted, allowing interprocedural paths
to be identified and warnings to be issued if problems are identified.

Link: https://github.com/openwrt/openwrt/pull/12576
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-11-23 09:33:15 +01:00
Tianling Shen
0760f6f5ca
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-23 14:55:16 +08:00
Christian Marangi
f9802d70c6
package: drop creating spurious tmp directory in feed directory
In implementing APK support it seems a a leftover was never removed that
creates an unused tmp directory in the package feed directory.

Drop it as it's not used anywhere. What is actually needed is the
creation of the $$(PDIR_$(1)) directory for the feed package directory
in the bin/packages directory.

This was a side effect of using INSTALL_DIR on $$(PDIR_$(1))/tmp that
indirectly creates the $$(PDIR_$(1)) parent directory.

Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-22 10:01:55 +01:00
Christian Marangi
ed4aabf425
Revert "package: drop creating spurious tmp directory in feed directory"
This reverts commit cea8507dcc.

This actually cause package pack error on every package outside the
target directory.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-22 09:58:26 +01:00
Christian Marangi
cea8507dcc
package: drop creating spurious tmp directory in feed directory
In implementing APK support it seems a a leftover was never removed that
creates an unused tmp directory in the package feed directory.

Drop it as it's not used anywhere.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-21 23:34:02 +01:00
Roc Lai
fd78dcbcb5 Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-11-21 19:31:18 +08:00
Tianling Shen
f847612aa7
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-19 22:41:54 +08:00
Robert Marko
f4ff823435 include: rootfs: fix APK compressed scripts tarball support
APK will generate the compressed scripts.tar by default, however we rely
on using TAR support for updating the tarball on the fly and this does not
work when tarball is compressed and will cause the following errors:
staging_dir/host/bin/tar: Cannot update compressed archives
Try /staging_dir/host/bin/tar --help' or
staging_dir/host/bin/tar --usage' for more information.

So, lets simply decompress the scripts.tar.gz before usage and then
compress it after we are done.

Fixes: 5d85657f6d ("apk-tools: implement compression of on-device scripts.tar")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-19 13:51:04 +01:00
Hauke Mehrtens
a2a78c04f8 build: Add support for linking with DT_RELR
This adds the -Wl,-z,pack-relative-relocs linking options.
This reduces the size of some binaries.

This is only supported on i386, x86_64, aarch64 and loongarch64 in
binutils. This feature is not support for MIPS.

musl libc supports it since version 1.2.4 .
glibc supports it since vesion 2.36.
binutils ld supports it since version 2.38 for x86 and since version
2.43 for LoongArch.

This reduces the size of the armsr default root file system from
5,262,198 bytes to 5,200,950 bytes by 61,248 bytes.

Link: https://github.com/openwrt/openwrt/pull/20679
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-18 23:17:09 +01:00
Eric Fahlgren
5d85657f6d apk-tools: implement compression of on-device scripts.tar
Default behavior for apk was to create an uncompressed scripts.tar
file.  Due to the structure of tar files, with fixed block
size and null padding, this file becomes very large on OpenWrt
installations where there are typically two scripts per package.
This could cause the raw tar file to easily grow to over 500KB,
whereas the compressed file is generally around 20-30KB.

When stored in the /rom partition of a squashfs device, the file
is compressed and this is not an issue.  But, as soon as you add
or delete a package, the scripts.tar file is fully expanded into
the /overlay partition and can cause issues on small-flash devices.

This issue was addressed in an upstream commit by detecting
whether the scripts.tar file is compressed (its name must be
exactly 'scripts.tar.gz'), and then retaining that compression by
reading/writing the file using a compressed stream.

This commit applies a cherrypicked patch for the upstream commit, and
compresses the scripts.tar during construction of the device rootfs.

Fixes: https://github.com/openwrt/openwrt/issues/17108
Link: 012cdcfdf9
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20795
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-18 17:25:06 +01:00
Roc Lai
0495f17c75 Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-11-13 20:58:27 +08:00
Tianling Shen
2048a2e8ac
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-12 21:36:37 +08:00
Kacper Ludwinski
ba041eb451
prereq-build: add Python 3.13 support
Add support for Python version 3.13 to include/prereq-build.mk.
One of the reasons for this change is that
Ubuntu 25.04 ships with Python 3.13 as default version.
Let's support it.

Signed-off-by: Kacper Ludwinski <kacper@ludwinski.dev>
Link: https://github.com/openwrt/openwrt/pull/20735
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-12 12:11:15 +01:00
Roc Lai
1a1df21656 Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-11-12 15:09:15 +08:00
Christian Marangi
b29cf08a1e
openssl: add MODULES_DIR MACRO for provider
Add MODULES_DIR MACRO for provider useful if the relevant package
require to define the default OpenSSL MODULES_PATH.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-11 23:58:54 +01:00
Tianling Shen
45e69ca242
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-11 19:19:09 +08:00
Andy Chiang
631d535282 toplevel.mk: use relative path for feeds/base symlink
Currently, feeds/base is created as an absolute symlink to $(TOPDIR)/package.
If the OpenWrt source tree is copied to another location for building (while keeping the old tree), the symlink will still point to the package directory in the old tree.
Using a relative symlink ensures that feeds/base always points to the package directory within the current OpenWrt source tree, improving portability and avoiding incorrect links.

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20297
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-10 15:20:34 +01:00
Roc Lai
c3208896dd Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-11-08 08:19:25 +08:00
Tianling Shen
ca38cca007
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-07 22:48:46 +08:00
Matthias Franck
2df73702c5 include: download.mk: do not check PKG_MIRROR_HASH when set to "skip"
In commit 042996b46b compilation of git repos is made to fail when PKG_MIRROR_HASH is not correct.

It looks like it was forgotten that in openwrt there is a posibility to set the PKG_MIRROR_HASH to "skip".
In this case the hash check should not be performed and compilation should continue as expected.

This is especially very usefull when doing local testing and development with git repos.

Signed-off-by: Matthias Franck <matthias.franck@softathome.com>
Link: https://github.com/openwrt/openwrt/pull/20655
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-07 12:25:42 +01:00
Eneas U de Queiroz
e495645135
cmake: set CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
According to CMake documentation[1]:

  [CMAKE_FIND_ROOT_PATH] is a list of directories that contain the
  target environment.

  [CMAKE_FIND_ROOT_PATH_MODE_PROGRAM] sets the default behavior for the
  find_program command.

  In most cases, find_program is used to search for an executable which
  will then be executed, e.g. using execute_process or
  add_custom_command. So in most cases an executable from the build host
  is required, so setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM to NEVER is
  normally preferred.

Since CMAKE_FIND_ROOT_PATH is set to the target staging dir, and the
toolchain root dir, it will find target programs before the host ones.

An example of this problem is if you try to build antiblock from the
packages feed after llvm from the video feeds is built.  Antiblock will
search for clang-format, pickup the target version, and fail to build.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>

[1] https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html
Link: https://github.com/openwrt/openwrt/pull/20656

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-05 16:57:51 +01:00
Roc Lai
349bc07a5e Merge remote-tracking branch 'immortalwrt/master' into k6.12-nss 2025-10-27 20:11:01 +08:00
Tianling Shen
14d864fd72
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-10-27 19:48:10 +08:00