Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jun 2017 17:34:09 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Subject:   -r319936 and -r319991 TARGET_ARCH=powerpc via clang: boot1.chrp/boot1.c:(.text+0x14b8): undefined reference to `__udivdi3' (boot1.o: In function `fsread_size')
Message-ID:  <D1A5D702-7C77-4288-93E2-3C41A6F5417F@dsl-only.net>

next in thread | raw e-mail | index | archive | help
Context: amd64 -> powerpc cross build of -r319936
(one of my usual clang-based experiments):

--- all_subdir_sys ---
Building =
/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/boot/powerpc/boot1.=
chrp/boot1.elf
--- boot1.elf ---
boot1.o: In function `fsread_size':
/usr/src/sys/boot/powerpc/boot1.chrp/boot1.c:(.text+0x14b8): undefined =
reference to `__udivdi3'
/usr/src/sys/boot/powerpc/boot1.chrp/boot1.c:(.text+0x1508): undefined =
reference to `__udivdi3'
cc: error: linker command failed with exit code 1 (use -v to see =
invocation)
--- all_subdir_lib ---
Building =
/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/lib/msun/s_remquo.po
--- all_subdir_sys ---
*** [boot1.elf] Error code 1

make[6]: stopped in /usr/src/sys/boot/powerpc/boot1.chrp
.ERROR_TARGET=3D'boot1.elf'
=
.ERROR_META_FILE=3D'/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys=
/boot/powerpc/boot1.chrp/boot1.elf.meta'


# Meta data file =
/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/boot/powerpc/boot1.=
chrp/boot1.elf.meta
CMD cc -target powerpc-unknown-freebsd12.0 =
--sysroot=3D/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp =
-B/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin =
-ffreestanding -msoft-float =
-I/usr/src/sys/boot/powerpc/boot1.chrp/../../common =
-I/usr/src/sys/boot/powerpc/boot1.chrp/../../../ -D_STANDALONE =
-std=3Dgnu99 -Qunused-arguments -nostdlib -static -Wl,-N -o boot1.elf =
boot1.o ashldi3.o syncicache.o =20
CWD =
/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/boot/powerpc/boot1.=
chrp
TARGET boot1.elf
-- command output --
boot1.o: In function `fsread_size':
/usr/src/sys/boot/powerpc/boot1.chrp/boot1.c:(.text+0x14b8): undefined =
reference to `__udivdi3'
/usr/src/sys/boot/powerpc/boot1.chrp/boot1.c:(.text+0x1508): undefined =
reference to `__udivdi3'
cc: error: linker command failed with exit code 1 (use -v to see =
invocation)
*** Error code 1

Note: This was -j16 for the build.

I updated /usr/src and amd64 to -r319991 and then
retried cross building for powerpc: same result.


Note: I'd frozen at -r317820 until this update. Back then
I could buildworld and buildkernel via clang (although
I could not boot the clang-based kernel and so had to
build a gcc 4.2.1 based one and use it).



=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?D1A5D702-7C77-4288-93E2-3C41A6F5417F>