From owner-freebsd-bugs@freebsd.org Fri Jun 16 04:33:11 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED6DBF61D3 for ; Fri, 16 Jun 2017 04:33:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C2F86FB45 for ; Fri, 16 Jun 2017 04:33:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v5G4XBdt000544 for ; Fri, 16 Jun 2017 04:33:11 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 220024] head -r319991 clang powerpc toolchain (cross build target): boot1.o: In function `fsread_size': undefined reference to `__udivdi3' Date: Fri, 16 Jun 2017 04:33:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2017 04:33:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220024 Bug ID: 220024 Summary: head -r319991 clang powerpc toolchain (cross build target): boot1.o: In function `fsread_size': undefined reference to `__udivdi3' Product: Base System Version: CURRENT Hardware: powerpc OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: markmi@dsl-only.net 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.c= hrp/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.c= hrp/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 -ffreestan= ding -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=20 CWD /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/boot/powerpc/boot1.c= hrp 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). Note: A buildworld buildkernel via gcc 4.2.1 did not have this problem. It is clang tool chain specific. Clang based build-context details: # more ~/sys_build_scripts.amd64-host/make_powerpcvtsc_nodebug_clang_bootstrap-amd= 64-host.sh=20 kldload -n filemon && \ script ~/sys_typescripts/typescript_make_powerpcvtsc_nodebug_clang_bootstrap-amd64= -host-$(date +%Y-%m-%d:%H:%M:%S) \ env __MAKE_CONF=3D"/root/src.configs/make.conf" SRCCONF=3D"/dev/null" SRC_ENV_CONF=3D"/root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-ho= st" \ WITH_META_MODE=3Dyes \ MAKEOBJDIRPREFIX=3D"/usr/obj/powerpcvtsc_clang" \ make $* # more /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host TO_TYPE=3Dpowerpc # KERNCONF=3DGENERICvtsc-NODBG TARGET=3D${TO_TYPE} .if ${.MAKE.LEVEL} =3D=3D 0 TARGET_ARCH=3D${TO_TYPE} .export TARGET_ARCH .endif # WITH_CROSS_COMPILER=3D WITHOUT_SYSTEM_COMPILER=3D # WITH_LIBCPLUSPLUS=3D WITH_BINUTILS_BOOTSTRAP=3D WITH_ELFTOOLCHAIN_BOOTSTRAP=3D WITH_CLANG_BOOTSTRAP=3D WITH_CLANG=3D WITH_CLANG_IS_CC=3D WITH_CLANG_FULL=3D WITH_CLANG_EXTRAS=3D WITH_LLD=3D # lldb requires missing atomic 8-byte operations for powerpc (non-64) WITHOUT_LLDB=3D # WITH_BOOT=3D WITHOUT_LIB32=3D # WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D WITHOUT_GCC_IS_CC=3D WITHOUT_GNUCXX=3D # NO_WERROR=3D # # Use WERROR to avoid stopping at the likes of: # error: implicit conversion from 'int' to 'int8_t' (aka 'signed char') cha= nges value from 128 to -128 [-Werror,-Wconstant-conversion] WERROR=3D MALLOC_PRODUCTION=3D # WITH_REPRODUCIBLE_BUILD=3D WITH_DEBUG_FILES=3D So the system binutils tools are in used. Even though I build lld, last I tried lld could not be used so it is not the linker used by the above. --=20 You are receiving this mail because: You are the assignee for the bug.=