This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Canadian cross build fails


Hi

I am currently trying to build a arm toolchain for windows using linux
as build machine.


Step 1:
Cross (arm)
build =
host =
target = arm

Step 2:
Cross (mingw)
build =
host =
target = mingw

Step 3:
Canadian (mingw,arm)
build =
host = mingw
target = arm

Step 1 and 2 are working nicely but step 3 fails with the following error:

[INFO ]  Installing final compiler for build: done in 223.82s (at 22:21)
[INFO ]  =================================================================
[INFO ]  Installing final compiler
[EXTRA]    Configuring gcc
[EXTRA]    Building libiberty
[EXTRA]    Building gcc
[ALL  ]    arm-gs-linux-gnueabihf-cc   -mlittle-endian -march=armv7-a
-mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mhard-float -O2
-mlittle-endian -march=armv7-a  -mcpu=cortex-a9 -mtune=cortex-a9
-mfpu=vfpv3 -mhard-float  -DIN_GCC  -DCROSS_DIRECTORY_STRUCTU
RE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include  -I. -I. -I../.././gcc
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc/.
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc/../gcc
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc/../include   -g0
-finhibit-size-directive -fno-inline -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize
-fno-stack-protector  -I. -I. -I../.././gcc
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc/.
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc/../gcc
-I/$LONGPATH/.build/src/gcc-4.9.2/libgcc/../include  -o crtendS.o -MT
crtendS.o -MD -MP -MF crtendS.dep  -fPIC -c
/$LONGPATH/.build/src/gcc-4.9.2/libgcc/crtstuff.c -DCRT_END
-DCRTSTUFFS_O
[ALL  ]    In file included from
/$LONGPATH/.build/src/gcc-4.9.2/libgcc/crtstuff.c:54:0:
[ERROR]    ../.././gcc/auto-host.h:1996:17: error: two or more data
types in declaration specifiers
[ALL  ]     #define caddr_t char *
[ALL  ]                     ^
[ALL  ]    In file included from
/$LONGPATH/.build/src/gcc-4.9.2/libgcc/../gcc/tsystem.h:90:0,
[ALL  ]                     from
/$LONGPATH/.build/src/gcc-4.9.2/libgcc/crtstuff.c:60:
[ERROR]    /$LONGPATH/output/arm-gs-linux-gnueabihf/sysroot/usr/include/sys/types.h:116:26:
error: expected identifier or '(' before ';' token
[ALL  ]     typedef __caddr_t caddr_t;
[ALL  ]                              ^

If I check google for that error I come across the following pages:
https://sourceware.org/ml/newlib/2014/msg00034.html
http://www.gurucoding.com/en/pc_cross_compiler/building_binutils_gcc_mingw_vm.php


Both suggest patching gcc autoconf or the C library itself. I can't
belive that this is the correct solution to this issue. Do I miss
something? What is a bit unclear to me is that I don't have to (or I
missed it) specify the path to the toolchain build in step 1 to the
canadian build in step 3. I do pass the toolchain from step 2 into the
crosstools config as host. This is my mini-defconfig of the step 3
toolchain:

CT_LOCAL_TARBALLS_DIR="${HOME}/src"
CT_SAVE_TARBALLS=y
CT_WORK_DIR="${CTNG_WORK_BASE}/.build"
CT_PREFIX_DIR="${CTNG_WORK_BASE}/output"
# CT_INSTALL_DIR_RO is not set
CT_LOG_EXTRA=y
CT_ARCH_ARCH="armv7-a"
CT_ARCH_CPU="cortex-a9"
CT_ARCH_TUNE="cortex-a9"
CT_ARCH_FPU="vfpv3"
CT_ARCH_FLOAT_HW=y
CT_ARCH_arm=y
CT_TARGET_VENDOR="gs"
CT_CANADIAN=y
CT_HOST="i686-gs-mingw32"
CT_HOST_PREFIX="${HOME}/projects/os/toolchain/linux/i686-gs-mingw32/bin/i686-gs-mingw32-"
CT_KERNEL_linux=y
CT_BINUTILS_V_2_25=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_LD_WRAPPER=y
CT_LIBC_glibc=y
CT_LIBC_GLIBC_V_2_20=y
CT_CC_LANG_CXX=y
# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
CT_CC_GCC_DISABLE_PCH=y
CT_DEBUG_dmalloc=y
CT_DEBUG_duma=y
CT_DEBUG_gdb=y
CT_GDB_CROSS_STATIC=y
CT_GDB_NATIVE=y
CT_GDB_NATIVE_STATIC=y
CT_DEBUG_ltrace=y
CT_DEBUG_strace=y

Any ideas are highly welcome.

Regards
Matthias

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]