[BusyBox] [PATCH] busybox-1.00-pre3 "fix" procps/top.c when -O2 used on cris arch

Friedrich Lobenstock fl at fl.priv.at
Mon Dec 8 20:34:48 UTC 2003


Friedrich Lobenstock wrote on 07.12.2003 21:41 MET:
> Hi busybox developers!
> 
> When compiling busybox-1.00-pre3/ for the Axis developer board with it's
> cris arch I can not compile busybox. As I found out this is because the
> axis developer system adds "-O2" to the default extra cflags. Here's the
> output of the compile:
> 
> gcc-cris  -isystem 
> /home/fl/axis/devboard_82/target/cris-axis-linux-gnu/include -mlinux 
> -I./include -Wall -Wstrict-prototypes -Wshadow -Os -fomit-frame-pointer 
> -D_GNU_SOURCE -DNDEBUG  -Wall -Wshadow -O2 -g  -c -o procps/top.o 
> procps/top.c
> procps/top.c:378:1: directives may not be used inside a macro argument
> procps/top.c:377:60: unterminated argument list invoking macro "printf"
> procps/top.c: In function `display_status':
> procps/top.c:381: parse error before "s"
> make[1]: *** [procps/top.o] Fehler 1
> make[1]: Leaving directory 
> `/opt/develop/axis/devboard_82/apps/busybox/busybox-1.00-pre3'
> 
> # cris-gcc --version
> cris-axis-elf-gcc (GCC) 3.2.1 Axis release R54/1.54
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> To fix this I had to make the changes below to the source of busybox
> top. The problem is that the compile can not check the printf when
> there are #ifdef's distributed across a call to printf. If this essentially
> a bug of the supplied compiler or not is out of my knowledge.

The same patch but for todays snapsshot is attached.

-- 
MfG / Regards
Friedrich Lobenstock
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-busybox-unstable
Url: http://lists.busybox.net/pipermail/busybox/attachments/20031208/ffaaa8c3/attachment.diff 


More information about the busybox mailing list