Saw this error with both arm:armv6 and arm:armv7: 9224 /scratch/tmp/ngie/obj/arm.armv6/scratch/tmp/ngie/svn/tmp/usr/bin/ld: /scratch/tmp/ngie/obj/arm.armv6/scratch/tmp/ngie/svn/tmp/usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-armhf.a: No such file: No such file or directory 9225 cc: error: linker command failed with exit code 1 (use -v to see invocation) 9226 --- libc.so.7.full --- 9227 *** [libc.so.7.full] Error code 1 Both architectures are being treated like hard float architectures, based on a quick peek at contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp : 303 if (TC.getArch() == llvm::Triple::arm || TC.getArch() == llvm::Triple::armeb) 304 return (arm::getARMFloatABI(TC, Args) == arm::FloatABI::Hard && !IsWindows) 305 ? "armhf" 306 : "arm";
How did you build (e.g. src.conf options)?
A commit references this bug: Author: ngie Date: Sun Oct 22 21:34:37 UTC 2017 New revision: 324873 URL: https://svnweb.freebsd.org/changeset/base/324873 Log: Define TARGET_CPUARCH and use in libclang_rt as the basis for CRTARCH When cross-compiling, the wrong architecture was being embedded in the libclang_rt binary filenames. It should be based on TARGET_ARCH (target), not MACHINE_ARCH (host). This is a draft commit against my project branch. Will fix on ^/head soon. PR: 222925 Changes: projects/runtime-coverage/lib/libclang_rt/Makefile.inc projects/runtime-coverage/share/mk/sys.mk
(In reply to commit-hook from comment #2) > A commit references this bug: > > Author: ngie > Date: Sun Oct 22 21:34:37 UTC 2017 > New revision: 324873 > URL: https://svnweb.freebsd.org/changeset/base/324873 > > Log: > Define TARGET_CPUARCH and use in libclang_rt as the basis for CRTARCH > > When cross-compiling, the wrong architecture was being embedded in the > libclang_rt binary filenames. It should be based on TARGET_ARCH (target), > not > MACHINE_ARCH (host). Yes, this looks like a fine approach. Please commit this to head.
A commit references this bug: Author: ngie Date: Mon Oct 23 04:20:11 UTC 2017 New revision: 324893 URL: https://svnweb.freebsd.org/changeset/base/324893 Log: Handle host builds If TARGET_ARCH isn't defined, fallback to MACHINE_ARCH. This is a followup to r324873. PR: 222925 Changes: projects/runtime-coverage/share/mk/sys.mk
A commit references this bug: Author: ngie Date: Sun Nov 5 07:36:12 UTC 2017 New revision: 325427 URL: https://svnweb.freebsd.org/changeset/base/325427 Log: Define CRTARCH to armhf when TARGET/TARGET_ARCH are set to arm/armv[67] TARGET_ABI/TARGET_CPU in Makefile.inc1 sets the ABI to gnueabihf, which affects the clang lookup path per getArchNameForCompilerRTLib(..) in contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp . This is a follow up to r324873. PR: 222925 Changes: projects/runtime-coverage/lib/libclang_rt/Makefile.inc
A commit references this bug: Author: ngie Date: Sun Nov 5 07:48:41 UTC 2017 New revision: 325428 URL: https://svnweb.freebsd.org/changeset/base/325428 Log: Simplify r325427 CROSSENV (in Makefile.inc1) sets CPUTYPE/MACHINE(_ARCH)? to the TARGET*-relevant values when building the `libraries` target. PR: 222925 Changes: projects/runtime-coverage/lib/libclang_rt/Makefile.inc
A commit references this bug: Author: ngie Date: Sun Nov 5 19:38:51 UTC 2017 New revision: 325443 URL: https://svnweb.freebsd.org/changeset/base/325443 Log: Fix paths for cross-built versions of lib/libclang_rt and hardfloat arm variants - Define TARGET_CPUARCH and use in libclang_rt as the basis for CRTARCH When cross-compiling, the wrong architecture was being embedded in the libclang_rt binary filenames. It should be based on TARGET_ARCH (target), not MACHINE_ARCH (host). If TARGET_ARCH isn't defined (host-builds), fallback to MACHINE_ARCH. - Define CRTARCH to armhf when TARGET/TARGET_ARCH are set to arm/armv[67] TARGET_ABI/TARGET_CPU in Makefile.inc1 sets the ABI to gnueabihf, which affects the clang lookup path per `getArchNameForCompilerRTLib(..)` in contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp, so chase clang and Linux's assumed naming convention for hard-float arm architectures. CROSSENV (in Makefile.inc1) sets CPUTYPE/MACHINE(_ARCH)? to the TARGET*-relevant values when building the `libraries` target, so test those variables instead. - Add OLD_FILES/OLD_LIBS entries for TARGET/TARGET_ARCH == arm/armv[67]. This impacts only arm/armv6 and arm/armv7. PR: 222925 Changes: _U head/ head/ObsoleteFiles.inc head/lib/libclang_rt/Makefile.inc head/share/mk/sys.mk
A commit references this bug: Author: ngie Date: Sun Nov 5 20:01:00 UTC 2017 New revision: 325446 URL: https://svnweb.freebsd.org/changeset/base/325446 Log: Revert r325443 Despite the fact that it's a working solution, it doesn't follow the design philosophy of only doing TARGET_* in Makefile.inc1 and special locations in the source tree. PR: 222925 Requested by: imp Changes: _U head/ head/ObsoleteFiles.inc head/lib/libclang_rt/Makefile.inc head/share/mk/sys.mk
Giving bug to dim. I don't want to work on this project anymore.
A commit references this bug: Author: ngie Date: Sun Nov 5 20:38:40 UTC 2017 New revision: 325449 URL: https://svnweb.freebsd.org/changeset/base/325449 Log: Choose a simpler, more philosophically correct version for CRTARCH with armv[67] This is a rework of r325443. PR: 222925 Tested with: make buildenv with appropriate TARGET/TARGET_ARCH pairs Changes: head/ObsoleteFiles.inc head/lib/libclang_rt/Makefile.inc
^Triage: mark as OBE.