Buildfailures with ld.lld

Johannes Jost Meixner johannes at perceivon.net
Mon Aug 14 21:01:39 UTC 2017


Now after some more testing it appears that this is due to HardenedBSD
setting WITH_LLD_BOOTSTRAP and me setting WITHOUT_LLD_IS_LD=yes, which
isn't supported in src/lib/clang/llvm/Makefile in this combination.

I've tested that the patch attached builds the bootstrapped lld
successfully and fixes the initial errors I saw.





Best regards,

Johannes Meixner


Perceivon OÜ
Pikk 7-17
10123 Tallinn

tel: +372 5855 1779
web: http://www.perceivon.net

On 08/14/2017 21:01, Dimitry Andric wrote:
> On 14 Aug 2017, at 19:41, Shawn Webb <shawn.webb at hardenedbsd.org> wrote:
>>
>> On Mon, Aug 14, 2017 at 07:38:28PM +0200, Dimitry Andric wrote:
>>> On 14 Aug 2017, at 18:40, Shawn Webb <shawn.webb at hardenedbsd.org> wrote:
>>>>
>>>> On Mon, Aug 14, 2017 at 07:28:39PM +0300, Johannes Jost Meixner wrote:
>>>>> I'm seeing a few `undefined references` trying to build recent base on
>>>>> HardenedBSD with clang 5.0.0:
>>>>>
>>>>> https://dpaste.de/FThb/raw
>>>>>
>>>>> Would you know what I am missing here?
>>>>
>>>> Hey Johannes,
>>>>
>>>> It looks like contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
>>>> isn't included in the Makefile for usr.bin/lld.
>>>>
>>>> I'm wondering if the lib/DebugInfo/DWARF files should be included in
>>>> usr.bin/lld/Makefile. dim@, could you verify?
>>>
>>> Those files are already in lib/clang/libllvm/Makefile.  How can this
>>> particular error be reproduced?  I just did a fresh clone of hardenedbsd
>>> master, and it built just fine for me, with an empty make.conf and
>>> src.conf.
>>
>> Johannes is trying to build ports-mgmt/pkg in HardenedBSD
>> 12-CURRENT/amd64, where MK_LLD_IS_LD is default to yes. If you use the
>> HardenedBSD ports tree, ports-mgmt/pkg is patched to allow a configure
>> argument to enable SafeStack for pkg(8) and pkg-static(8)
>> (--enable-safestack).
>>
>> Reproduction steps:
>>
>> 1. Install HardenedBSD 12-CURRENT/amd64
>> 2. Fetch HardenedBSD's ports tree
>> 3. Attempt to build ports-mgmt/pkg
> 
> I don't see why pkg is trying to build lld?  It's just a package
> management tool.  Or are you building some sort of jail, e.g. in
> poudriere?
> 
> For me, it's easiest to have a reproduction scenario where I can build
> either FreeBSD head or HardenedBSD master, with some specific src.conf
> settings.  So maybe MK_LLD_IS_LD would cause this problem?
> 
> -Dimitry
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lld_bootstrap.diff
Type: text/x-patch
Size: 512 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20170815/14448dcd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20170815/14448dcd/attachment.sig>


More information about the freebsd-toolchain mailing list