On Sat, Jan 4, 2014 at 10:10 PM, John Spencer <[email protected]> wrote: > i use the following to build busybox in "debug mode" > > if [ ! -z "$DEBUGBUILD" ] ; then > debugcflags="-O0 -g" > sed -i 's/# CONFIG_DEBUG is not set/CONFIG_DEBUG=y/' .config > sed -i 's/# CONFIG_DEBUG_PESSIMIZE is not > set/CONFIG_DEBUG_PESSIMIZE=y/' .config > sed -i 's/CONFIG_NO_DEBUG_LIB=y/# CONFIG_NO_DEBUG_LIB is not set/'
The last sed seems to be not really necessary... > .config > fi > > make V=1 LDFLAGS=-static HOSTLDFLAGS=-static \ > CFLAGS_busybox="$debugcflags -Wl,-z,muldefs > -Werror-implicit-function-declaration" \ > HOSTCC="$CC -static" CC="$CC -static" HOSTCFLAGS=-D_GNU_SOURCE > > and then use busybox_unstripped. > > i'm pretty sure there must be a better way as i cant imagine anyone > debugging busybox copy/pasting for hours. any tips are welcome. Send a patch to make it easier for others? (I take it the important part is setting -O0 -g in CFLAGS_busybox?) _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
