llvm-gcc configure options for ARM target at llvm-gcc build time

Dear LLVM members.

I am building llvm-gcc in version 2.5 for ARM target.

I used command line option as following:

…/src/configure --prefix=/home/jaykang10/Projects/LLVM/front_end_test/bin/ --enable-languages=c,c++ --enable-checking --enable-llvm=/home/jaykang10/Projects/LLVM/bin/ --disable-bootstrap --disable-multilib --target=arm-eabi

And I got a error message as following:

gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I…/…/src/gcc -I…/…/src/gcc/build -I…/…/src/gcc/…/include -I…/…/src/gcc/…/libcpp/include -I…/…/src/gcc/…/libdecnumber -I…/libdecnumber -I/home/jaykang10/Projects/LLVM/bin//include -I/home/jaykang10/HardDisk2/Projects/LLVM/src/llvm-2.5/include -DENABLE_LLVM -I/home/jaykang10/HardDisk2/Projects/LLVM/bin/include -DARM_COFF_KIST -DARM_KIST_BUG_FIX -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -o build/gencondmd.o build/gencondmd.c
…/…/src/gcc/config/arm/arm.md:4788: error: ‘MACHO_DYNAMIC_NO_PIC_P’ undeclared here (not in a function)
…/…/src/gcc/config/arm/arm.md:4789: warning: missing initializer
…/…/src/gcc/config/arm/arm.md:4789: warning: (near initialization for ‘insn_conditions[15].value’)
…/…/src/gcc/config/arm/arm.md:4703: warning: missing initializer
…/…/src/gcc/config/arm/arm.md:4703: warning: (near initialization for ‘insn_conditions[56].value’)
…/…/src/gcc/config/arm/arm.md:4789: warning: missing initializer
…/…/src/gcc/config/arm/arm.md:4789: warning: (near initialization for ‘insn_conditions[86].value’)

To use “MACHO_DYNAMIC_NO_PIC_P”, I guess that --target option have to include -darwin

In gcc/config.gcc file

Common parts for widely ported systems.

case ${target} in
--darwin*)
tm_file=“${tm_file} darwin.h”

At llvm-gcc build time, I would like to know configure option for ARM target.
and I want to know whether llvm-gcc have bitcode’s difference between -darwin and other configure options.
(ex: -eabi, -elf, etc…)

Thanks

Best regards,
Jin-Gu Kang

I have more questions.

Does the llvm-gcc need ‘target.md’ file at build time?
and
Does the llvm-gcc use generated functions and data structure from ‘target.md’ to make bitcode?

void
tree_rest_of_compilation (tree fndecl)
{

#ifdef ENABLE_LLVM
execute_pass_list(all_extra_lowering_passes);
llvm_emit_code_for_current_function(fndecl);
#else
execute_pass_list (all_passes);
#endif

}

I wonder that llvm-gcc needs rtl related code to make bitcode.

Thanks

Best regards,
Jin-Gu Kang

I am building llvm-gcc in version 2.5 for ARM target.

Consider using 2.6 release or even SVN top of the tree. The problem
was fixed there.

and I want to know whether llvm-gcc have bitcode's difference between
-darwin and other configure options.
(ex: -eabi, -elf, etc...)

Yes, there are bitcode differences due to different set of defines,
different ABIs, etc.