mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 21:07:54 +00:00
config: Detect rsync presence at config time
Linux kernel versions newer than 5.3 require rsync in order to export
the UAPI headers. Commit f441a6bf
("linux: Add dependency on rsync for
Linux >= 5.3") attempted to address this with a check that runs when
crosstool-ng is built. That had the downside that if crosstool-ng was
built and packaged on a machine that had rsync then run on a machine
that didn't then the build would fail due to the missing rsync.
Conversely if the first machine didn't have rsync installed when
crosstool-ng was built then we would not offer newer kernel versions.
We can address this by checking for rsync when the toolchain
configuration is updated using some functionality in the newer Kconfig
that we've updated to previously.
Fixes #1940
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
parent
6d1b6e41e9
commit
4442dc87dd
@ -1,4 +1,5 @@
|
||||
mainmenu "crosstool-NG $(CT_VERSION) Configuration"
|
||||
source "config/config_utils.in"
|
||||
source "config/configure.in"
|
||||
source "config/global.in"
|
||||
source "config/target.in"
|
||||
|
7
config/config_utils.in
Normal file
7
config/config_utils.in
Normal file
@ -0,0 +1,7 @@
|
||||
# $(if-success,<command>,<then>,<else>)
|
||||
# Return <then> if <command> exits with 0, <else> otherwise.
|
||||
if-success = $(shell,{ $(1); } >/dev/null 2>&1 && echo "$(2)" || echo "$(3)")
|
||||
|
||||
# $(success,<command>)
|
||||
# Return y if <command> exits with 0, n otherwise
|
||||
success = $(if-success,$(1),y,n)
|
@ -12,12 +12,15 @@
|
||||
# (including versions in between) until the EOL dates indicated below.
|
||||
# Such pinned versions are indicated in version.desc files with a comment.
|
||||
|
||||
config KERNEL_has_rsync
|
||||
def_bool $(success,which rsync)
|
||||
|
||||
config KERNEL_DEP_RSYNC
|
||||
def_bool y
|
||||
select LINUX_REQUIRE_older_than_5_3 if !CONFIGURE_has_rsync
|
||||
select LINUX_REQUIRE_older_than_5_3 if !KERNEL_has_rsync
|
||||
|
||||
comment "Linux >=5.3 requires rsync"
|
||||
depends on !CONFIGURE_has_rsync
|
||||
depends on !KERNEL_has_rsync
|
||||
|
||||
choice
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user