Match whole words when changing .config options
PATCH 1/2 Match whole words when changing .config options
Make KCONFIG_{ENABLE,DISABLE,SET}_OPT match whole words only. Fixes that BR_INET_IPV6 enables CONFIG_IPV6 in the kernel's .config, but also nukes everything with "CONFIG_IPV6" in its name, e.g. CONFIG_IPV6_PRIVACY. This in turn causes any IPv6 options in a custom kernel .config to be lost and oldconfig going interactive.
--- package/Makefile.package.in | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
package/Makefile.package.in +3 -3
@@ -41,17 +41,17 @@ UPPERCASE = $(strip $(eval __tmp := $1) \ $(__tmp)) define KCONFIG_ENABLE_OPT - $(SED) "/$(1)/d" $(2) + $(SED) "/\\<$(1)\\>/d" $(2) echo "$(1)=y" >> $(2) endef define KCONFIG_SET_OPT - $(SED) "/$(1)/d" $(3) + $(SED) "/\\<$(1)\\>/d" $(3) echo "$(1)=$(2)" >> $(3) endef define KCONFIG_DISABLE_OPT - $(SED) "/$(1)/d" $(2) + $(SED) "/\\<$(1)\\>/d" $(2) echo "# $(1) is not set" >> $(2) endef
Signature · 1 line
1.7.1
PATCH 2/2 Choose host/target ldconfig based on availability
Decide whether to use the host or target ldconfig based on an availability check instead of internal/external toolchain selection. An external toolchain may very well provide an ldconfig while the host's one may fail.
External toolchain generated by Gentoo crossdev:
$ LC_ALL=C i686-pc-linux-uclibc-ldconfig -r output/target/; echo $? i686-pc-linux-uclibc-ldconfig: skipping /usr/lib: No such file or directory 0
vs. the host (x86_64-pc-linux-gnu) version:
$ LC_ALL=C /sbin/ldconfig -r output/target/; echo $? /sbin/ldconfig: Can't open configuration file output/target/etc/ld.so.conf: No such file or directory /sbin/ldconfig: Can't open cache file /var/cache/ldconfig/aux-cache : No such file or directory 1 --- package/Makefile.in | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
package/Makefile.in +3 -3
@@ -127,10 +127,10 @@ TARGET_RANLIB = $(TARGET_CROSS)ranlib TARGET_OBJCOPY = $(TARGET_CROSS)objcopy TARGET_OBJDUMP = $(TARGET_CROSS)objdump -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -TARGET_LDCONFIG = $(TARGET_CROSS)ldconfig -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +ifeq ($(shell $(SHELL) -c "command -v $(TARGET_CROSS)ldconfig"),) TARGET_LDCONFIG = /sbin/ldconfig +else +TARGET_LDCONFIG = $(TARGET_CROSS)ldconfig endif ifeq ($(BR2_STRIP_strip),y)
Signature · 1 line
1.7.1
PATCH 1/2 Match whole words when changing .config options
In reply to Malte StarostikQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Malte" == Malte Starostik <[email protected]> writes:
Malte> Make KCONFIG_{ENABLE,DISABLE,SET}_OPT match whole words only. Malte> Fixes that BR_INET_IPV6 enables CONFIG_IPV6 in the kernel's Malte> .config, but also nukes everything with "CONFIG_IPV6" in its name, e.g. Malte> CONFIG_IPV6_PRIVACY. This in turn causes any IPv6 options in a custom Malte> kernel .config to be lost and oldconfig going interactive.
Committed both, thanks.
In the future, don't forget to sign off on your patches (use -s).
Signature · 1 line
Bye, Peter Korsgaard