Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237716 - >=sys-apps/busybox-1.10 fails cross-compilation to ARM
Summary: >=sys-apps/busybox-1.10 fails cross-compilation to ARM
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 12:44 UTC by Robert Piasek (RETIRED)
Modified: 2008-09-16 21:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Piasek (RETIRED) gentoo-dev 2008-09-15 12:44:21 UTC
When I crosscompile >=sys-apps/busybox-1.10 it fails with compilation errors:

  CC      miscutils/chat.o
  CC      libbb/execable.o
  CC      libbb/fclose_nonstdin.o
miscutils/chat.c: In function ‘chat_main’:
miscutils/chat.c:196: error: ‘for’ loop initial declaration used outside C99 mode
make[1]: *** [miscutils/chat.o] Error 1
make: *** [miscutils] Error 2
make: *** Waiting for unfinished jobs....


and later:

  CC      libbb/parse_config.o
  CC      libbb/parse_mode.o
libbb/parse_config.c: In function ‘parse_main’:
libbb/parse_config.c:30: error: ‘for’ loop initial declaration used outside C99 mode
make[1]: *** [libbb/parse_config.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [libbb] Error 2


I'm using:
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -Os -pipe"
gcc-4.3.1, glibc-2.8_p20080602

on dest:
ARCH="arm"
CHOST="armv4tl-softfloat-linux-gnueabi"
CFLAGS="-march=armv4t -mtune=arm920t -Os -pipe"
armv4tl-softfloat-linux-gnueabi-4.3.1
kernel headers 2.6.24
glibc-2.7-r2
binutils-2.18

it does compile natively on x86_64 though.

If I add -std=c99 to CFLAGS it compile this file, but fails in a different place.

1.9.2 is the last version which cross compile fine for me.



Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-15 13:45:48 UTC
Please post your `emerge --info' too as well as the cross compilation config and commands.