[Toybox] [PATCH] Support HOSTCFLAGS on musl
orc
orc at sibserver.ru
Wed Jun 13 07:58:59 PDT 2012
This patch adds support for specifying HOSTCFLAGS, for
something like "make menuconfig HOSTCFLAGS=-D_GNU_SOURCE" on
musl systems.
diff -Naur toybox-0.3.0.o/kconfig/Makefile toybox-0.3.0/kconfig/Makefile
--- toybox-0.3.0.o/kconfig/Makefile 2012-06-12 14:14:50.000000000
+0800 +++ toybox-0.3.0/kconfig/Makefile 2012-06-13
22:43:11.343051480 +0800 @@ -53,12 +53,12 @@
gen_config.h: .config
kconfig/mconf: $(SHIPPED)
- $(HOSTCC) -o $@ kconfig/mconf.c kconfig/zconf.tab.c \
+ $(HOSTCC) $(HOSTCFLAGS) -o $@ kconfig/mconf.c
kconfig/zconf.tab.c \ kconfig/lxdialog/*.c -lcurses
-DCURSES_LOC="<ncurses.h>" \ -DKBUILD_NO_NLS=1
-DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
kconfig/conf: $(SHIPPED)
- $(HOSTCC) -o $@ kconfig/conf.c kconfig/zconf.tab.c
-DKBUILD_NO_NLS=1 \
+ $(HOSTCC) $(HOSTCFLAGS) -o $@ kconfig/conf.c
kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
-DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
clean::
There is one issue remain on musl systems. musl has no crypt.h,
but I don't know where to put crypt.h in lib/portability.h (maybe musl
will add crypt.h in future).
Also, no lex and yacc sources for pregenerated *_shipped in kconf (this
is not so necessary, but even busybox and linux kernel has *.l and *.y
on their places :-) ).
1339599539.0
More information about the Toybox
mailing list