[Toybox] [PATCH] toysh can't build without test_main, get kconfig to do something about this.

Oliver Webb aquahobbyist at proton.me
Wed Feb 21 14:47:30 PST 2024


If you `make allnoconfig menuconfig' and switch the shell on, the build will fail because test_main() isn't being built:

./sbin/ld: generated/obj/main.o:(.data.rel.toy_list+0xa8): undefined reference to `test_main'
/sbin/ld: generated/obj/main.o:(.data.rel.toy_list+0xc8): undefined reference to `test_main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:17: toybox] Error 1

This makes doing minimal builds of toybox with the shell more annoying since you have to make sure to switch on test.
The solution is to add "select TEST" into the config for the shell (CONFIG_SH).

Note: this would be the only time the "select" option is used by any config symbol in toybox.

-   Oliver Webb <aquahobbyist at proton.me>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-toysh-cannot-build-without-test_main-make-kconfig-no.patch
Type: text/x-patch
Size: 593 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20240221/e021f3d7/attachment.bin>


More information about the Toybox mailing list