Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jun 2016 19:41:54 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        erichsfreebsdlist@alogt.com, freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   RE: Compiling 11 on a Raspberry B+ 2 failes [not in my experience for -r301975]
Message-ID:  <A56FE75D-AC52-48DB-9631-AD9BC31DA5FB@dsl-only.net>

next in thread | raw e-mail | index | archive | help
Quoting Erich Dollansky erichsfreebsdlist at alogt.com Sun Jun 19 =
23:38:56 UTC 2016 :

> I am trying to compile HEAD on a Raspberry and get always the =
following
> error.
>=20
> Of course, compiling revision 302017 on amd64 works.
>=20
> Erich
>=20
> Last Changed Rev: 301974
>=20
>  /usr/src/lib/csu/arm/crt1.c:(.text+0xb4): relocation truncated to
> fit: R_ARM_CALL against symbol `atexit' defined in .text section
> in /usr/lib/libc.a(atexit.o) /usr/src/lib/csu/arm/crt1.c:(.text+0xbc):
> relocation truncated to fit: R_ARM_CALL against symbol `_init_tls'
> defined in .text section
> in /usr/lib/libc.a(tls.o) /usr/src/lib/csu/arm/crt1.c:(.text+0xcc):
> relocation truncated to fit: R_ARM_CALL against symbol `atexit' =
defined
> in .text section
> in /usr/lib/libc.a(atexit.o) =
/usr/src/lib/csu/arm/crt1.c:(.text+0x174):
> relocation truncated to fit: R_ARM_CALL against symbol `exit' defined
> in .text section in /usr/lib/libc.a(exit.o) /usr/lib/crt1.o: In
> function `finalizer': /usr/src/lib/csu/arm/crt1.c:(.text+0x1ec):
> relocation truncated to fit: R_ARM_JUMP24 against symbol `_fini'
> defined in .fini section in /usr/lib/crti.o c++: error: linker command
> failed with exit code 1 (use -v to see invocation) *** Error code 1
>=20
> Stop.
> bmake[4]: stopped in /usr/src.head/usr.bin/clang/clang
> *** Error code 1
>=20
> Stop.
> bmake[3]: stopped in /usr/src.head/usr.bin/clang
> *** Error code 1
>=20
> Stop.
> bmake[2]: stopped in /usr/src.head
> *** Error code 1
>=20
> Stop.
> bmake[1]: stopped in /usr/src.head
> *** Error code 1
>=20
> Stop.
> make: stopped in /usr/src.head
> [raspberry2]~/System (root) >=20


I've done buildworld buildkernel for -r301975 on an rpi2 (not using  =
WITH_META_MODE=3Dyes) with no problem. The rpi2 was already running =
-r301975 via a amd64 -> rpi2 cross build.

You do not mention what vintage of 11.0 your -r301974 build was started =
from. A

uname -apKU

output would be appropriate to post as one way of indicating that.

My WITH_META_MODE=3Dyes buidlworld buildkernel is still in process.

Later below list my src.conf showing my slightly odd choices targeting =
armv7-a/cortex-a7 explicitly. I'd be surprised if that makes a =
difference for this issue. You have not provided your src.conf or =
make.conf or other such context.

My -r301975 cross builds on amd64 targeting an rpi2 [armv7-a/cortex-a7] =
have all worked fine (no matter if WITH_META_MODE_yes was in use or =
not).

I've only used the system clang 3.8.0 to target armv6 in modern times.

My src.conf for rpi2 self hosted builds looks like:

> # more ~/src.configs/src.conf.rpi2-clang-bootstrap.rpi2-host=20
> TO_TYPE=3Darmv6
> #
> KERNCONF=3DRPI2-NODBG
> TARGET=3Darm
> .if ${.MAKE.LEVEL} =3D=3D 0
> TARGET_ARCH=3D${TO_TYPE}
> .export TARGET_ARCH
> .endif
> #
> #WITH_CROSS_COMPILER=3D
> WITH_SYSTEM_COMPILER=3D
> #
> #CPUTYPE=3Dsoft
> WITH_LIBSOFT=3D
> WITH_LIBCPLUSPLUS=3D
> WITH_BINUTILS_BOOTSTRAP=3D
> #WITHOUT_CLANG_BOOTSTRAP=3D
> WITH_CLANG=3D
> WITH_CLANG_IS_CC=3D
> WITH_CLANG_FULL=3D
> WITH_CLANG_EXTRAS=3D
> WITH_LLDB=3D
> #
> WITH_BOOT=3D
> WITHOUT_LIB32=3D
> #
> WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D
> WITHOUT_GCC_BOOTSTRAP=3D
> WITHOUT_GCC=3D
> WITHOUT_GCC_IS_CC=3D
> WITHOUT_GNUCXX=3D
> #
> NO_WERROR=3D
> #WERROR=3D
> MALLOC_PRODUCTION=3D
> #
> WITH_DEBUG_FILES=3D
> #
> XCFLAGS+=3D -march=3Darmv7-a -mcpu=3Dcortex-a7
> XCXXFLAGS+=3D -march=3Darmv7-a -mcpu=3Dcortex-a7
> # There is no XCPPFLAGS but XCPP ets XCFLAGS content.

