From nobody Wed Feb 28 17:46:52 2024 X-Original-To: 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 4TlMHM4GZKz5C1JF for ; Wed, 28 Feb 2024 17:46:55 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlMHM3rS2z483l for ; Wed, 28 Feb 2024 17:46:55 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-2204e9290f9so840379fac.2 for ; Wed, 28 Feb 2024 09:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1709142414; x=1709747214; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LoAquHz0ObDlyeVZCZFCNrV5C3E1UhUmakSGy2sfRCw=; b=gn84lnxUHCJqbOmcrw8ZG/zC8ZHVZgO1vWdhxn2hR5s432y7aJ2VlYJPQebFTBv7H1 9dAAds6snSgT/N9KLJTfsEFl1yZH0xYLM6kEzwfP1iQefahm8nye3C2k4ucnDSSgV/w5 HZTOclMa1gD6LWHZlzMlebdaN8EG67ssNQkYniX7L6F2SrZI3DtgPkFtK05uz0ngnadL fS9H6sg4ruMDB4+ZCB3yZVdR31a3Cvio5hWbr5NyiDY6ySNklAoIDySvHiIrvxbTu64l wchJhehqWWAFMPPbPECrhTk8Zz6EBrasN51hSgvjb11hEjgifCtapdEPCKCdTBclBaV6 mWdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709142414; x=1709747214; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LoAquHz0ObDlyeVZCZFCNrV5C3E1UhUmakSGy2sfRCw=; b=MSbC7qaDNttijkr0dbeauW+WT12kB1CdEeeICFK7yBq7s9pp/eruIU+Ow5INm8kwcw ejftYmFA5uTCKmRvcx4yES5w2P+fjiJ5smD80WfZ+ctgjvIqzf5Jn3vaLVNs4gL3+YSm waevwxhUFyIhbVGSRSOAyc28XSpaEXm4vPLlXU4eBzNAy3dg74pwKt1Ddv0ZmtCtspyg yv3fVcpY+sO3Vuq48AhSQEf5ZjUgX391Bp98xMRqAVQ8lfvKiM74K8vtbe5cKU2H4QoS BVK7jIB7xRp3ik4UQmdSqUvqk4YGQpXBiq4WkPuyLnTxv7lPuI8htg3/Qk5ppGJQvsAW hm0Q== X-Gm-Message-State: AOJu0Yxzxnye1fqv+P/N6Rj+19PYs7m8zIWYC9iR6BIZKighh1y5xAIF Hsy1RWWijkYOgIyaL4KqrnvXXltcla9Fl9BlnVm5Lo6MTsirkk4JhO2RbSi+/14UYTUblEywNFb O X-Google-Smtp-Source: AGHT+IHBq+1m4jEfpmo09xpySaJmTTVbKu9egBWb9nE6kQZY11QhLSPaBcKPG7Lt7DNhGSG7n4dUEQ== X-Received: by 2002:a05:6870:c69f:b0:21e:8cc7:c7c8 with SMTP id cv31-20020a056870c69f00b0021e8cc7c7c8mr414851oab.37.1709142414153; Wed, 28 Feb 2024 09:46:54 -0800 (PST) Received: from mutt-hbsd (174-24-72-211.clsp.qwest.net. [174.24.72.211]) by smtp.gmail.com with ESMTPSA id h20-20020a9d6a54000000b006e4901f1a3csm1909280otn.22.2024.02.28.09.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 09:46:53 -0800 (PST) Date: Wed, 28 Feb 2024 17:46:52 +0000 From: Shawn Webb To: void Cc: toolchain@freebsd.org Subject: Re: LTO Message-ID: X-Operating-System: FreeBSD mutt-hbsd 15.0-CURRENT-HBSD FreeBSD 15.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: 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 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="a2fr73illvprvm43" Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Queue-Id: 4TlMHM3rS2z483l --a2fr73illvprvm43 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 28, 2024 at 05:06:08PM +0000, void wrote: > On Wed, Feb 28, 2024 at 07:50:59PM +0300, Gleb Popov wrote: >=20 > > ... >=20 > Thank you! >=20 > Is LTO buildable/usable/enable-able for base? HardenedBSD 14-STABLE and 15-CURRENT build all applications and libraries in base with thick LTO (-flto). (With one eexception on 15-CURRENT: libc--but that's related to some fallout related to recent libc/csu/libsys changes in FreeBSD, the goal is to re-enable LTO for libc soon.) The problem you'll find with building libraries in base with LTO is that those ports that use alternative toolchains might break--mainly if they link with static libraries (.a files) from base. gcc doesn't read/parse LLVM IR bitcode files. You might even see some issues with different versions of the same toolchain. For example, if llvm in base is at version 16, but the port requests llvm-from-ports version 15, then the port might not build. llvm's LTO ABI isn't forward compatible. The reason HardenedBSD builds base libs and apps with LTO is for future support of Cross-DSO CFI. I've worked on Cross-DSO CFI support slowly over the past few years, and there's still a long ways to go. Hopefully that helps. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 303-901-1600 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --a2fr73illvprvm43 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmXfcYEACgkQ/y5nonf4 4frpAQ//UveeV64hIlEy//t1oeplP2sTEB4y9MvuoC39Bh27b4tG5/JQJRDzzNAJ Oe3rOOKKsFcQUl9KBLnJNOV9DH0rhUaXnx519Lhy+Cb5JX4FR7EwI66u82+tRBtZ F2bAER0tgwZc2gGE/rYGefo/0sZw0tuyknooX0YUP42Zdo2RNAOt4l35DwzmyTCm D3Z4cHZbCFEj1ONq4vM4XPv5dQ6CWtsCmdc18INe9sE2X47beV5vfp/6vRJuHP81 ygB+GWza/nGEwiFbFf3vc486jsZpQR8S6e7runeAa0FlodjxESG93/vDi+CmWX8g 6tBI1EtXj4Tjau5ZCeDTlHewIAwzqiTBtDb2S1m+DBGCt4+b96F0lU68DqyfBhhz 01arvRMvmN+Of9cG6SBgTbk60ltkXVIYHXQau6XdSn7zyLGVJ5fPoEQUK+ZhhJKS zsaHhIDF5q1Uu7NHbQhEPuwVux3jUon9hQg7WbikmcQR6tCgyIBeFwqiSwJmmzJ9 k0A0SFZK55CmX14U+MiySZPwSPKr+a1KoVSnjx04nVWvZDr0eIFmrHXFiCnyfhBP 88LE9bn6f82S+IdR0AzhNpDGHHmu97CSQMtpyPZMf6KKXxyDk5mncP+L6D8LNtDS xn/pUxRD11HRvwSp1aLHWt5n+VXMwZ5atUn2IDJrD8uKwfU8Gtc= =e8NM -----END PGP SIGNATURE----- --a2fr73illvprvm43--