From nobody Sat Aug 07 16:07:39 2021 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 CF5E610FBBC5; Sat, 7 Aug 2021 16:08:13 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GhnM05kzWz3tNH; Sat, 7 Aug 2021 16:08:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f45.google.com with SMTP id l20so16482002iom.4; Sat, 07 Aug 2021 09:08:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=KZr4blKZDbj+K0IsC0uJQzVCmr7d2wGHDtQ8VtMZE3k=; b=XBoqjkyHbO8kv5QHCXYo7PtrRiDUY+X5DV6P7OyIam7UVldglcpkbafxMidVNWLuIM WLXMXgx8eJ1NqjJuRwzab0rjAE0Tw5MLLT1k773220q9hr2CUEFQI2Leiu8rHHtwFde3 FQYQ/pYzZx4zAcmGeIDrfeQU98Wa4/N+XvHUdmVrP+M1pVGs3sG97Ox1fTW3gcUMRdM6 o5LeyHRH+nrJIIGXzRErFjk9NPl8mdt5zhm6C3EY+I5lV8bXyN0MTbdiwTadCtf/Hbc0 DLGP1xzLvLTQTrpQ2WydueL0/UqG3kh8+meRrAn6piFvh1yq6ziOIcZP84QIotdG0MF+ 5k7g== X-Gm-Message-State: AOAM531B4pYmhn4bthjWacj8lJ01waf8zrw86FdKKglF3DC4p2z0U4lJ RF1l4mIKaOlKRPd2FB2xe8wxQjJqM+lJTjLe7OQr2CCQ X-Google-Smtp-Source: ABdhPJxH+aRHSb+f2/0b72DRtrF9kkfsikfqTuA6KvqB0xepDlcW2UTwzUDxbybSU/tWNqyNniJ/CnqEzJiFW3GiAYg= X-Received: by 2002:a05:6e02:1b88:: with SMTP id h8mr1325604ili.98.1628352485910; Sat, 07 Aug 2021 09:08:05 -0700 (PDT) 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 From: Ed Maste Date: Sat, 7 Aug 2021 12:07:39 -0400 Message-ID: Subject: Compressed debug info sections and big-endian targets To: "freebsd-toolchain@FreeBSD.org" , FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GhnM05kzWz3tNH X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.45 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-0.99 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCVD_TLS_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.45:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.45:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N GCC and Clang/LLVM support coimpressed debug info, which compresses the .debug_* ELF sections in objects, archives, libraries, and executables. I recently committed build infrastructure changes to turn this on (c910570e7573) but it broke the build on big-endian targets (mips, powerpc) and so disabled it again (89ed2ecb14ce). PR257638 has more details. The lld bug is now fixed in main thanks to Simon Atanasyan upstream and dim@ for merging it over (d69d07569ee2), and I would like to enable it again. An outstanding issue is that the bug is triggered by the linker's input, and so this will occur if we attempt to link against a base system .a archive using a buggy lld. In the short term I think we have no choice but to leave compressed debug disabled on BE targets, until fixed lld versions are available in ports/packages. I have a review open to enable it for LE targets only: https://reviews.freebsd.org/D31454. I'd like to apply that change for now, but would like to enable compressed debug across all targets in the future. This would break, on big-endian targets, any port that has a build-dependency on an older lld and links against a base system archive. Such a port could be fixed by switching to linking with binutils ld, or lld from the base system or a newer package. What do big-endian mips or powerpc users think?