From nobody Mon Nov 22 15:58:07 2021 X-Original-To: ports-bugs@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 7B47C189F3B0 for ; Mon, 22 Nov 2021 15:58:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyX3z2pF0z3HpV for ; Mon, 22 Nov 2021 15:58:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 163E5255B9 for ; Mon, 22 Nov 2021 15:58:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1AMFw7WO086219 for ; Mon, 22 Nov 2021 15:58:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1AMFw7p2086218 for ports-bugs@FreeBSD.org; Mon, 22 Nov 2021 15:58:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 258820] Multiple ports fail to build with USE_LTO: libffi.a strip: file format not recognized (propose: disable building static library) Date: Mon, 22 Nov 2021 15:58:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: koobs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258820 --- Comment #9 from Ed Maste --- (In reply to Kubilay Kocak from comment #8) Your assumption is correct, when built with -flto the object file is LLVM IR rather than ELF. $ cc -c -flto foo.o $ file foo.o foo.o: LLVM IR bitcode A .a is just an archive of .o files (along with a symbol table), and isn't = part of the strip issue per se. A few points here: - It usually doesn't make a lot of sense to strip .o or .a files. - Stripping LLVM IR also doesn't make a lot of sense IMO. - We could probably have ELF Tool Chain strip detect and ignore bitcode fil= es - make no changes and exit with status 0. - ELF Tool Chain ar can create a .a archive of LLVM IR .o files, but cannot parse the symbol tables in the .o files to create the archive symbol table. - Longer term we will presumably migrate to LLVM's ar, nm, strip etc. (WITH_LLVM_BINUTILS) as it seems unlikely support will be added to ELF Tool Chain tools. Given the above I suggest that in the short term we should just stop trying= to strip libffi.a (and other .a archives in ports), and do nothing else until = we have migrated to LLVM's tools. Having ELF Tool Chain strip ignore bitcode is probably straightforward, but it's not that useful if we don't also address= ar. --=20 You are receiving this mail because: You are on the CC list for the bug.=