From owner-freebsd-toolchain@freebsd.org Tue Dec 19 03:11:14 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 659EFEA500C; Tue, 19 Dec 2017 03:11:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2297B80E4D; Tue, 19 Dec 2017 03:11:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x234.google.com with SMTP id w127so12030920iow.11; Mon, 18 Dec 2017 19:11:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=2YkfHLjpeS0obeVnuuV0yqG+eluQguqU0M6sd496rro=; b=nL2jg8nZmOKbsw7YCAd3lOMtJigBbhLsM9SJrz9UZKI2yrJv5cCVXDM+LKvdVF4vQ6 azJ8PZ5qHoY74ue4j4bahmr3O5j5uEsiNeYionAYmYR368a0Dw7boV9tu1iPVjVCeaMJ aR62XgDfcs6CWyo9F9tB7AcEJrEflz96ZTJXrCKr8qtU0W5tJz/B92HPwqy2ZrrYzPRW 37ZkPSIK0HGR7M/gfrUvuNZy5a5sDlNWJXMaa7AaOhW1UMQwPRZ0iqStmBKUJ54m0Cgr XBK/hC+Cb1XLtT++VUQt8ibl7MEguIzNyzVsVFU4Y2EEi0VZmgzghhyW0z0EjeSKw6aV wTPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=2YkfHLjpeS0obeVnuuV0yqG+eluQguqU0M6sd496rro=; b=g8bFSveiZ38SR4VPIQmIDntNqdAJF64NVMogg17CHU/ImXSTSa9AmSTZW7e77mrqyy D37I+f5V0FHi15YFLGbXv7J4yye2rzBrDEcBhEwH1wmGpuUiwrCyKdw655B46/exmEQG SrmRIH583JaI/1zAYzzkOxNXDSbB1cCNja0X+xEuqCAKMSo2VNYF2xW1mOXTH75/b2aw lHMn37zQUAkOg50JIk3g3G5rfibBYAYzWH8Fn8pney+FeJCPeqyiOMjqGil3j+gX6aYl JxrCu/yquF4PzM9BL/U07CGv1IBN+KVnkh864pvKR4Sd5Qi7rhkaWG69an9qfXYVU8k7 bbgw== X-Gm-Message-State: AKGB3mIiIDTaf7fd3EPynVn7m3fIB/smt/hbSS0yH/YrNrf/UjaJCzhJ m8lVIYuikpGtVL204trcNFl8WzYQzeCpy/KSFJxS2A== X-Google-Smtp-Source: ACJfBos0WakIu/gq72BnE2e9nkGtdrcuelmElLHODD8PuvqVfSgJk+sOFHjlP51lpoQanyGGIBOIbJzAr0+y6+cYB48= X-Received: by 10.107.83.8 with SMTP id h8mr2177088iob.63.1513653073303; Mon, 18 Dec 2017 19:11:13 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.131.163 with HTTP; Mon, 18 Dec 2017 19:10:52 -0800 (PST) In-Reply-To: References: From: Ed Maste Date: Mon, 18 Dec 2017 22:10:52 -0500 X-Google-Sender-Auth: pMmn0pnVUHXgjHw1zIgjFHzBW34 Message-ID: Subject: Re: Ports and LLVM's lld linker To: FreeBSD Ports , freebsd-toolchain@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 03:11:14 -0000 On 27 November 2017 at 15:39, Ed Maste wrote: > We're making good progress on using LLVM's lld linker as FreeBSD's > /usr/bin/ld, so I'd like to raise awareness of the new linker within > the ports community. With a couple of recent changes in src head (r326831 and r326897) lld is now suitable for use as the base system /usr/bin/ld on amd64 and i386. We're working through ports failures, starting with those responsible for the largest number of skipped ports. The top four, on amd64: port # skipped devel/libunwind 7994 databases/postgresql*-client 230 lang/fpc 76 lang/mono 22 The remaining failures are responsible for no more than 2 skipped ports each. devel/libunwind fails due to the shared object protected visibility symbol preemption issue; Dimitry Andric and I are searching for an appropriate fix. The databases/postgresql*-client failures have been worked around by r456635, adding LLD_UNSAFE=yes so that the port uses ld.bfd. lang/fpc appears to suffer from stricter validation performed by lld: /usr/bin/ld: error: x86_64/units/x86_64-freebsd/i_linux.o: invalid alignment of section headers lang/mono fails because lld defaults to -z text, disallowing relocations in read-only segments (like .text). A workaround is to add -z notext to the link command line, which turns off lld's error for this case and results in the same behaviour as ld.bfd and ld.gold provide by default. Unfortunately usual workarounds (LLD_UNSAFE=yes or LDFLAGS=Wl,-z,notext) fail for both lang/fpc and lang/mono, and it's not immediately obvious to me how their respective builds handle the options. I'll probably need help from acm@ and mono@ for these. For reference the remaining ports failing with lld on amd64 are: archivers/lua51-zlib audio/alure benchmarks/wrk databases/postgres-xl devel/libds devel/libtecla devel/pdcurses devel/ztcl emulators/gem5 ftp/rexx-curl irc/eggdrop irc/eggdrop-devel irc/evangeline lang/rexx-imc lang/rexx-regutil lang/siod lang/smlnj lang/tclX mail/qmail-dk math/rexx-regmath misc/seabios net-im/uTox net/py-netif net/py-netif print/openprinting print/pdftk security/otpw shells/bash-static sysutils/dupd sysutils/e2fsprogs sysutils/installwatch sysutils/unieject www/cgihtml www/dummyflash www/mod_jk www/mozplugger www/tdom