From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 656F11A0AE4 for ; Tue, 13 Aug 2024 16:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723567213; cv=none; b=tIyxB9ce9xQz7cODTHM7XCPoLHVWX08hcW93K9F1/DnPfWcnir/oZASo8QQEnYJKQyd9GLIJbBY1CrE90pPsK5Dsz3O93xfRU6VD+3Z4if/mXNbkFPttSUbBu/B23qYHXfPGKTrLwfUhznhVBGsWIiDixv7tUFy/cFbtFAOYZhA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723567213; c=relaxed/simple; bh=z9ThKaCl2dwq7iAZdlUAc8Sa13mjVWGUvaiqO0kBgkA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gE4ivxSSTaze5wWaNvRKFl/70smnsOU4P/TUHwPfZtCdsRJ2+17pw/Cr67iZQLOqJjuj2GB3FvWKLCB475dbzXUB86+NkOleJZ1itgghNUi0N+e6JNCFOnnW7mV4zP7u54MeeRvc+uFX/0fhqhPchZtV2cZ6qg3NknQyqfJeKWQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=a2brPvgs; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="a2brPvgs" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1fc569440e1so52594945ad.3 for ; Tue, 13 Aug 2024 09:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1723567212; x=1724172012; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UIj0JJnYshjIVjXZcWpKVRySnGCTB+N0e3BxW4PAJ2c=; b=a2brPvgsk37d3qEyACZw8pnMuzwnqzj8UVLFy0XDBxdHcZBcdvbXNJ8srijEPHliOP /EiS3GAHdEvtm2cNhaUiC78JjFz3LDzcXujtGcT9AS4sIZftNpOExDZoxiz32MZrkqqi IwwtVgcK89m4JXQFMxV2Xby5TMMYa4cxnDIvY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723567212; x=1724172012; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UIj0JJnYshjIVjXZcWpKVRySnGCTB+N0e3BxW4PAJ2c=; b=lm6/6rTpAg0/aovt/XcVQYKZucZZ9phmLQ/P7sqU05R2SOTx6rUt8qUZFbITSszfKf ikVc0S30mj+GIYse8zCaKRsEpquCha/smnGVG1umyUNIMPSzBj8dThHelHF8qF5REste VEDUQAc7y9Qzuh7zCgHHpTIvFIcS3BUCmiUtPYN39vh5FQbTXaiaFQp6OowC3tAsg6UB ZDig4JAeVmRKGGIbyqCOBlhNXQ5d5iU39IWci7xZavRdss4LITEuQtUkUAfJZm9hQAu0 xN/dl1ydhrk4Ah8eaH2R/5h51K9kxJRgmQoSXSKMclMFt9Gk5TNQgZIsSuKEXvGb8jyj N45g== X-Forwarded-Encrypted: i=1; AJvYcCWsmfieL5Lv4Q2KDoSQmakaGvKSoXXTf7t52AUxvW1ST+0sOaR6pNAHobU3w7eZcGyDKxnV4VjDy7Oulx1bhLfOGM6g1j2+uMYZ6t4V X-Gm-Message-State: AOJu0YwuODJUoijm23CeJyNIWmiH8ZJPmyHBrA5Ek9qHoxr+5y5Zqd+F fIlO2V2iQiHXadGl71b2DOGkxDA7Q+WVTCye7T3V83JvGNzYOsDq0BXMBZ4p9w== X-Google-Smtp-Source: AGHT+IH/REf7OKTZn9xv3HDv0yFQhoCXp3NXeg4RoixeHv4QdV9uxYQmfmO+wc0WQGBCMgKE9Yyo2Q== X-Received: by 2002:a17:903:1c6:b0:1fb:9280:c970 with SMTP id d9443c01a7336-201d638d7a2mr1036295ad.7.1723567211719; Tue, 13 Aug 2024 09:40:11 -0700 (PDT) Received: from localhost ([2620:15c:9d:2:45ad:979d:1377:77f0]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-201cd130632sm15867485ad.49.2024.08.13.09.40.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Aug 2024 09:40:11 -0700 (PDT) Date: Tue, 13 Aug 2024 09:40:08 -0700 From: Brian Norris To: Thorsten Leemhuis Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , Thomas Richter , Josh Poimboeuf , Peter Zijlstra , linux-kernel@vger.kernel.org, Masahiro Yamada , bpf@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH v4 2/3] tools build: Avoid circular .fixdep-in.o.cmd issues Message-ID: References: <20240715203325.3832977-1-briannorris@chromium.org> <20240715203325.3832977-3-briannorris@chromium.org> <99ae0d34-ed76-4ca0-a9fd-c337da33c9f9@leemhuis.info> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99ae0d34-ed76-4ca0-a9fd-c337da33c9f9@leemhuis.info> Hi Thorsten, On Mon, Aug 12, 2024 at 08:32:29AM +0200, Thorsten Leemhuis wrote: > Lo! TWIMC, this change broke my daily arm64 and x86_64 Fedora vanilla RPM > builds on all Fedora releases when it hit -next a few days ago. Reverting > it fixes the problem. > > The problem is related to the RPM magic somehow, as building worked fine > when when I omitted stuff like "-specs=/usr/lib/rpm/redhat/redhat- > hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" from the > make call. So the real problem might be that space somewhere. > > > This is how the build fails on x86_64: > > + /usr/bin/make -s 'HOSTCFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' ARCH=x86_64 'KCFLAGS= ' WITH_GCOV=0 -j2 bzImage > /usr/bin/ld: /tmp/ccMoR0Wr.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE > /usr/bin/ld: failed to set dynamic section sizes: bad value > collect2: error: ld returned 1 exit status > make[4]: *** [Makefile:47: /builddir/build/BUILD/kernel-next-20240812/linux-6.11.0-0.0.next.20240812.329.vanilla.fc40.x86_64/tools/objtool/fixdep] Error 1 > make[3]: *** [/builddir/build/BUILD/kernel-next-20240812/linux-6.11.0-0.0.next.20240812.329.vanilla.fc40.x86_64/tools/build/Makefile.include:15: fixdep] Error 2 > make[2]: *** [Makefile:73: objtool] Error 2 > make[1]: *** [/builddir/build/BUILD/kernel-next-20240812/linux-6.11.0-0.0.next.20240812.329.vanilla.fc40.x86_64/Makefile:1361: tools/objtool] Error 2 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:226: __sub-make] Error 2 > error: Bad exit status from /var/tmp/rpm-tmp.ZQfBFY (%build) I don't have a Fedora installation on hand at the moment, and the logs don't seem to include most of the actual kernel build logs (stdout+stderr of a V=1 build might help), but I think what you've provided so far has highlighted one possible problem -- that the new one-shot compile+link is ignoring HOSTCFLAGS, which were previously respected via tools/build/Build.include. Could you try the following diff? I'll cook a proper patch and description later, but for now: --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -44,4 +44,4 @@ ifneq ($(wildcard $(TMP_O)),) endif $(OUTPUT)fixdep: $(srctree)/tools/build/fixdep.c - $(QUIET_CC)$(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ $< + $(QUIET_CC)$(HOSTCC) $(HOSTCFLAGS) $(KBUILD_HOSTLDFLAGS) -o $@ $<