From owner-freebsd-current@freebsd.org Thu May 31 18:11:54 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2178FF7CB32 for ; Thu, 31 May 2018 18:11:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (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 A2A4C766C0 for ; Thu, 31 May 2018 18:11:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id q72-v6so29177498itc.0 for ; Thu, 31 May 2018 11:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Vak0GIHKt84mzLMyEIzjMBfb/ILePy+Y3ERFS2E8nl8=; b=xoN3RjUHXRHNwKMJTx2t4v4UfgWslZLn+wSLewZxpPjtGYpjlkeqmTOhoNjigR9iIj +NaW9HFfyQE/2U5tjrRrWgj82v7wao9RWzHPPQ2faBF6X36I0PBDSj3sfYyCbTjTdaFd 5u6SOMkL+qZfZ/s6sl1aG+DtaNsTZMsqQzAEtskeCBQHVq2Qy78P+rpVFln9iy/1dhV2 fy2f85/HLtJNs1CfS4AcZv/yw6z0DMXSkurWvlOIe3ABJSJN42UulgTUqzp1k4PFdoJ7 8DTy3EbwITj96jD+FPSVJtztmSbxhmE+tB4eLNTH8zXlS5wPH+fF0RM76oA1DUIhrejy NDYw== 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:cc; bh=Vak0GIHKt84mzLMyEIzjMBfb/ILePy+Y3ERFS2E8nl8=; b=ttKzi8P8VZWMFf3PIDVTas153xYlPh6+UyOiFh2s2yB8ScMUDkiSOh0d3/w+o+KzI6 1/5iHTEonNakM2WRQVA5vEZHF2GU1Achl6MgeE5zmrYBxUwZ+bkUglLimm2RynIzzYHr FbvMDUSyLcqFkZ2pIyviisYIhE7uJRu9QMUq9eoMp2bg/Y9lpYdjpPgIIqZ8cTKob320 CqjOFfCqxm2rsF6HHtRFpgF99u21AqkGyeuK1Ub2QKqEjFxC42sDE/DnEYd4KjCSm5bY jbMFyXa8y/0e+fAvQRH58gvXIjsgMUuIXJMg+No4pgNzzAGsFAYV03FlDnEDyNCMbC4p z63w== X-Gm-Message-State: ALKqPwfpaMsXIFC/3a9eXqmjGLPL41sq0rad4a7pOuEgh1WBOQhCXWAB Tm95G+M33Z7Y9xW7pPSvT9QJyNe6lEt/oRdPcutbCw== X-Google-Smtp-Source: ADUXVKLSFLS0YJTsMmtnKWWSVyxuyMunRwdYaQqbQp+2ZKyU95WYo+9YysnWo72Tz4vFOitHPD9aslQiHXpOVx0jq5A= X-Received: by 2002:a24:42c6:: with SMTP id i189-v6mr1035434itb.73.1527790312972; Thu, 31 May 2018 11:11:52 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Thu, 31 May 2018 11:11:52 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <32C087A4-1B67-4694-B769-16A347D4804E@FreeBSD.org> References: <20180531095222.399e7a37@ernst.home> <20180531095850.5845fd7a@ernst.home> <20180531160406.GD27985@kduck.kaduk.org> <32C087A4-1B67-4694-B769-16A347D4804E@FreeBSD.org> From: Warner Losh Date: Thu, 31 May 2018 12:11:52 -0600 X-Google-Sender-Auth: PSe1miZ-fqfd32Ewk4J7WFGOv8I Message-ID: Subject: Re: ``make buildkernel'' fails when /usr/obj is empty To: Dimitry Andric Cc: Benjamin Kaduk , Gary Jennejohn , FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2018 18:11:54 -0000 On Thu, May 31, 2018 at 11:47 AM, Dimitry Andric wrote: > On 31 May 2018, at 18:04, Benjamin Kaduk 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 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... Warner