Date: Fri, 1 Jun 2018 07:39:06 +0930 From: Shane Ambler <FreeBSD@ShaneWare.Biz> To: Warner Losh <imp@bsdimp.com>, Dimitry Andric <dim@freebsd.org> Cc: Benjamin Kaduk <kaduk@mit.edu>, Gary Jennejohn <gljennjohn@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: ``make buildkernel'' fails when /usr/obj is empty Message-ID: <f7773a0c-e39f-f3da-280f-f1085ade4fbc@ShaneWare.Biz> In-Reply-To: <CANCZdfozqmA%2BQz77Yu4KDwD0NRH4AJ24XAhE6FuHz_4Ubf60Gg@mail.gmail.com> References: <20180531095222.399e7a37@ernst.home> <20180531095850.5845fd7a@ernst.home> <20180531160406.GD27985@kduck.kaduk.org> <32C087A4-1B67-4694-B769-16A347D4804E@FreeBSD.org> <CANCZdfozqmA%2BQz77Yu4KDwD0NRH4AJ24XAhE6FuHz_4Ubf60Gg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/06/2018 03:41, Warner Losh wrote: > On Thu, May 31, 2018 at 11:47 AM, Dimitry Andric <dim@freebsd.org> wrote: > >> On 31 May 2018, at 18:04, Benjamin Kaduk <kaduk@MIT.EDU> wrote: >>> >>> On Thu, May 31, 2018 at 09:58:50AM +0200, Gary Jennejohn wrote: >>>> On Thu, 31 May 2018 09:52:22 +0200 >>>> Gary Jennejohn <gljennjohn@gmail.com> wrote: >>>> >>>>> There's something totally screwy about trying to build a kernel when >>>>> /usr/obj is not populated. >>>>> >>>>> I ran ``make clean'' in /usr/src and then ``make buildkernel''. This >>>>> fails with >>>>> make[2]: "/usr/src/sys/conf/kern.pre.mk" line 125: amd64 kernel >>>>> requires linker ifunc support >>>>> >>>>> This is total BS because >>>>> >>>>> /usr/bin/ld --version >>>>> LLD 6.0.0 (FreeBSD 326565-1200002) (compatible with GNU linkers) >>>>> >>>>> which is exactly what bsd.linker.mk is looking for to set ifunc. >>>>> >>>>> If I do this: >>>>> >>>>> mkdir -p /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin >>>>> cp /usr/bin/ld /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin >>>>> >>>>> the buildkernel then succeeds. >>>>> >>>>> Considering that (reformatted output from make) >>>>> >>>>> PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin: >>>>> /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin: >>>>> /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin: >>>>> /usr/obj/usr/src/amd64.amd64/tmp/usr/sbin: >>>>> /usr/obj/usr/src/amd64.amd64/tmp/usr/bin: >>>>> /sbin:/bin:/usr/sbin:/usr/bin >>>>> >>>>> it seems like /usr/bin/ld should be found by bsd.linker.mk and no >>>>> error should be reported. >>>>> >>>> >>>> OK, it seems that ``make clean'' does not remove the contents of >>>> /usr/obj/usr/src/amd64.amd64/tmp/legacy. If I delete everything >>>> under /usr/obj then ``make buildkernel'' works. >>>> >>>> Still, it seems pretty strange to me to make building a kernel >>>> depend on some random junk which is left laying around under >>>> /usr/obj. >>> >>> Whatever happened to the "run buildworld or kernel-toolchain before >>> buildkernel" requirement? >> >> That is still a requirement, yes. Otherwise, you might have outdated >> toolchain components are in your /usr/obj. >> > > Usually you can get away without doing that, and now that clang is the > toolchain that's rebuilt (and that's not fast) people try to get away with > it more and more... There is WITH_SYSTEM_COMPILER to not bootstrap if possible. -- FreeBSD - the place to B...Software Developing Shane Ambler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f7773a0c-e39f-f3da-280f-f1085ade4fbc>