From owner-freebsd-arch@freebsd.org Thu Jan 9 20:59:01 2020 Return-Path: Delivered-To: freebsd-arch@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80EB81F8D71; Thu, 9 Jan 2020 20:59:01 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-yb1-f193.google.com (mail-yb1-f193.google.com [209.85.219.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 47tz4P2rk9z3CPC; Thu, 9 Jan 2020 20:59:01 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-yb1-f193.google.com with SMTP id k15so2565062ybd.10; Thu, 09 Jan 2020 12:59:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w73ncL/Op0mrtzBzyRvrtLVJ9OXSah0e6cVN/S05vpQ=; b=sjo7C5A7zGENn5KUN0XOyRKiILzhmWQ8orcj6+GK33Ry1dknADLB3FmL/808U5EXOt qlcdluWjivyqMkF0icTqStRxopGAjkFv6O3NcWr+EjAfKNVkctMaN4La8G4hoWhPlSO3 S4YNtWSE3tPeCTCblpg//Uepd1Wgmhtf9LcqLbM2xc5Ctkmh8s+4SGgt8lDaAJHxbdpa 9VJtVtkSxkKKgJMafuHlnZjtOd84XIjicU0gU+jcilOsrFHrFEVG9ugXluaV1KciwVEf eGl+UAbuucLjLNpOavXvWrg6knLtFppfseDCjWMwM2kYO/NWzhRVuqtiopQn3L2rC9Yi 8Haw== X-Gm-Message-State: APjAAAXtFI8gccg4EzE5JxmoZFSgrXEwORMEzfzdtD/piLIlGgwn0lQU modaxOyYX2a+Rzod1vsSuFFcYQoYA5I= X-Google-Smtp-Source: APXvYqx42c90v2ize7XJQhlH+2rHY7IwwnxlpImlQi4STWbILM7v+is+zghvufuJi7Rhq7krIfCFrQ== X-Received: by 2002:a25:5a06:: with SMTP id o6mr2483373ybb.384.1578603539575; Thu, 09 Jan 2020 12:58:59 -0800 (PST) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id q130sm3595107ywg.52.2020.01.09.12.58.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jan 2020 12:58:59 -0800 (PST) Received: by mail-yb1-f170.google.com with SMTP id n66so3548040ybg.0; Thu, 09 Jan 2020 12:58:59 -0800 (PST) X-Received: by 2002:a25:d889:: with SMTP id p131mr2715807ybg.306.1578603539134; Thu, 09 Jan 2020 12:58:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alexander Richardson Date: Thu, 9 Jan 2020 20:58:48 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Retiring GNU objdump 2.17.50 To: Ed Maste Cc: freebsd-arch , FreeBSD Ports Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47tz4P2rk9z3CPC X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2020 20:59:01 -0000 On Thu, 9 Jan 2020 at 15:32, Ed Maste wrote: > > We currently install and use at most three tools from GNU binutils > 2.17.50, depending on target architecture: > > 1. as - assembler > 2. ld - linker > 3. objdump - diagnostic / information tool > > I hope to retire all use of these obsolete binutils before FreeBSD 13. > Here I'd like to discuss objdump. It is a diagnostic tool that > provides information about object files, binaries and libraries. It's > not required as a bootstrap tool (i.e., not needed to build FreeBSD > world or kernel). It is required to build a limited number of ports, > and is used by some developers. > > I have a tracking PR for GNU objdump's retirement open in PR 229046. > https://bugs.freebsd.org/229046. > > There are two ways we can proceed with its retirement: > > 1. Remove it without replacement. Ports that need objdump to build > will have to depend on the binutils package/port, and users who wish > to use it will have to install it. > > Related links for this path: > Ports exp-run: https://bugs.freebsd.org/212319 > Patch review: https://reviews.freebsd.org/D7338 > > 2. Install llvm-objdump in its place (perhaps via a symlink). > llvm-objdump is broadly compatible in both command-line argument > parsing and output format, but there are many small differences and > it's not a full drop-in replacement. > > Related links for this path: > Patch review: https://reviews.freebsd.org/D18307 > > I am interested in feedback on the preferred approach. Installing > llvm's objdump has the advantage that for most use cases everything > will "just work", but may also introduce subtle failures. Hi Ed, While there is a risk of subtle breakage, I would be in favour of installing llvm-objdump as /usr/bin/objdump. LLVM developers are actively trying to ensure that they can be used as a drop in replacement in most cases. If I remember the discussion at EuroLLVM last year correctly, the goal is to have compatible output for anything used e.g. in configure scripts and only diverge if there is a good reason for it. I also find that bugs reported against binutils in LLVM bugzilla are generally addressed quickly, especially if it's a simple GNU compatibility issue. Additionally, llvm-objdump's disassembler is a lot faster than GNU objdump (at least twice as fast, but my LLVM build is with assertions enabled, so probably even more). However, I would wait until we have imported LLVM 10 before making that change. There have been quite a few commits to LLVM binutils replacements in the past few months that improve compatibility with the GNU versions (not only objdump but also readelf,addr2line,ar,ranlib etc). I'm not sure the LLVM 9 versions are ready yet, but for CheriBSD we use llvm binutils for everything (our fork is roughly up to date with llvm 10). Unrelated to this but we could also install llvm-readobj installed as /usr/bin/readelf to avoid depending on installing the GNU binutils port for projects using readelf? Additionally, I would also very much like to see llvm-ar as /usr/bin/ar and /usr/bin/ranlib so we can start using LTO with clang. Alex > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"