From nobody Wed Aug 31 03:29:36 2022 X-Original-To: freebsd-toolchain@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHV6L4JYtz4ZtK5 for ; Wed, 31 Aug 2022 03:29:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-8.consmr.mail.gq1.yahoo.com (sonic307-8.consmr.mail.gq1.yahoo.com [98.137.64.32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHV6K0Sgbz3RlW for ; Wed, 31 Aug 2022 03:29:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1661916582; bh=PyWVT0/PGp1Pr250P//cYgz3IdxCS7bDiZ6HmTSSre8=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=QJgvFjxkxjijCOonUbVnP7v72uqO3gI7BFNWVCzjmsWRbkuL2JB8akuj0lB+d+oXz8l9MkIeHA+evNTmjKMrixq/0bq4Mlt6xiwRUYXqu9IOdkYuGrwgtInHVDyQqqz0QyUNZ+9wvfRwdkGarL/OgzPWhHkXTkbExptUdi6UCY6z53tVHdSsv/hwh+k8/j1RJL9AtSUy6mXJBgv9oeRULyMWMQ/Kc4IVOa0WTw86qmm8TLGjYmQjxGgUuVOeAZviJkU1EzPhKyWNpa1Lz6xO+zzKOqPQ9zcI+cmHif6CcIeeCDxpcsE8Aoyozm22GWZiiLWduEdWQ49XXozknB5YKA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1661916582; bh=TWRwd0iThBIcT9iojjz5SQudgCFWSMtjCQsxl0jgS4I=; h=X-Sonic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0A027HuioWDN5Cta19MZENW Gp7itfibhPXoa1Y0G7ZYEHuGXXxtkem5Dwd12NvOk6U7Je03IOsbku9nhfB23Q6CgKN.DbX0dvLD 6oSxNPtvmtBjG2D6b09dA5WPfyD_EA1RWd045JwKcSXAvtfXT4tND4FuiZoTOiNn52BC46H.zquB RSYWrEbTkKfGMlqEFmgKDteqthxg8K7v_ZJyt0toWH_Y.u.JXejolJWHXDz5FdCKlujcyipT1AXl JkepY5azaqCFdIdUBwLlxp8gV7l3Caik6wWeFtN4HtvFQflDVtWXafiB.ffIz237UEs1GJ2i347g GnIB33666KY7U7Kmd8xKAeMnDYUZ02fnuqpqjjsMrUFTWTXlsoZmcpBkpph5JxhQDSZJz_hJd3Ae 3l0sNIDtgnI7Szgc_AuM0.HDTm042sfu1rZjp8fpUaGlFVPKVHGWZSy4ANj6Au3PCAof5lGwox0t 6LuxdjVlZqnCiMFyj2KHrLGHqF_ZNuOde.NZcVjEt2ZNferZ6NJ4gutrbybdRvNY- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Wed, 31 Aug 2022 03:29:42 +0000 Received: by hermes--production-bf1-7586675c46-klczj (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 617d4445eea885072de43f24182e76b7; Wed, 31 Aug 2022 03:29:38 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: /usr/local/bin/aarch64-unknown-freebsd14.0-ld vs. system the system toolchain on aarch64 [example]: when found, lld is not used by default Message-Id: Date: Tue, 30 Aug 2022 20:29:36 -0700 To: FreeBSD Toolchain X-Mailer: Apple Mail (2.3654.120.0.1.13) References: X-Rspamd-Queue-Id: 4MHV6K0Sgbz3RlW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=QJgvFjxk; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.32 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.44 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; NEURAL_HAM_MEDIUM(-0.94)[-0.941]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.32:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-toolchain@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.32:from] X-ThisMailContainsUnwantedMimeParts: N (This happens to be an aarch64 context and example. But is not actually limited to aarch64 or to arm* --and so on. Similarly, I expect, it is not limited to main [so: 14].) I just ran into the following trying to locally build some = standard-C++20 code via the system-toolchain on main. Note the aarch64-binutils ( devel/freebsd-binutils@aarch64 ) related path that automatically shows up, despite not being requested: /usr/local/bin/aarch64-unknown-freebsd14.0-ld Its use, mixed with a deliberate attempt to use LTO, in turn attempts to use /usr/bin/../lib/LLVMgold.so --which is not found, breaking the = build. Plus, I did not request anything but the system ld to be used, so the attempt to use /usr/local/bin/aarch64-unknown-freebsd14.0-ld looks to be just wrong, independent of LTO being involved in my build. The failing command: clang++ -v -std=3Dc++20 -Wpedantic -Wall -Wextra -I../other_src_used = -pedantic -g3 -O3 -mcpu=3Dcortex-a72 -flto=3Dthin -pthread -flto=3Dthin = ../objs/cpp_thousandslocale-clang++_14_O3lto-libc++.o = ../objs/cpp_clockinfo-clang++_14_O3lto-libc++.o -o = ../cpp_clockinfo_main-HoneyComb-65536MiB-threads_16-LP64-FreeBSD_main_n256= 584_5bc926af9fd1_64bit-clang++_14_O3lto-libc++ = -DCPPCLOCKINFO_VERS=3D'"acpphint_0.1.24"' = ../other_src_used/cpp_clockinfo_main.cpp FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git = llvmorg-14.0.5-0-gc12386ae247c) Target: aarch64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin "/usr/bin/clang++" -cc1 -triple aarch64-unknown-freebsd14.0 = -emit-llvm-bc -flto=3Dthin -flto-unit -disable-free = -clear-ast-before-backend -disable-llvm-verifier -discard-value-names = -main-file-name cpp_clockinfo_main.cpp -mrelocation-model static = -mframe-pointer=3Dnon-leaf -ffp-contract=3Don -fno-rounding-math = -mconstructor-aliases -funwind-tables=3D2 -target-cpu cortex-a72 = -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon = -target-feature +crc -target-feature +crypto -target-feature +sha2 = -target-feature +aes -target-abi aapcs = -fallow-half-arguments-and-returns -mllvm = -treat-scalable-fixed-error-as-warning -debug-info-kind=3Dstandalone = -dwarf-version=3D4 -debugger-tuning=3Dgdb -v = -fcoverage-compilation-dir=3D/root/acpphint/acpphint_src -resource-dir = /usr/lib/clang/14.0.5 -I ../other_src_used -D = "CPPCLOCKINFO_VERS=3D\"acpphint_0.1.24\"" -internal-isystem = /usr/include/c++/v1 -O3 -Wpedantic -Wall -Wextra -pedantic -std=3Dc++20 = -fdeprecated-macro -fdebug-compilation-dir=3D/root/acpphint/acpphint_src = -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=3D4.2.1 = -fno-implicit-modules -fcxx-exceptions -fexceptions -fcolor-diagnostics = -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=3D1 = -o /tmp/cpp_clockinfo_main-56273f.o -x c++ = ../other_src_used/cpp_clockinfo_main.cpp clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target = aarch64-unknown-freebsd14.0 #include "..." search starts here: #include <...> search starts here: ../other_src_used /usr/include/c++/v1 /usr/lib/clang/14.0.5/include /usr/include End of search list. "/usr/local/bin/aarch64-unknown-freebsd14.0-ld" --eh-frame-hdr = -dynamic-linker /libexec/ld-elf.so.1 --enable-new-dtags -o = ../cpp_clockinfo_main-HoneyComb-65536MiB-threads_16-LP64-FreeBSD_main_n256= 584_5bc926af9fd1_64bit-clang++_14_O3lto-libc++ /usr/lib/crt1.o = /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib -plugin = /usr/bin/../lib/LLVMgold.so -plugin-opt=3Dmcpu=3Dcortex-a72 = -plugin-opt=3DO3 -plugin-opt=3Dthinlto = ../objs/cpp_thousandslocale-clang++_14_O3lto-libc++.o = ../objs/cpp_clockinfo-clang++_14_O3lto-libc++.o = /tmp/cpp_clockinfo_main-56273f.o -lc++ -lm -lgcc --as-needed -lgcc_s = --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed = /usr/lib/crtend.o /usr/lib/crtn.o /usr/local/bin/aarch64-unknown-freebsd14.0-ld: = /usr/bin/../lib/LLVMgold.so: error loading plugin: Cannot open = "/usr/bin/../lib/LLVMgold.so" clang++: error: linker command failed with exit code 1 (use -v to see = invocation) *** Error code 1 A workaround is to explicitly use -fuse-ld=3Dlld . =3D=3D=3D Mark Millard marklmi at yahoo.com