From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942512AbcJ0ONq (ORCPT ); Thu, 27 Oct 2016 10:13:46 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:58867 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936613AbcJ0ONm (ORCPT ); Thu, 27 Oct 2016 10:13:42 -0400 From: Arnd Bergmann To: Thomas Petazzoni Cc: Alexey Brodkin , "mpe@ellerman.id.au" , "linux-snps-arc@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "peterz@infradead.org" , "Vineet.Gupta1@synopsys.com" , "geert@linux-m68k.org" , "mmarek@suse.cz" Subject: Re: Build regressions/improvements in v4.9-rc1 Date: Thu, 27 Oct 2016 11:32:11 +0200 Message-ID: <3060589.4sao41u0pp@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161027111118.5c585d51@free-electrons.com> References: <1476688913-15648-1-git-send-email-geert@linux-m68k.org> <1477559240.2561.8.camel@synopsys.com> <20161027111118.5c585d51@free-electrons.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:9kZB/wBMR+IQIc12Cocn7SjREoJ6NeP4YJqKumpswpg+pvCrR67 K3dUkmALSmt3eXK85DIzhzxI7SDvPOmA0DGEkufBpYrsIdSMU3evJOiUZ+pyilCbEMMGlom sATyfkA2cQtJJJAPhd76WPCzYZshgZhwI1yVek3m2eTXEFw5jSE5UznC6wFNsDaZVBdQTeX 5psTq1qkeHh4P59PzmEHw== X-UI-Out-Filterresults: notjunk:1;V01:K0:n5+drQlUGYE=:0l3+oGJZSMLPec0q+tej8R p2OuCqfnNHivYr5VVa48ZMCD8wmosS3jJNCps5jC6NS2N19hC2a0QKQvIDsVp8DlKBgkRSl0d zNnC+ELyBVFmlzdsxyoinHQhylN+MO+28rM/Iqv99rYqsBOay4BdMV51selj/yFGf4+z8oOfz jabIIA+vQJFc7zeMLuOYfdz+NJGkZ0vTLKqohFIF43a5iWktT3EOrzxHzU2ooaVnF4WAZs3dO 8c/1lPsTr8qJyV+B5ZsxaqAtiBAsnHe7dDdjIl+79iiygMUJPmyNGshq0Yvdp82Bed+bAzkHM 36wVnh98seuiPpjJ56PoLw2QTo2TzH9RYgKHMoV6u4886llCXTv62Ow/0/uyhPnBlbVuy04sK ESo8XSMlXYs3aPGlNUUFh6jcgSsYKi5WyHCq20MHsOeSN+L1CyFvct97cKA3m0iF3zZmvoUjF sYGKkVbE8zoKNJYIcF23Caqu2T/wZh9fVT+R8F2lsZaAYN3UNOnvnMGNTRYLjcW1Oq/FQM5H+ //SleDSqo0iRugwy8Z5sUFrLAgqdJ4JBFLZB5gUVMpMArN2EGm03INY+00BMnIEwv9RVJ6QQ9 OHiz3aykjSz5m2upwuIpzSqmgN9QGqqDzuajtqMyO0q4JGMnOz1AOgO1vTtxV+ajyR0c7w2Ql 2D4KOAAiCQgvDk2tz9gIuCWLtNcM3Ro3T+kk/2AtRLLvxWJqWP9y8LX/MzOQQX0akqaEtfwpQ oWXbMLul3DQrzOSf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, October 27, 2016 11:11:18 AM CEST Thomas Petazzoni wrote: > On Thu, 27 Oct 2016 09:07:55 +0000, Alexey Brodkin wrote: > > > > axs101 is using a 770 core, while the toolchain is built for the HS38 > > > core. I'm somewhat surprised that a single ARC toolchain cannot produce > > > code for both 770 and HS38, but it seems to be the case. > > > > > > So you need a separate toolchain for ARC770. > > > > Indeed axs101 uses ARC770 core which is ARCv1 AKA ARCompact ISA while > > axs103 sports the same base-board but CPU daughter-card contains ARC HS38 core > > which has ARCv2 ISA (binary incompatible with ARCompact). > > > > Essentially both gcc and binutils will happily build for both architectures given > > proper options were passed on the command line. But Linux kernel gets linked with > > pre-built libgcc (it is a part of toolchain). And so it all boils down to a requirement > > to have multilibbed uClibc toolchain. Which we don't have. > > Interesting. Why is libgcc linked with the kernel on ARC? I don't think > that's the case on other architectures: the kernel is freestanding and > provides everything that it needs without relying on the compiler > runtime. A couple of other architectures do this as well: $ git grep -w LIBGCC arch/*/Makefile arch/arc/Makefile:LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name) arch/arc/Makefile:libs-y += arch/arc/lib/ $(LIBGCC) arch/cris/Makefile:LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) arch/cris/Makefile:libs-y += arch/cris/$(SARCH)/lib/ $(LIBGCC) arch/hexagon/Makefile:LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) arch/hexagon/Makefile:libs-y += $(LIBGCC) arch/m32r/Makefile:LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) arch/m32r/Makefile:libs-y += arch/m32r/lib/ $(LIBGCC) arch/nios2/Makefile:LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name) arch/nios2/Makefile:libs-y += arch/nios2/lib/ $(LIBGCC) arch/openrisc/Makefile:LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) arch/openrisc/Makefile:libs-y += $(LIBGCC) arch/parisc/Makefile:LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) arch/parisc/Makefile:libs-y += arch/parisc/lib/ $(LIBGCC) arch/xtensa/Makefile:LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) arch/xtensa/Makefile:libs-y += arch/xtensa/lib/ $(LIBGCC) It's also not always freestanding on the architectures that don't include libgcc: $ git grep ffreestanding arch/ arch/mips/Makefile:cflags-y += -ffreestanding arch/s390/boot/compressed/Makefile:KBUILD_CFLAGS += $(call cc-option,-ffreestanding) arch/score/Makefile: -D__linux__ -ffunction-sections -ffreestanding arch/sh/Makefile:cflags-y += $(isaflags-y) -ffreestanding arch/x86/Makefile: KBUILD_CFLAGS += -ffreestanding # temporary until string.h is fixed arch/xtensa/Makefile:KBUILD_CFLAGS += -ffreestanding -D__linux__ (xtensa being the only one that apparently uses libgcc *and* passes -ffreestanding, for whatever reasons). The other architectures tend to implement the parts of libgcc that they need in the kernel. Arnd