buildroot/support/kconfig
Edgar Bonet 427c299a84 support/kconfig: fix compiler warnings
Compiling on Ubuntu 20.04 generates this:

./util.c: In function ‘file_write_dep’
./util.c:54:18: warning: ‘..config.tmp’ directive writing 12 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   54 |  sprintf(buf, "%s..config.tmp", dir);
      |                  ^~~~~~~~~~~~
./util.c:54:2: note: ‘sprintf’ output between 13 and 4109 bytes into a destination of size 4097
   54 |  sprintf(buf, "%s..config.tmp", dir);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and similar warnings on confdata.c, lines 778, 989, 995, 1000, 1007,
1040, 1046 and 1054. Avoid the warnings by enlarging the destination
buffer of fprintf().

Normally, we want changes to kconfig to be reflected by patches in
support/kconfig/patches. This makes it easier to resync with upstream
kconfig. However, in this case, everything that is changed here is
already changed completely (and differently) upstream, so there is no
added value in keeping the patch.

Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit 324612d68e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-10-07 08:22:03 +02:00
..
lxdialog support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
patches support/kconfig/merge_config.sh: avoid false positive matches from comment lines 2018-11-24 10:11:15 +01:00
.gitignore support: move kconfig stuff from package/config to support/kconfig 2011-09-17 08:17:06 +02:00
check.sh support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
conf.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
confdata.c support/kconfig: fix compiler warnings 2021-10-07 08:22:03 +02:00
expr.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
expr.h support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
foo.h support: move kconfig stuff from package/config to support/kconfig 2011-09-17 08:17:06 +02:00
gconf.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
gconf.glade support: move kconfig stuff from package/config to support/kconfig 2011-09-17 08:17:06 +02:00
images.c support: move kconfig stuff from package/config to support/kconfig 2011-09-17 08:17:06 +02:00
kconf_id.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
kxgettext.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
list.h support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
lkc_proto.h support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
lkc.h support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
Makefile support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
Makefile.br support/kconfig: use kconfig-provided way of setting the CONFIG_ prefix 2013-04-21 23:33:11 +02:00
mconf.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
menu.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
merge_config.sh support/kconfig/merge_config.sh: avoid false positive matches from comment lines 2018-11-24 10:11:15 +01:00
nconf.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
nconf.gui.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
nconf.h support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
POTFILES.in support: move kconfig stuff from package/config to support/kconfig 2011-09-17 08:17:06 +02:00
qconf.cc support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
qconf.h support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
README.buildroot support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
streamline_config.pl support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
symbol.c support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
util.c support/kconfig: fix compiler warnings 2021-10-07 08:22:03 +02:00
zconf.l support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
zconf.lex.c_shipped support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
zconf.tab.c_shipped support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00
zconf.y support/kconfig: bump to kconfig from Linux 4.17-rc2 2018-09-20 23:14:38 +02:00

This is a copy of the kconfig code in the kernel (currently 4.17-rc2) tweaked
to suit Buildroot.

To update:
	cp -r /usr/src/linux/scripts/kconfig support/kconfig.new
	cd support/kconfig.new
	# zconf.lex.c and zconf.tab.c needs to be generated by 'make menuconfig'
	mv zconf.lex.c zconf.lex.c_shipped
	mv zconf.tab.c zconf.tab.c_shipped
	rm -rf tests/
	cp -a ../kconfig/patches ../kconfig/README.buildroot ../kconfig/.gitignore .
	quilt push -a
	# Fix any conflict
	cd ..
	rm -rf kconfig
	mv kconfig.new kconfig

Then verify the toplevel targets work:
	config
	defconfig
	menuconfig
	nconfig
	xconfig
	gconfig
	oldconfig