gcc: Compilation failure with -falign-arrays?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
Hardware = BCM920732 tag

Host = Linux (ubuntu 13.04) x86_64

Toolchain = CodeSourcery arm-none-eabi 2013.05

gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-23)

Compiling the sample program bleprox that came as part of the ADK I get a error that gcc does not recognize -falign-arrays.  I had to compile w/o using that option.

1. Are there any problem w/ not using -falign-arrays

2. The app note says use the latest GCC version from CodeSourcery.  What is the verison of gcc that is recommended?  Is 4.7.3 ok? 

Thanks

Srini

-----------------

make BLD=A_20732A0 BASE_IN=rom SPAR_IN=ram DIR=brcm/bleprox GCC_TOOL_DIR=/usr/share/enimai/arm-2013.05/bin/ TC=gcc clean cgs

/usr/share/enimai/arm-2013.05/bin/arm-none-eabi-gcc -DBCM20732 -DBB_20732A0 -DGPIO_NUMBER_OF_PINS=40 -DGPIO_MAX_PINS_PER_PORT=16 -DGPIO_NUMBER_OF_PORTS=3 -DBLE_LRK_LIST_SIZE=4 -DBLEAPP -funsigned-char -falign-arrays -c -DCOMPILER_ARM -mlittle-endian -mcpu=cortex-m3 -mthumb -Os -g -Wa,-adhln -ffreestanding -DSPAR_CRT_SETUP=bleprox_spar_crt_setup -DSPAR_APP_SETUP=bleprox_spar_app_setup -D__TARGET_CPU_CORTEX_M3 -D__ARMCC_VERSION=220438 -ffunction-sections -Ibrcm/bleprox -I. -I../inc -I../cfa -I../bsp/inc -I../bleapp -I../bleapp/app -I../bleapp/drivers -I../bleapp/utils -I../misc -I../rtos/threadx -I../rtos/threadx/cm3 -I../bleapp/lestack/att -I../bleapp/lestack/l2cap -I../bleapp/lestack/blecm -I../bleapp/lestack/gatt -I../bleapp/lestack/profile -I../bleapp/lestack/smp -I../bleapp/lestack/ap -I. -Icommon -Ibrcm/bleprox -I../tier2/brcm/bleprox/bld/A_20732A0/.. -I../tier2/patch/inc  -o brcm/bleprox/obj-A_20732A0-rom-ram/spar_setup.o common/spar_setup.c > brcm/bleprox/obj-A_20732A0-rom-ram/spar_setup.s

arm-none-eabi-gcc: error: unrecognized command line option -falign-arrays

make: *** [brcm/bleprox/obj-A_20732A0-rom-ram/spar_setup.o] Error 1
0 Likes
1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA
This is a valid option with CodeSourcery G++ Lite version 2011.03-42. So you have two options, use this version of CodeSourcery or edit <adk>/spar/makecm3_gcc.inc and remove the -falign-arrays option from C_SPECIFIC_FLAGS. This will not affect the way the application gets built. The next version of the SDK will have a fix for this issue.

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable
any ideas on this? we see the same error. thanks.
0 Likes
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA
This is a valid option with CodeSourcery G++ Lite version 2011.03-42. So you have two options, use this version of CodeSourcery or edit <adk>/spar/makecm3_gcc.inc and remove the -falign-arrays option from C_SPECIFIC_FLAGS. This will not affect the way the application gets built. The next version of the SDK will have a fix for this issue.
0 Likes