Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2019 20:01:24 +0200
From:      Sid <sid@bsdmail.com>
To:        freebsd-toolchain@freebsd.org
Subject:   Re: LLVM ld from ports, unknown -z value
Message-ID:  <trinity-4b052fca-c99f-4a5c-96bd-e95436e17105-1569002484567@3c-app-mailcom-lxa13>

next in thread | raw e-mail | index | archive | help
> I got this error from compiling the kernel by using LLVM's ld for llvm80 and llvm70. I didn't try it with llvm60. It must be from newer LLVM ports' updates. (Reminder that I have already removed LLVM and linker from my base system).

 kernel.full
 ld.lld: error: unknown -z value: common-page-size=4096

I then installed binutils from ports, and linked /usr/bin/ld to /usr/local/x86_64-unknown-freebsd12.0/bin/ld by both softlink and by setting LD in make.conf. This worked to allow the kernel build. That file directory shows my actual architecture and FreeBSD version.

Someone mentioned that maybe LLVM's ld from ports may possibly not be compatible with the -z option of "common-page-size".


Now, I think that LD was intentionally disabled in make.conf, because of common problems with builds with LLVM linkers through ports.

> Also, I didn't get this error for compiling my world. It seems specific to kernel builds.

I realized that this error is not from newer LLVM ports' updates. What likely happened was that, before I installed a custom world, it had ld from base in it and it was using that, which didn't give this error. So, z linker to common-page-size is likely not set for ports' LLVM linkers, and that's not relevant for most because the LD option is disabled in make.conf, and they end up using base's linker and don't see this error.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-4b052fca-c99f-4a5c-96bd-e95436e17105-1569002484567>