From nobody Thu Apr 18 23:35:19 2024 X-Original-To: freebsd-arch@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 4VLDfJ61yRz5HK8q for ; Thu, 18 Apr 2024 23:35:20 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VLDfJ5G1Xz4mGf; Thu, 18 Apr 2024 23:35:20 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713483320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=tY5DxwhvcT4vDv44gNOWOblxKu0eqfYXxFeex/+tZnE=; b=lQIuOu2F6Q2UopKY33bqHs5LQKK3facDtmUKjrDAWP4Y+4c7rqd/IT7LJ8ejxN4iv/k7sQ RLukIf4ZRekuSsYa/0NTwMO041ghyHmTxjohFd5RFMZ+s2cuY9jd78jKvsqDYbcLr4Bzgz 09p3hvHgK6wEQ59dkkrbLWbdp89SDysDFTNJVcyQ3nV5oGyCE/+7gpHSXi98BKhxQIn9OA MLkx8/1d3ditBGCnFTpimMLQVw2hUgPNRzRcHM3fhr1s9iRDoy25qICDcoKJiJjIL4Gh3F iHRlRewBWMjkSRYspK4m9wa3yPCs4SxKWr0uTLb86gDrVbf2sq+AuZfNMNsbkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713483320; a=rsa-sha256; cv=none; b=ay6zwMzHh68n4FjjW+pA43UQVNLib1vOn0IhInDtpPpP0yaYqvUHxwdN6xz5WZ/Z0MjwnA gNhf5BeeOj64GNv4DDIiTxqVXR7COellv4+cx2eesAVMr5KtEMdF4HerUVgspGoU8zfX/o 894CMGPLVvDF3BvloE1yQN2JqMT4njBwRZVq5wMX2njldv2TweA0CBYQ56Mmquu/vOy4yi cnfQsXfQv1lMRVr+157uChhjzTpuK6Kxo7qNcZlLepuGPZvB7Ud352Y9CX950o9oSELqsf g5mjfpYTaXX9WX8gkfaGiDvWHlNzfnKFk4L5d/6HBBbcV8QeciZEulPOoXBzaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713483320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=tY5DxwhvcT4vDv44gNOWOblxKu0eqfYXxFeex/+tZnE=; b=xO59jS+8ZjUWkfn0l2NJSpQwX4Nxp1XKW5ngfJ1oH9jn77U1rQzmRImE3/JJCCEdxJLMk3 SPVHUvZ2E6zsyezJRRf53ccSir3jU6pX80+QYCk8NnJlNOQR4ObfIQEkTmscfMFonFmxF2 KrcegMWP8Bay5KlNVuqHYi297/SuE7ninOv4j2zLBAdXFm8EcTZjg/vTSd3HvyYpsF6Ab/ uHL3RhQp62kXedqdEKgFBPqZ9BAr/6qJ7QiE0/Hi64v+Ax3JKgpq4r7SBKM7Lt4IRdckfq pL9em1Xov30s6H0jNGT7gBATGxbzwKfcfuUcnwpHGcctPjyFggl6LdgZe7dD6A== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VLDfJ4cM7zHlx; Thu, 18 Apr 2024 23:35:20 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id A7DC63C019B; Thu, 18 Apr 2024 23:35:19 +0000 (UTC) Date: Thu, 18 Apr 2024 23:35:19 +0000 From: Brooks Davis To: freebsd-arch@freebsd.org Cc: Michael Dexter Subject: RFC: linking with --no-undefined-version Message-ID: List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline As of LLVM 16, lld default to --no-undefined-version which means that if a symbol is listed in the symbol version map it must be present or lld will fail to link. This is good because it prevents that accidental loss of symbols which breaks our ABI compatibility. Unfortunately, it's somewhat complicating because our symbol version maps may vary per-architecture or based on options. As a result we added --undefined-version to LDFLAGS. In the process of validating my libsys work I decided I wanted to enable this option to make sure I wasn't losing symbols along the way. I added WITH(OUT)_UNDEFINED_SYMBOLS control this behavior and worked to resolve issues in the build with WITHOUT_UNDEFINED_SYMBOLS enabled. I've got tinderbox building successfully with just a few patches outstanding. I've hung them off the following review that sets WITHOUT_UNDEFINED_SYMBOLS by default: https://reviews.freebsd.org/D44216 There are probably still some issues to be fixed with non-default options, but I'm not in a position to discover all of them. Hopefully Michael's build options survey will turn them up. They are generally easy to fix and various revisions associated with the above review provide examples. I'm looking for feedback on flipping the switch so we start detecting regressions by default. -- Brooks P.S. This isn't the complete ABI story, but it at least prevents the worst regressions. I have a first cut at something more complete (including symbol versions but short of a full ABI checker) at https://reviews.freebsd.org/D44271