Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp785632ybi; Tue, 16 Jul 2019 05:16:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlXYDeOB00GIKhlbXDQepa9ZL/KtFHqeKHtJOcV0stfm0z1fp7Q7evXkOyWQlA/9s/MSJD X-Received: by 2002:a65:5183:: with SMTP id h3mr33121983pgq.250.1563279402568; Tue, 16 Jul 2019 05:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563279402; cv=none; d=google.com; s=arc-20160816; b=L4XDkUwQ72g/O8xRKpO8Izt2mXG56GrfU58U2ZVUGx8L4KvEkK3FmfWw51qwJAHQmc KDxUKLdVXKWA/Un1OTCDG7nkUkOfkBQMFOZUTSJL/KZh+N7Ow22Gw4xWGcIPbTTZ6Fx2 f5GYvW5mm9RtUc6upbxvmCFDxDj9f/vyMcx+ziVcRhT96mM0aErVoBRRKPOnCr1lruKe 95m2Pj3OFUmnpd9sv+MYEl/4gbFLBI9F+C8/ea5jO4UfcOd+n+7liKRLBPUWkMwtiU8k 7XiwP2TTFPvXMmp/C8oW42fm3BTpL2r1e20VcQv2spU88J4MbZTaD1hxqgM+GMX9Ixwf +QYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=N79qne10SoFycZXuMV6wMUnkGYJfcsjLztQFTQFSoEM=; b=dneWBUyzVKeoW7Lzq4Kut4veLIP/pho88j55t62Tpu1Z+bAXvJlGMnmvVecenT8xRx IrnHv+LRysFUN4c+3fQq4A+usbPSEz52yqLM+TVl6GtqleYMe1ttzpWhbUaeQt4e2KZy 4jd9r+264evFscpmF9RD1cwW0p8FUa+zV9DyD1VwlG6AFUHtrEg3py18s6w2ZBi1ggqL 2XuXxXDpwq1qDFx24jClcA3VBC8ttwmxz+jWHAD3cY61oM+wDmEgfIdJzyAFG3zvXGSJ JeyuwOwvUhx8O0Ft1MzmzszKqbfOB9618NX6N/W1AL2YbMER8Dj5JR3eiNYE9AROsAP9 wG5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si17363710pll.377.2019.07.16.05.16.26; Tue, 16 Jul 2019 05:16:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732318AbfGPMPt (ORCPT + 99 others); Tue, 16 Jul 2019 08:15:49 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:53373 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728387AbfGPMPt (ORCPT ); Tue, 16 Jul 2019 08:15:49 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45nzrL2TGxz9sDB; Tue, 16 Jul 2019 22:15:46 +1000 (AEST) From: Michael Ellerman To: Segher Boessenkool Cc: Masahiro Yamada , Stephen Rothwell , Linux Kernel Mailing List , Nicholas Piggin , Paul Mackerras , linuxppc-dev Subject: Re: [PATCH] powerpc: remove meaningless KBUILD_ARFLAGS addition In-Reply-To: <20190715072959.GB20882@gate.crashing.org> References: <20190713032106.8509-1-yamada.masahiro@socionext.com> <20190713124744.GS14074@gate.crashing.org> <20190713131642.GU14074@gate.crashing.org> <20190713235430.GZ14074@gate.crashing.org> <87v9w393r5.fsf@concordia.ellerman.id.au> <20190715072959.GB20882@gate.crashing.org> Date: Tue, 16 Jul 2019 22:15:47 +1000 Message-ID: <87pnma89ak.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Segher Boessenkool writes: > On Mon, Jul 15, 2019 at 05:05:34PM +1000, Michael Ellerman wrote: >> Segher Boessenkool writes: >> > Yes, that is why I used the environment variable, all binutils work >> > with that. There was no --target option in GNU ar before 2.22. >> >> Yeah, we're not very good at testing with really old binutils, so I >> guess we broke that. >> >> I'm inclined to merge this, it doesn't seem to break anything, and it >> fixes using --target on old binutils that don't have it. > > But we don't set the target any other way either. I don't think this > will work with a 32-bit toolchain (default target 32 bit) and a 64-bit > kernel, or the other way around. I think it does, but maybe I'm misunderstanding. My test setup is: ~/linux$ export PATH=/home/toolchains/ppc/gcc-8-branch/powerpc-linux/bin/:$PATH ~/linux$ echo "int test(void) { return 2; }" > test.c ~/linux$ powerpc-linux-gcc -c test.c ~/linux$ file test.o test.o: ELF 32-bit MSB relocatable, PowerPC or cisco 4500, version 1 (SYSV), not stripped ~/linux$ make CROSS_COMPILE=powerpc-linux- -s ppc64le_defconfig ~/linux$ make CROSS_COMPILE=powerpc-linux- -s -j 320 ~/linux$ echo $? 0 And it's definitely calling ar with no flags, eg: rm -f init/built-in.a; powerpc-linux-ar rcSTPD init/built-in.a init/main.o init/version.o init/do_mounts.o init/do_mounts_rd.o init/do_mounts_initrd.o init/do_mounts_md.o init/initramfs.o init/init_task.o So presumably at some point ar learnt to cope with objects that don't match its default? (how do I ask it what its default is?) > Then again, does that work at *all* nowadays? Do we even consider that > important, *should* it work? Yes and yes. There were a lot of bugs in the kernel makefiles after we added LE support which prevented a biarch/biendian compiler from working. But now it does work and we want it to keep working because it means you can have a single compiler for building 32-bit, 64-bit BE & 64-bit LE. cheers