The ~/src.configs/make.conf is empty.

The amd64 -> rpi2 cross builds are only different for src.conf by:

> # diff ~/src.configs/src.conf.rpi2-clang-bootstrap.rpi2-host =
~/src.configs/src.conf.rpi2-clang-bootstrap.amd64-host=20
> 10,11c10,11
> < #WITH_CROSS_COMPILER=3D
> < WITH_SYSTEM_COMPILER=3D
> ---
> > WITH_CROSS_COMPILER=3D
> > WITHOUT_SYSTEM_COMPILER=3D
> 17c17
> < #WITHOUT_CLANG_BOOTSTRAP=3D
> ---
> > WITH_CLANG_BOOTSTRAP=3D


Showing the "on a rpi2" script that runs make for using =
WITH_META_MODE=3Dyes :

> # more =
~/sys_build_scripts.rpi2-host/make_rpi2_nodebug_clang_bootstrap-rpi2-host.=
sh=20
> kldload -n filemon && \
> script =
~/sys_typescripts/typescript_make_rpi2_nodebug_clang_bootstrap-rpi2-host-$=
(date +%Y-%m-%d:%H:%M:%S) \
> env __MAKE_CONF=3D"/root/src.configs/make.conf" =
SRC_ENV_CONF=3D"/root/src.configs/src.conf.rpi2-clang-bootstrap.rpi2-host"=
 \
> WITH_META_MODE=3Dyes \
> MAKEOBJDIRPREFIX=3D"/usr/obj/clang/arm.armv6" \
> make $*

My /usr/src tree has some changes/additions --but mostly for powerpc64 =
and powerpc issues:

> # svnlite status /usr/src/
> M       =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
> M       /usr/src/lib/csu/powerpc64/Makefile
> ?       /usr/src/sys/amd64/include/include
> ?       /usr/src/sys/arm/conf/RPI2-NODBG
> ?       /usr/src/sys/arm/include/include
> M       /usr/src/sys/boot/ofw/Makefile.inc
> M       /usr/src/sys/boot/powerpc/Makefile
> M       /usr/src/sys/boot/powerpc/Makefile.inc
> M       /usr/src/sys/boot/uboot/Makefile.inc
> M       /usr/src/sys/conf/Makefile.powerpc
> M       /usr/src/sys/conf/kern.mk
> M       /usr/src/sys/conf/kmod.mk
> M       /usr/src/sys/dev/cxgb/ulp/tom/cxgb_listen.c
> M       /usr/src/sys/dev/cxgbe/tom/t4_listen.c
> ?       /usr/src/sys/powerpc/conf/GENERIC64-NODBG
> ?       /usr/src/sys/powerpc/conf/GENERIC64vtsc
> ?       /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODEBUG
> ?       /usr/src/sys/powerpc/conf/GENERICvtsc
> ?       /usr/src/sys/powerpc/conf/GENERICvtsc-NODEBUG
> ?       /usr/src/sys/powerpc/include/include
> M       /usr/src/sys/powerpc/ofw/ofw_machdep.c
> M       /usr/src/sys/powerpc/powerpc/exec_machdep.c
> ?       /usr/src/sys/x86/include/include

(The include/include ones are from something making links pointing back =
up to the parent include/ . I did not explicitly create these.)

(The cxbg and cxbge ones were from trying to have amd64 target amd64 via =
xtoolchain (devel/amd64-gcc). But other places also stopped it and I =
quit trying that for now.)


=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A56FE75D-AC52-48DB-9631-AD9BC31DA5FB>