From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 89649158094 for ; Wed, 24 Aug 2022 04:57:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E51DEE07C9; Wed, 24 Aug 2022 04:57:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 230D7E07C9 for ; Wed, 24 Aug 2022 04:57:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8024C34102E for ; Wed, 24 Aug 2022 04:57:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AEAF3599 for ; Wed, 24 Aug 2022 04:57:01 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1661316987.8bb13b19b42601b8b57c5b1c2d64d1b0a04fede5.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild X-VCS-Directories: sys-libs/compiler-rt/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8bb13b19b42601b8b57c5b1c2d64d1b0a04fede5 X-VCS-Branch: master Date: Wed, 24 Aug 2022 04:57:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e08ac438-05fe-4119-9631-7ebd70ec3687 X-Archives-Hash: 4d4a178201dd49d993896d93f5265d50 commit: 8bb13b19b42601b8b57c5b1c2d64d1b0a04fede5 Author: Alexander Miller gmx de> AuthorDate: Sat Aug 6 23:22:09 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Aug 24 04:56:27 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bb13b19 sys-libs/compiler-rt: Override start symbol when adding -nostartfiles to LDFLAGS Trying to link executables for the configure checks generates linker warnings (in the CMake logs) like: "warning: cannot find entry symbol _start; defaulting to 0000000000001000". Moreover, with flags like -flto or -Wl,--gc-sections, the linker can discard all code, rendering the checks useless. Set main as entry symbol when linking with -nostartfiles to avoid both issues. (Note that the binaries would still crash, but that doesn't matter since they are never executed.) Bug: https://bugs.gentoo.org/862540 Closes: https://bugs.gentoo.org/862798 Signed-off-by: Alexander Miller gmx.de> Signed-off-by: Sam James gentoo.org> sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild b/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild index 4ce8bbb484a7..c006ccddc481 100644 --- a/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild @@ -88,8 +88,9 @@ src_configure() { local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" elif test_compiler "${nolib_flags[@]}" -nostartfiles; then - # Avoiding -nostartfiles earlier on for bug #862540 - nolib_flags+=( -nostartfiles ) + # Avoiding -nostartfiles earlier on for bug #862540, + # and set available entry symbol for bug #862798. + nolib_flags+=( -nostartfiles -emain ) local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" fi