sh4-unknown-linux-gnu failures
Paolo Pisati
p.pisati@gmail.com
Mon Sep 14 08:42:00 GMT 2015
I spent part of the weekend trying to build a toolchain for the sh4 with
different results: the only release that successfully built a toolchain was
rev 1.20.0 (but then i had problems compiling a kernel with it, see below),
while the process failed in all the other releases.
After every checkout i did a 'git clean -fdx; ./bootstrap; ./configure
--enable-local; make; ./ct-ng sh4-unknown-linux-gnu; ./ct-ng build;"
< 1.19.0:
weird errors here...
1.19.0:
...
[DEBUG] Entering '/home/flag/canonical/crosstool-ng/.build/src/mpfr-2.4.2'
[DEBUG] Running autoreconf
[DEBUG] ==> Executing: 'autoreconf'
[ALL ] aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
[ERROR] configure.in:294: error: automatic de-ANSI-fication support has been removed
[ALL ] /usr/share/aclocal-1.14/obsolete.m4:26: AM_C_PROTOTYPES is expanded from...
[ALL ] configure.in:294: the top level
[ALL ] autom4te: /usr/bin/m4 failed with exit status: 1
[ERROR] aclocal: error: echo failed with exit status: 1
[ALL ] autoreconf: aclocal failed with exit status: 1
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Extracting and patching toolchain components'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_mpfr_extract[scripts/build/companion_libs/110-mpfr.sh@37]
[ERROR] >> called from: do_companion_libs_extract[scripts/build/companion_libs.sh@22]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@600]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> 'docs/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 0:08.01)
1.21.0:
[ALL ] a - elf/unwind-pe.os
[ALL ] sh4-unknown-linux-gnu-gcc -nostdlib -nostartfiles -r -o
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/bui
ld/build-libc-final/libc_pic.os -Wl,-d -Wl,--whole-archive
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc
-final/libc_pic.a -o
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/libc_pic.os
[ALL ] sh4-unknown-linux-gnu-gcc -nostdlib -nostartfiles -r -o
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/bui
ld/build-libc-final/elf/librtld.map.o '-Wl,-('
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/elf/dl
-allobjs.os
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/libc_pic.a
-lgcc '-Wl,-)' -Wl,-Map,/home/
flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/elf/librtld.mapT
[ALL ]
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/libc_pic.a(dl-addr.os):
In function `_dl_a
ddr_inside_object':
[ALL ] dl-addr.c:(.text+0x224): multiple definition of
`_dl_addr_inside_object'
[ALL ]
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/elf/dl-allobjs.os:(.text+0x10e1c):
first d
efined here
[ALL ]
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/libc_pic.a(init-first.os):(.data+0x0):
mul
tiple definition of `__libc_multiple_libcs'
[ALL ]
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/elf/dl-allobjs.os:(.bss+0x74):
first defin
ed here
[ALL ]
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/libc_pic.a(_itoa.os):
In function `_itoa':
[ALL ] _itoa.c:(.text+0xe0): multiple definition of `_itoa'
[ALL ]
/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/elf/dl-allobjs.os:(.text+0x130d0):
first d
efined here
[ERROR] collect2: error: ld returned 1 exit status
[ALL ] Makefile:307: recipe for target
'/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/elf/librt
ld.map' failed
[ERROR] make[3]: ***
[/home/flag/canonical/crosstool-ng/.build/sh4-unknown-linux-gnu/build/build-libc-final/elf/librtld.map]
Error 1
[ALL ] make[3]: *** Waiting for unfinished jobs....
[ALL ] make[3]: Leaving directory
'/home/flag/canonical/crosstool-ng/.build/src/glibc-2.21/elf'
[ALL ] Makefile:213: recipe for target 'elf/subdir_lib' failed
[ERROR] make[2]: *** [elf/subdir_lib] Error 2
[ALL ] make[2]: Leaving directory
'/home/flag/canonical/crosstool-ng/.build/src/glibc-2.21'
[ALL ] Makefile:9: recipe for target 'all' failed
[ERROR] make[1]: *** [all] Error 2
1.20.0:
got a toolchain, but i couldn't build a linux kernel with it:
[flag@southcross linux]$ export PATH=$HOME/x-tools/sh4-unknown-linux-gnu/bin/:$PATH
[flag@southcross linux]$ export ARCH=sh
[flag@southcross linux]$ git checkout v4.1
[flag@southcross linux]$ make rts7751r2dplus_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
[flag@southcross linux]$ make
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/machtypes.h' is up to date.
CC kernel/bounds.s
gcc: error: unrecognized command line option -m4-nofpu
gcc: error: unrecognized command line option -ml
gcc: error: unrecognized command line option -m4-nofpu
gcc: error: unrecognized command line option -ml
Kbuild:43: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:989: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
[flag@southcross linux]$
[flag@southcross linux]$ git grep -- -m4-nofpu
arch/sh/Makefile: $(callcc-option,-m4-nofpu,)
arch/sh/Makefile: $(call cc-option,-mno-implicit-fp,-m4-nofpu)
arch/sh/Makefile:
...
cflags-$(CONFIG_CPU_SH4) $(call cc-option,-m4,) \
$(call cc-option,-mno-implicit-fp,-m4-nofpu)
...
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) +=-ml
...
linux enforces these two switches (-m4-nofpu and -ml) in case of an SH4
target.
Please cc me as i'm offlist.
--
bye,
p.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list