pmb.build.autodetect: support pmb:cross-native (MR 1920)
Have explicit selection of the "native" cross compilation method with a new "pmb:cross-native" option. Deprecate the implicit pkgname pattern matching. Related: #1910
This commit is contained in:
parent
34c6f88691
commit
77a6ad03cb
|
@ -38,7 +38,7 @@ def generate_apkbuild(args, pkgname, deviceinfo, patches):
|
|||
_flavor=\"""" + device + """\"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends=\"""" + makedepends + """\"
|
||||
|
||||
# Source
|
||||
|
|
|
@ -65,10 +65,19 @@ def suffix(args, apkbuild, arch):
|
|||
if arch == args.arch_native:
|
||||
return "native"
|
||||
|
||||
if "pmb:cross-native" in apkbuild["options"]:
|
||||
return "native"
|
||||
|
||||
pkgname = apkbuild["pkgname"]
|
||||
if args.cross:
|
||||
for pattern in pmb.config.build_cross_native:
|
||||
if fnmatch.fnmatch(pkgname, pattern):
|
||||
logging.info(f"NOTE: '{pkgname}' would implicitly get cross"
|
||||
f" compiled with the 'native' method, because"
|
||||
f" it matches pattern '{pattern}'.")
|
||||
logging.info("NOTE: this pattern matching will be removed in"
|
||||
" the future, add 'pmb:cross-native' to the"
|
||||
" APKBUILD's options to make it explicit.")
|
||||
return "native"
|
||||
|
||||
return "buildroot_" + arch
|
||||
|
|
Loading…
Reference in New Issue