From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id F18B33858D20 for ; Wed, 20 Dec 2023 09:12:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F18B33858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F18B33858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703063526; cv=none; b=EBmgf0Fsw4M2Tma9cWJlzg9ekLh0Wyi5u18KjUlbjnPNX/r/8ioM9FiTzApjJFliOzpYVMSBX4I6Q9wgmIe/D3hFqVfUt7PY/Z8t8uRxRGa1X0pSVH1Je1phBEBtXxpoN6koVaYbVxdWOFjbjlrfa6jKv3FQqBXe0pzYUoLMqfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703063526; c=relaxed/simple; bh=tRJbhABLzhh7WMsMtcBNDj6oKtKqKUnbKBNmBW2pEv0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KH46qKL8PrrKcVPiziA900qvvjavLJnjm1ViL7Burz7T+sR1oOPqYCDYC9tnf9xM6eZi7ivNMsIQxO89KK65I9GZztY3YtoRh2tVls8bVjMRWkqT6VKpLRrWK3CgXmaQ7HDNMICaQZHfV7VU31TnFnsmOQFYSh2VMKyOVY/RhXs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 0EA29B83F9; Wed, 20 Dec 2023 10:12:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:in-reply-to:date:date :references:subject:subject:from:from:received:received; s= 20200306; t=1703063523; bh=tRJbhABLzhh7WMsMtcBNDj6oKtKqKUnbKBNmB W2pEv0=; b=EiTjK7He8rOgJhIROay12R3KPnCCMU2QyrMnwVSrkkWcpa192pYXo FRE2tDcGueOMoX2L3Vhvx8XfH/Q/PgsQX9LNpmo1UvZpmJdph0bTk0hV7MQPPGBw xWwKylBFcNQScBmMV+i6zw0YfFPooYssRukhkneq8heSYoYXyWiulmuwq5GKVPxf Lt0GhFDWiNGrNJgySIe+cbxfNCfHCgWFeWzl0Z/739ep1YQjTlDVNZWQ0fUp1XfS MG4ujX3vRJ16JMtMwfuiYDNomjS8CQk6gHxhyFPd1W1J6nb05/TjMGvq2gNi4dn4 Mnv2U0L6r1yzHTWNHGaHY5/u6jhJvDt0w== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ibSI-GdLEfVw; Wed, 20 Dec 2023 10:12:03 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb508.dip0.t-ipconnect.de [79.221.181.8]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 5A620B86C9; Wed, 20 Dec 2023 10:12:03 +0100 (CET) From: Rainer Orth To: Jan Beulich Cc: binutils@sourceware.org, John Baldwin Subject: Re: [PATCH] ld: Add lib32 directories for 32-bit emulation on FreeBSD/amd64 References: Date: Wed, 20 Dec 2023 10:12:02 +0100 In-Reply-To: (Jan Beulich's message of "Wed, 20 Dec 2023 08:35:09 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3785.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KAM_NUMSUBJECT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Jan Beulich writes: > On 19.12.2023 23:23, Rainer Orth wrote: >> Ping? It's been a week: >> >> https://sourceware.org/pipermail/binutils/2023-December/131178.html >> >> Rainer > > Not knowing FreeBSD it's hard to approve a change like this. Specifically, ... Unfortunately, there's no listed FreeBSD binutils maintainer. I'm Cc'ing John Baldwin who actively maintains gdb on FreeBSD. Maybe he can shed some insight or knows someone else who could. >>> GNU ld currently fails to link 32-bit executables on FreeBSD/amd64 when >>> the linked libraries have dependencies on shared objects themselves: >>> >>> $ gcc -m32 -o ei ei.c -lexecinfo >>> /var/gcc/binutils/amd64/lib/gcc/amd64-pc-freebsd14.0/13.2.0/../../../../amd64-pc-freebsd14.0/bin/ld: >>> warning: libelf.so.2, needed by /usr/lib/../lib32/libexecinfo.so, not found >>> (try using -rpath or -rpath-link) >>> /var/gcc/binutils/amd64/lib/gcc/amd64-pc-freebsd14.0/13.2.0/../../../../amd64-pc-freebsd14.0/bin/ld: >>> /usr/lib/../lib32/libexecinfo.so: undefined reference to `elf_begin@R1.0' >>> [...] >>> >>> Fixed by handling FreeBSD/amd64 like Linux/x86. >>> >>> Tested on amd64-pc-freebsd14.0. > > ... it doesn't look implausible that things may have worked on earlier > versions (or else perhaps someone would have noticed long ago), and that > hence your change might break things there. I'm certain they didn't: I originally developed this patch 4 years ago, but either forgot to submit it back then or hoped an active member of the FreeBSD community would. This must have been in the FreeBSD 11 or 12 timeframe, and obviously nothing has happened/been improved since. My recent forays into FreeBSD have been less than pleasant, unfortunately: see GCC PR target/112959 (install.tex needs updates on FreeBSD) for an overview of the issues on the GCC side. It seems the FreeBSD community either cares little about GCC and binutils these days (having moved to lld as /usr/bin/ld and clang/clang++), or doesn't believe in upstream bug reports, let alone submitting patches ;-( This is not just about GCC/binutils; the same seems to happen on the LLVM side where they completely ripped out the cmake-based build system and replaced it with one of their own (based on BSD make). Trying to build upstream LLVM on FreeBSD is just as unpleasant as GCC. E.g. GCC won't work with lld (cf. GCC PR target/112745), so you need GNU ld here... Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University