From patchwork Fri Feb 2 16:15:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126745 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp781831ljc; Fri, 2 Feb 2018 08:17:10 -0800 (PST) X-Google-Smtp-Source: AH8x2272te3Y78skwq+AUz26olOZRtitNWIklILbDZd/7z8q7rthnMgX/fXjknab2fLkSNuUucIP X-Received: by 2002:a17:902:6716:: with SMTP id f22-v6mr36228303plk.180.1517588229906; Fri, 02 Feb 2018 08:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517588229; cv=none; d=google.com; s=arc-20160816; b=q4WKTHXRCZypewT0rQI21a2G65c4OYtUMd5V0L6o8klw4MNNfJipB7sJPVPWxCnfVh DLRiVxQoZZOvvRklQoOhMxobbXDRJZGR98iJJW/mn2ZpChL6pfvDqXHiH55FqEWe14jV Ud7ZbiL6IDlu0fP79fQ+QYmOJXOxAz29cFvhKbKZSMW8sLBUOOOb3Vqj+lDFSLXlLNXO OzE2ebwDVMlZK7ybu83KjYVnLPxqTkgJSasje3HQo7j1mioO5fUa37O7J5KDrJczAJGM mnjzst0/uV6L9AK+qaJwUp+iu23E/rKf1QDr9ipCaCD5nN5xuYgZC98HvMExCJw76HDd vTvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:arc-authentication-results; bh=RH6eV1i002G21PXtGB6ctkFfrCRp7/iJo2VFr7bi9oE=; b=XuoxxykWWJASPRSwBFYlWcVLYhEbQI59kJKGhKy3S2bUTDm/Zygngz1ENymM2qObvW ERrnG6kMzQOkvzBDcHNMrFwlshvfnw6qbx+fVCGcDhO1H7nnVkdbvZIOq+sAVnS/NGvn TlnLZ7tzvG8GrJjT6Zl/Y6rbahgpV16jY3mDfKKBldbuOLjac27THgO6tLQWlcNGSYYh erpJY4RAjWq6rPHtj2KsxMaRDP8J4DAAZSwCefyU4Smwsj4VS0yg+dFKVQZN/5HeCwwF +8zdxeEFwzfXL5f0dQL8ER3jIG3A1JrlQmsp2NI5p6iMCBKFrwn1Ti9GeUosEofmkWVP q/+Q== 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 x13si1659529pgp.281.2018.02.02.08.17.09; Fri, 02 Feb 2018 08:17:09 -0800 (PST) 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 S1752164AbeBBQRH (ORCPT + 28 others); Fri, 2 Feb 2018 11:17:07 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:54141 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751651AbeBBQQ7 (ORCPT ); Fri, 2 Feb 2018 11:16:59 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0MYpHi-1eDVw41xEg-00VQpf; Fri, 02 Feb 2018 17:16:54 +0100 From: Arnd Bergmann Cc: Nicolas Pitre , Andi Kleen , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnd Bergmann Subject: [PATCH 1/7] [HACK] lto: make config.gz symbol visible Date: Fri, 2 Feb 2018 17:15:39 +0100 Message-Id: <20180202161550.2106846-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de> References: <20180202161550.2106846-1-arnd@arndb.de> X-Provags-ID: V03:K0:1tkGLNEY/roAnh6B7UqTAMJPkDW3vKN2aKLhqSwgFI1PGEh87I1 bWksHtxO+0wP8Gg1Jo3DbTbx5Rh0EboLiE2h9P973e3f+ozSNfezlXHHkqezqpNDWmHsEtL va6ovSP7lCKLTdI2PYZz8/VI4jC5enu+fotd4chUogtwf/rzwJLeSkYSU1fQj7idfKzEbxz ofr3LO1fdaAlpjHxOLquQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:IYZmf6V764Y=:k679xQ/aEfI1gAq7nroLit KG9qjH+wd56+15iTD9qo0GZHbKOXW2v68EY5u4FFSiAMjVEq54+s8oITSrLLwz5J3/dxJTjmg l58ikoJlPcmpxaHAxVPKvaZxW6YcS9Nhlx43wiq9tRr/vWmnrdw06ehTKMjq8/xkiICHrOOC5 xznnv0WVTZb3vdcd9A+iD3gXt7uBKFrgtjV8bvDAtiSibCJloDYyJnja8It/bIjCgQX9uOmeD KQPYgZoLkNBBPFC0SAKgiQ/c93KHAtolWFTKGhb71HOPOKFjKlP3k0xnvJelWszfgOXnBgRwE hVHuJoWZ5Un4jTDmV1HjAzKQIEu277kWrTfCYajnSu9nrJL7zSpFU9rAqaDzScWgG9lR4De1n S5NtjizWJuGntkPnRfLQoMa6i5gc/XVwA/JhwJ5zFDWpnrozzNyKIo23YVEhfod9hYPDYhHZR AtyPoigsOzZ8s4F1H/WoLvp4t8B9UI+5HMnvkmxQ1VhXDnMVitpQj6CaU8Bz/wpvFEzak355F X7bN+TJ1IR443IvCi62Xz3kWLWFOgGStu9keRumrPQd2QCckFaIO9/DACAsBkX+CLAOs/h48w Jo2dfKjowchIJRslLYbaDwh2cpsq0o22Nj/LiHP2NLgDFSNxOWLwDve1ynz5kaqsla5DyxF+T 8A6pTxMgy1Fxq3vcZOQCMhsbDdVJnHbinrQ2cOAzZKcoMQJYe+EmkYdn7vDt8bVU4w2GNNhkL tV0u9iQ64hFb8uVQGs2v09qROFtu8zY7gu//QA== To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org building with LTO enabled, I often get warnings about kernel/configs.c being empty when CONFIG_IKCONFIG is disabled: x86_64-linux/bin/nm: kernel/configs.o: no symbols Making the symbol visible is probably not the right solution, but it does get rid of the warning. Signed-off-by: Arnd Bergmann --- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/kernel/Makefile b/kernel/Makefile index 7666ee88e237..40b48e3e87a2 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -120,7 +120,7 @@ targets += config_data.gz $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE $(call if_changed,gzip) - filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/basic/bin2c; echo "MAGIC_END;") + filechk_ikconfiggz = (echo "const char kernel_config_data[] __used __visible = MAGIC_START"; cat $< | scripts/basic/bin2c; echo "MAGIC_END;") targets += config_data.h $(obj)/config_data.h: $(obj)/config_data.gz FORCE $(call filechk,ikconfiggz) From patchwork Fri Feb 2 16:20:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126746 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp785331ljc; Fri, 2 Feb 2018 08:21:34 -0800 (PST) X-Google-Smtp-Source: AH8x226cQ+cZy4mR22FVj/5abc3Fw25OdWbUFAo+dwFjmWGOZdZqPFPat4vb4GhTA53d2YwvvT8H X-Received: by 2002:a17:902:4283:: with SMTP id h3-v6mr36206258pld.175.1517588494608; Fri, 02 Feb 2018 08:21:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517588494; cv=none; d=google.com; s=arc-20160816; b=PM62ZYTewUEUqtRayQFdxeX4J85eDfTdVtbHU8y6+xmOr420slOXCBQIZ2DHWNDec7 nMQ2yBJHjFBFtbHItnNk2NvK0nh60GYp1c5Zt4iPykE/Ne4TROSSwBx0QRJN3QbFzwjE UWUjuUDIbaQvCMm2t4hDGyMsrclPqadhk/xXMWfqInHQUt0ZFKmpR9QkasqfIuyPptHY wIQth+yDtZEqY2Fmncimw67FP714WmUNZrXFKYMSqXm+mcKaEHPBjluYe1Rk2JXdaFxR 5jzzaEhtbQbzGhp17zMuTHtc/8+xV8Fyi0ydD3Xo/WbI/2HfiafIe61oX8YguMjax4k/ FgKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Qszbo39ILF8SzI2iTc3WQPJ/0lDnbrXOGsewp5nwjlw=; b=EQbyLBKg4UncYnmLO+PabVizQvZmvPYL0b2FwVMhLq73GEzJX7Wu57yOkFAteCKeaV aADq8CfOvttR1I1IAb48Q5Fk/sjwF1qdeEa/KE36l5mN/JaWlZvgPuahJLii9vxAEWUh Jm0AssELy5dPqKJDiY9au0t82sT5E6OEdDGVqM1MAtKCrPppwFKb0dEF8bkd4rxi1wDn GQE4/lCmPycLFHe+P8NfPv1CamXNkvYudW/YWP/HHuI6kZh2jTLk/PqS9UJaPMeVxlkJ Eha78g0xNGf5s06jD6AoPcCDdSkGk6tMT8AtgZwK6Hp6fTlCgcENogMSYX5fyBNIYUKA LQ4Q== 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 a18si2056116pfg.271.2018.02.02.08.21.34; Fri, 02 Feb 2018 08:21:34 -0800 (PST) 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 S1752257AbeBBQVb (ORCPT + 28 others); Fri, 2 Feb 2018 11:21:31 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:50709 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751651AbeBBQVV (ORCPT ); Fri, 2 Feb 2018 11:21:21 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LbJdK-1fAgAZ0PU2-00kv7e; Fri, 02 Feb 2018 17:21:17 +0100 From: Arnd Bergmann To: Andi Kleen Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnd Bergmann Subject: [PATCH 2/7] [HACK] x86: lto: always link in library files Date: Fri, 2 Feb 2018 17:20:59 +0100 Message-Id: <20180202162104.2300532-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de> References: <20180202161550.2106846-1-arnd@arndb.de> X-Provags-ID: V03:K0:flrZBbhZi9cVDoFvU6AbbD1Tee2W5kB4tW4tJHT4axv8i4Nr6Qr 8VWSu79MnFO2jMQAFxRemfswQVR9OTG9LjoKTzyFChH0HWcXQ9KkB7Vz2XlcjmMP+ElLEmF Q2SluilVpqWH3LXH4U9m1Xpm663xJAmwgj1MYOW6lkk3cFwxtl00JbgErdgFUaSgVrgkrON wODlJlIVQmdVnyyPA06IQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:+1UQAN6iyMM=:oE8mK+bBWNbNvSspm7tuP+ un3qJ3U7cEx/zPiWKjaoyUtNZ2B/79GS9qIj2h71TrPaVdt9JiDJB4593tiR63MNmbqnnNndO R2xbGxNieZXHT26UOmaScyyZhNnYUojoib5fs6olj6W6+iIFJvlo7G2liO9EgLMOkBaPTZiA2 asyY+J57Rg5T751Pdk7ketlavlOuTNf7aMl47KxItIAU2CDGVbOJ3qSUoFpVGJ+g+EBhjWzNg oKl1nYGDK7IpEd7I3XnDimoM6hKtfnBJR6wM6n8WsR5TqefRjCTjwKn/z/8nz5UT/KeSppKLS WIGYWSXUnD+qWG67nY1p0byQSW7mGStkQB9Ck/5luPYJFKoUF4fsl4zgwBcQJwsV33HDbCLBI k9Ezz7J1syD8o3CiTrs4iEsa5m7J6Bza2Ew1o+JI1LlkOWb5RJh3aLQ98R2FkBqaB3oWkQ+VC srSbT3UbFDCGYhWgcoFduTj7z0UbAn7vVtAA3gQYPd5B51rmV4mCmgq4kY2dlqdRU5uUGBR9T LXTM6EKkG6vkNL23Iy/dk6f11GPoRacDT3/qKmJA7VGm5/jt0VbBqODrzz5dJKr1EImRx8nd4 Pns93BKpRZ2TDNfRZ3+EzS9Sx/JVxseIr7T1g4e9Wqhh59tyjdwv190oAcSD2VbnWJSovIea3 Isy7mVrFU0NshNoY8f9s4GsoCdYHyKqMEXp2dWDH4YT09L9zZodh84RWLeosspPSMF4UTl2WT GmzpiNqvG4Og3bKw/g5kje8mxMzbrD+8ZMT6aQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building with LTO on gcc-8, I got many link failures like this: ./ccWpIHzj.ltrans0.ltrans.o: In function `siox_poll_thread': :(.text+0x3042): undefined reference to `memset' ./ccWpIHzj.ltrans0.ltrans.o: In function `iio_push_to_buffers': :(.text+0xdd22): undefined reference to `memcpy' ./ccWpIHzj.ltrans0.ltrans.o: In function `dln2_adc_trigger_h': :(.text+0x24175): undefined reference to `memcpy' :(.text+0x241ec): undefined reference to `memset' ./ccWpIHzj.ltrans3.ltrans.o: In function `ir_update_mapping.isra.1': :(.text+0x1d5a5): undefined reference to `memmove' ./ccWpIHzj.ltrans3.ltrans.o: In function `ir_establish_scancode': :(.text+0x1d6c9): undefined reference to `memmove' ./ccWpIHzj.ltrans9.ltrans.o: In function `write_rbu_image_type': :(.text+0x92d6): undefined reference to `strstr' It seems that the linker fails to pull in the lib.a file for some reason I have not found out. We want a proper fix for this, but in the meantime, this simply makes all those files built-in all the time, which does the right thing with LTO but might produce a slightly larger kernel image without it. Signed-off-by: Arnd Bergmann --- arch/x86/lib/Makefile | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) -- 2.9.0 diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 25a972c61b0a..d49f02fd79d6 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -20,32 +20,33 @@ clean-files := inat-tables.c obj-$(CONFIG_SMP) += msr-smp.o cache-smp.o -lib-y := delay.o misc.o cmdline.o cpu.o -lib-y += usercopy_$(BITS).o usercopy.o getuser.o putuser.o -lib-y += memcpy_$(BITS).o -lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o -lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o insn-eval.o -lib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o -lib-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o -lib-$(CONFIG_RETPOLINE) += retpoline.o +lib-y += delay.o +obj-y += misc.o cmdline.o cpu.o +obj-y += usercopy_$(BITS).o usercopy.o getuser.o putuser.o +obj-y += memcpy_$(BITS).o +obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o +obj-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o insn-eval.o +obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o +obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o +obj-$(CONFIG_RETPOLINE) += retpoline.o obj-y += msr.o msr-reg.o msr-reg-export.o hweight.o ifeq ($(CONFIG_X86_32),y) obj-y += atomic64_32.o - lib-y += atomic64_cx8_32.o - lib-y += checksum_32.o - lib-y += strstr_32.o - lib-y += string_32.o + obj-y += atomic64_cx8_32.o + obj-y += checksum_32.o + obj-y += strstr_32.o + obj-y += string_32.o ifneq ($(CONFIG_X86_CMPXCHG64),y) - lib-y += cmpxchg8b_emu.o atomic64_386_32.o + obj-y += cmpxchg8b_emu.o atomic64_386_32.o endif - lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o + obj-$(CONFIG_X86_USE_3DNOW) += mmx_32.o else obj-y += iomap_copy_64.o - lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o - lib-y += clear_page_64.o copy_page_64.o - lib-y += memmove_64.o memset_64.o - lib-y += copy_user_64.o - lib-y += cmpxchg16b_emu.o + obj-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o + obj-y += clear_page_64.o copy_page_64.o + obj-y += memmove_64.o memset_64.o + obj-y += copy_user_64.o + obj-y += cmpxchg16b_emu.o endif From patchwork Fri Feb 2 16:21:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126747 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp785379ljc; Fri, 2 Feb 2018 08:21:38 -0800 (PST) X-Google-Smtp-Source: AH8x224rCNoJBJObJDh+n3T/0FalML1KswYlKZnX9rGioMAfE463Noj5hgbdJj68CTjOUVmNgaNZ X-Received: by 10.101.80.75 with SMTP id k11mr20730817pgo.451.1517588498410; Fri, 02 Feb 2018 08:21:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517588498; cv=none; d=google.com; s=arc-20160816; b=YYZszRUJCNLRuBD7Ws5zl/mg4y7TI6+XETg2aLHsho7dAKQsXD8LJ5a0+nd52xYma+ HIT3kDYelprhYAbH5DKXDRG6pQ8BJ+D++XXtCbYaL3SM+Sop6YDg2t6k7p+YD0KL8ZcE usMRXS1SWEb13W+tu8omW9nLBOP5ZvtVT3HBp1BjG9hrMJU05ITy7qJMioY0At51i3jr kZxIVwGJGhmeoAHxg9oWRgs7L5NxRUP8lRwZGuEqPV9ASnClZbSt5tHYuwX+ab8bfrVi suD3ygTqZFIgrkNZjyAgwvk51AWbvPn93UW+UKSBYeYIKVeIFq9t0EFWaSPW2y8LPIp0 UMBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=925H+tZhzhNDpXlC39VwfYueuWn8XG3WxOb95JIOLY8=; b=OOLQOin9cw1hGQVNfWgpaaDZhU1KGaRvakniAe2BcXJT2mjtKkKHpsvB1e77GvPU3y 1Yo8CpzIQlOoDkfSP36wzzcaDrxvmxNQlTmbP57ZTKWW3eOX/nayDjIRBUMvss5pwVfp nnyzNXXV3Jw7XuOQ8I6B1115OTNuSvsUzol1HE19RAnIc0yR/QZRK5CSCdoTAf0fiVfh j2OKNO+duQ3mNZD+vF5id8oBJgIElz0VRTNMS3pEcbjuZGhskf/oEmS3ejwHfYAW52EE KGtRnUB5TTp5frbYGsNP/8u/tzBgmmGgGP36EIrOhpqzbkM6oG0qQB3ZyKk7NHmxHrDr 8AGQ== 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 a18si2056116pfg.271.2018.02.02.08.21.38; Fri, 02 Feb 2018 08:21:38 -0800 (PST) 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 S1752323AbeBBQVg (ORCPT + 28 others); Fri, 2 Feb 2018 11:21:36 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51339 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbeBBQVW (ORCPT ); Fri, 2 Feb 2018 11:21:22 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MGR4S-1eUUvN1edc-00DG8C; Fri, 02 Feb 2018 17:21:17 +0100 From: Arnd Bergmann To: Andi Kleen Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnd Bergmann Subject: [PATCH 3/7] [HACK] x86: crypto: fix link error with LTO Date: Fri, 2 Feb 2018 17:21:00 +0100 Message-Id: <20180202162104.2300532-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de> References: <20180202161550.2106846-1-arnd@arndb.de> X-Provags-ID: V03:K0:/4xB8qLKWRsQKS6zFXtOIoVYJOhfhv/XMhjjv3mV7IpzLd2Amsp DRXC8eRUisLpqAR1g38LRi2XbAdnCRUuBzpyO1w/wV+z5f8zxr0OX3FCJJ/tkcGUzK6xsjP 1XYem71gFR08CjBfcOHX/+8YxoDb9vGsQ7sU/0tY2ClEHLlzbs3pSiSXObJfqHR6jUrp2Fk 6aJAaDrQr0CT6yF1EnJrA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Uy4Kgz9iaYM=:FYA3RK/NLHdVC+0osIkE4a jPUeN7QhWD/Ztn1SoyP7tmuYD31Oje1A80SZ3/q4RG/RfmwDijE7xQWIkvZlxrsLFZbq2E2kA A3KGAjEWxEy4vB/3YOgDyvwkgHGxa8O8CBcxgem8O+4/RQ9UuOC+DEOKTXy/v+nwGpMzuv9vH Wd4QrqSArEMl3MLr6JGglUX4zupEs+sNGRC062hR6EHF+T7ix1Xk66CXo0iwPtM1XXj3xzr+i Y4FudgJcOrxSdnhXrNSahme13E+5S0FyjGqkSdnQhFo4NdycfhqTxKq0Q0LSmrTk4aWmy4SN8 hn8NzxuHicmWHMY3+HfwGMws2CRrSjRbGg/bKSXGYx42iLEYzNlahLsgpueVH4TZjQ/EM92Rp n3m+q3by5VOUQMoGsS8YLftEMUzqpYtNim9ilBeAPwgWyVy+e9GPGcO7yMR6pM3OQJVICUvnV xax4+dMfd61SFe6OSY9pOQjPhtoBDI5oRBninsk81PmluSkWr+YRzFCenQ8S6itmvX2WVepXd u93qnwFMOwZg0SIE0hUwUKnjBOgxzHQAlMMTmRxixYJxW0TIVpe1m9gq/ppJj8V/TaBoEsATG gZOd14nkQytgzrxYePmVXnLO8fHKoWY1+gRFiQw8RjVnx/m2/uCScKAkvq1onmLhn3eJeB//S txHEIfy9ym/PsPK+X6eA2riLHGDNRT5OvvFnbM3s4dioGC3mD/8eJCXSrze/w5ZZuf0N3WJDN 1EmU+mRAAi9LBQr9FN6UGFA2rUQRSTgJ5oGFgw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org crypto_it_tab and the other symbols like it are defined in crypto/aes_generic.c and exported for loadable modules. When building with LTO and CONFIG_TRIM_UNUSED_KSYMS, the exports are eliminated, since kbuild fails to take the users in the arch/x86/crypto/aes-i586-asm_32.S assembler file into account. This adds an ugly workaround by adding a reference to each symbol into aes_glue.c, which gets linked together with the assembler file. We obviously want to fix the CONFIG_TRIM_UNUSED_KSYMS logic to do the right thing here instead, but I couldn't come up with a good fix, so I use this instead to get a clean build for testing. This fix only works most of the time, but I still ran into some cases where combining an .S with a .c file did not produce the correct .ko file, as the lto linker apparently did not expect that kind of input. 'nm' on the file after 'ld -r' showed only the contents of the assembler file, and after the lto-ld stage, only the contents of the .c file are there. Signed-off-by: Arnd Bergmann --- arch/x86/crypto/aes_glue.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.9.0 diff --git a/arch/x86/crypto/aes_glue.c b/arch/x86/crypto/aes_glue.c index e26984f7ab8d..6da3e3c34a77 100644 --- a/arch/x86/crypto/aes_glue.c +++ b/arch/x86/crypto/aes_glue.c @@ -53,6 +53,11 @@ static struct crypto_alg aes_alg = { static int __init aes_init(void) { + /* ugly hack to force a link time dependency */ + if (&crypto_it_tab == &crypto_ft_tab || + &crypto_fl_tab == &crypto_il_tab) + return 0; + return crypto_register_alg(&aes_alg); } From patchwork Fri Feb 2 16:21:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126749 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp785727ljc; Fri, 2 Feb 2018 08:22:04 -0800 (PST) X-Google-Smtp-Source: AH8x2254v54C22AsaiZ3fIxahRVwYW95j8Il5E6jV6GXN9zp7wsmT4RBDrByjcayrBg3N3wdOwzl X-Received: by 2002:a17:902:60c7:: with SMTP id k7-v6mr6851307pln.316.1517588524590; Fri, 02 Feb 2018 08:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517588524; cv=none; d=google.com; s=arc-20160816; b=ifBFpvl80elwkhq1FbOwFUKDpZ/amleMiXm+NUy5zUUIDtoU24Cw3ZMs1AFdRGccr1 vLQ3cB4F3TRQntWDIZvwEKR/fqHCNL5uXKAIJhHN9IcwFjlPmL0tG1esIuiniBMzMnRs a2JAMwofedkN/ehOwrm3jtVK2GAJ81yVIHHY2r6vGLUTHgmC0IuchTgqFbC0TWkAtQK6 aB7kpkfDviLSXHC5r+aPB7UhZLQLa/FBfsrh6jMBrgOk/rpSMdV0QF0ZCv6MkdChnses FvMul/9mfnh8DVkabwgqBmP9Z+PX/yhe6DHExNdQlwErOWIYqTiqR89OA/yXoGj9lB4D Gt7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=nf29MdU7mGXKNzyDkKg4OHs6hoY2a2r8ZTFQfY0+ow0=; b=j/uqnRd0w8vkIUcTjwZEZxFxCdn3f+oOJePEXUJHEZQLiXlnOvfW4DZsnyPOqlT+Rg rF9YPwlFSXFEIqbS+zs7VS2MCzylw0u3ev1dPB1O1gd6aqlWbzhSl3vRckgAufjy6L9J XMx1jQHN/4k0Yo2wjGGgQf149XkjriETIi1Sqjr4V9o6ecB7nDq50Dri6MeGd5r5CHE/ rTWbUmWhOSo1Dcl3GHQSUKlZou75ayDXm9/vBS0MfwMyai3ocyl95GIi4CurLrTPg+oj Q5AiMA2ZrfwCBN6toYl22QSnT6+ZN18ffLercD5p7g2a2HO/lbrp2f/h1b590rBmeIi1 Xb6Q== 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 61-v6si2100766plr.132.2018.02.02.08.22.04; Fri, 02 Feb 2018 08:22:04 -0800 (PST) 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 S1752421AbeBBQWB (ORCPT + 28 others); Fri, 2 Feb 2018 11:22:01 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:49733 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbeBBQVW (ORCPT ); Fri, 2 Feb 2018 11:21:22 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MgNde-1eLAz52lVe-00NkVm; Fri, 02 Feb 2018 17:21:17 +0100 From: Arnd Bergmann To: Andi Kleen Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4/7] [HACK] lto: shut up some warnings Date: Fri, 2 Feb 2018 17:21:01 +0100 Message-Id: <20180202162104.2300532-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de> References: <20180202161550.2106846-1-arnd@arndb.de> X-Provags-ID: V03:K0:nGtk83rc18PVgE2g71z3hfYpspv3HKY5GTa0cejDsHO7Ul60X9r 7OsPu3/LY2n//qwojdOxKyFPynGNoWr61ppW5BvnG+95z3ru79POjDUStBA8xRw6wh5xneI caCoSPBvq2bHP7hZI8dziwb74bi4oSVsIAPrFzjI7WXZ6twwTI7zsMtuXJu3O9SH8XTO4j4 gZRyn76AjIMlTGebwTUXw== X-UI-Out-Filterresults: notjunk:1; V01:K0:tlcYkCnHVrY=:8DHbeeAeRXYSLtXf00qppt 2OtWdb0Ns4xsRmhuvaYqYJXDBafHaPSOFkUeqTaJBRrOYKTF424IyCtF2LuFbBOoQB/HjaFpC +rQOZW1iFSydXKpO11DBLAwhDwaiunXCUDQ/5EdwTjLBM1ieB4aP4IzHg8qMheByft45eBki/ 8hrY0q7zG5ajSyN7TWjAujq7BW/P54xvuPHEnWx2FiXDJozwDrGGBG773Gsx5QQ6P+LaylIOl zBwXBDVsV5nQ4vB/JRbOSqZ/XPFH079ho995SdOcrDvR2qkvjTP1aHmjkoPEKeDuobVjwOmha b0yVC/GCcDH7cNzdntLt64Rkze6r8Cb0Pv87Od4SSS9tB0GiNMI1d/Y+/xwHxjoULrcv5xAPm IunZ0JvF+fzO96bb2OlDEI27DyJtZ+vBsgsjQCu8oFBE67TdTgVlaG5ha2FlQe8IzI/QQ2V4z 6niZcyqpvMxvcFaVqc3jgWQv72lPW8/M2Src1QgDz2bNsQTxtDPYbyufcpZVbyxoGwWaWBUIP 0izCGgBmMgHdquPL/946ggWwEwkw/iwzO4BDc5DvkgNA20owIz7pWVRSHKYtHGD1TcAH3p0xb HirhodwYUHUCju2Gla3E/CCZh7S9FCxtqE9GiiYhjXlsrP5OPJ27nj3VJG0GL8nYAbyY2LI6z 3YcAuCzmrOStm3tgErhecjcJhZTD7xTGaA8dfMaTdUTK7Rwi2LQe4Lcxk/nZ46Qe3LqtyErDT juEg72Ms9Tf1y6NXfIWlkW9EZQYPaX5I77MZYw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building with LTO currently causes some annoying warnings: WARNING: modpost: missing MODULE_LICENSE() in drivers/vhost/vhost_scsi.o see include/linux/module.h for more information kallsyms failure: relative symbol value 0xffffffff81000000 out of range in relative mode The modpost warning is a false-positive, the other one is so far unknown. Both need a proper fix. Signed-off-by: Arnd Bergmann --- scripts/kallsyms.c | 2 +- scripts/mod/modpost.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 9ee9bf7fd1a2..e13227898d0b 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -395,7 +395,7 @@ static void write_src(void) offset = relative_base - table[i].addr - 1; overflow = (offset < INT_MIN || offset >= 0); } - if (overflow) { + if (0 && overflow) { fprintf(stderr, "kallsyms failure: " "%s symbol value %#llx out of range in relative mode\n", symbol_absolute(&table[i]) ? "absolute" : "relative", diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 49dfcd556c78..87c4404dad48 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -867,6 +867,7 @@ static const char *const section_white_list[] = static void check_section(const char *modname, struct elf_info *elf, Elf_Shdr *sechdr) { +#if 0 const char *sec = sech_name(elf, sechdr); if (sechdr->sh_type == SHT_PROGBITS && @@ -878,6 +879,7 @@ static void check_section(const char *modname, struct elf_info *elf, "section definitions for use in .S files.\n\n", modname, sec); } +#endif } @@ -1963,10 +1965,12 @@ static void read_symbols(char *modname) } license = get_modinfo(info.modinfo, info.modinfo_len, "license"); +#if 0 if (!license && !is_vmlinux(modname)) warn("modpost: missing MODULE_LICENSE() in %s\n" "see include/linux/module.h for " "more information\n", modname); +#endif while (license) { if (license_is_gpl_compatible(license)) mod->gpl_compatible = 1; From patchwork Fri Feb 2 16:21:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126750 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp785838ljc; Fri, 2 Feb 2018 08:22:12 -0800 (PST) X-Google-Smtp-Source: AH8x225EAZf8Y5dgtqx63LuK7LmKRBk/32CV9bQXbuXooebdYR89xF2LMr4phN7ePVblGx04efKT X-Received: by 2002:a17:902:20c8:: with SMTP id v8-v6mr35352263plg.226.1517588532463; Fri, 02 Feb 2018 08:22:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517588532; cv=none; d=google.com; s=arc-20160816; b=X30jAwbRQvf/6L2O3txpbETVR3LV7FnZRJNEQYbpBo9ssbF7vB7AVeIpn46/CXXpL4 GBNeiYV6fpnFh7n0i+DJ3QL0QMu/lLr66qxSk6wgLEnRSYch7FKnSV6vT8FrrAPE7pHL mxXoOkCvkXcB0gU6TrSgySHjTd6u+A+YUjFk502DvarL9yfo7aCC5rtXgTq8a9GSmJDX P9RG8t9Nu9UK7iL2Y95hGr7CRW+3AW/5QxGbbXV1rwDH7hVFUXii4qV5U+xzPxYqI7Bo h+w+kqhAldoTYKhBi6R+DdJWn4/DuW75n0kFAdDyBs41AVdb5zJy8L10QC6biitgBu0M cZHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Z/pq8HmGFRN0V7tENGaqCJebuGRQZTCd0CyKdEnGN9A=; b=QyyINTJZpvXMr5ZmSF7KgU+qG2rW2HitCB9buLjVC5BmJLEEjMaCd8E6S9tFBDQl6K iGnxE7X0pvcbeQIQ6TVjht02hP+kEIP18N7v56Ktpltjhz+5CGZ0GbK1KV1nlkXESpS7 iDhrugYfEx2kyNfE/QKcGYpSAB4EquGYQ4Ld4jnrsOUyg3IvFNIbYSiewNEcsJgXVxw2 l3xtUQfrxDgnBQ/ge0Mr50yvucHx4X6TEE/PAbU2H2Rb3F5fQIjNGqFRPvnQSQYh7G8z bAtp+MWilItgsY6UdkWKFG1SzdE61X6MDwamX83obL55mC50hqZboBuFh2cF2M1aii2e mU2w== 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 q19si1671652pgc.321.2018.02.02.08.22.12; Fri, 02 Feb 2018 08:22:12 -0800 (PST) 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 S1751737AbeBBQWK (ORCPT + 28 others); Fri, 2 Feb 2018 11:22:10 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:52550 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100AbeBBQVW (ORCPT ); Fri, 2 Feb 2018 11:21:22 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LkQIt-1fJias3ueJ-00cMYB; Fri, 02 Feb 2018 17:21:18 +0100 From: Arnd Bergmann To: Andi Kleen Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnd Bergmann Subject: [PATCH 5/7] [HACK] avoid gcc-8 ICE on LTO Date: Fri, 2 Feb 2018 17:21:02 +0100 Message-Id: <20180202162104.2300532-5-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de> References: <20180202161550.2106846-1-arnd@arndb.de> X-Provags-ID: V03:K0:iSnERfIOGrKHLp2wtMzu2l3E4eXo2wWCjWpmjszVxdjKWYTgF3l JTIOIS6ASiA4lXy2N8ugZVQ1YtUalhqZ98YxuCR5ezrGvjT+LegM3AmHxSxx0bMH/NP3esB 7FTrndiceL4mGnHIi97qgFY3WSV3g3/7VKp48hPjuV4GHoqPYqiHY8rBBprf5tcyqFGsWUg 9ho6l6RzZPpT4rnxN2r4A== X-UI-Out-Filterresults: notjunk:1; V01:K0:gUJgnlzJwVQ=:8Kircma9Rd3ErCZW+9N4+H xvjP1oBVPMZlMrcklGoYfPRKh/CTbFEcrRlCBm9VfeTDfmaAfoc3OjNJ4XPw+e6UInBPcPHGl xPomcl8xHtyaZI8Nd8KdDg6/GzZ9PrryK/6xkwS7xt2sWBVVrkYUWuhpUB2SsyKpAw2vVStYA JJxzwCUhrnLI6R1iuThH6q/dZOTWslcWvkKmB4qx4ZEGpczHW1XGwJHwhApsBHuC/899ydUkx 8ux+k2eFvWUOCQBjbFarMBd19Q1+v23fPZ5qxqClj9ihA3KgvBpOPmVW6TWwGIOMdn6u0bgbB jIhQ9Z813h4BOYV/1NSxLXzA0B+aUow+g+kWiW3+9+WLc8Dh+8mhNmcUu0QL/lqirD2MaVf+C yap2On8oFqNSH3qdOm+trmNcaqaJ0OnqG5G3J/zIGFydEwW66IhZl+ZOqYA9en/RnzLG2pYqO 0E8yWEFObFSuyfQO6SMTY+BC0xAGqAgSwtkA5KowkkncSfwdAEJUt2edthubbIEGQJtcNNHvn aqjbnpGW1hSPMJAtrSPxfRG9xLAYxc2krgv48OoT89HYka6LSwHGF7bHQCmQKosXgiwwi9KaG UkiuXzzSSp2UvEVFmEVYdFGA05HdXxSawyf6sCig7SXutjNCphM14BO+fWD2kIHfZbqmhUmef pBy4DGiN+nju01Nb2grDkzikhFURoQrDcvib/YPI8MVrFeIjd/nmthItXkvkWSGCTV13K3HQx AEyO03NhALcHJQL7ss8+G4iBZNGi53niZ/0Duw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I ran into a build error: /git/arm-soc/net/sctp/sm_sideeffect.c: In function 'sctp_do_sm': /git/arm-soc/net/sctp/sm_sideeffect.c:1155:5: internal compiler error: Segmentation fault int sctp_do_sm(struct net *net, enum sctp_event event_type, ^ 0xa42b7f crash_signal The bug is fixed in mainline gcc now, but I carry this as I have not yet upgrade. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84105 Signed-off-by: Arnd Bergmann --- net/sctp/sm_sideeffect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index b71e7fb0a20a..d211863fad48 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c @@ -1152,12 +1152,12 @@ static void sctp_cmd_send_asconf(struct sctp_association *asoc) * If you want to understand all of lksctp, this is a * good place to start. */ +typedef const char *(printfn_t)(union sctp_subtype); int sctp_do_sm(struct net *net, enum sctp_event event_type, union sctp_subtype subtype, enum sctp_state state, struct sctp_endpoint *ep, struct sctp_association *asoc, void *event_arg, gfp_t gfp) { - typedef const char *(printfn_t)(union sctp_subtype); static printfn_t *table[] = { NULL, sctp_cname, sctp_tname, sctp_oname, sctp_pname, }; From patchwork Fri Feb 2 16:21:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126751 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp786007ljc; Fri, 2 Feb 2018 08:22:25 -0800 (PST) X-Google-Smtp-Source: AH8x22667LqKE2uJTswj8wHpQRjBjK0A0tVUNAzSFVWawp4vS7OdULciPY48rIo193J/sNGpqFub X-Received: by 10.99.127.84 with SMTP id p20mr2571992pgn.330.1517588545130; Fri, 02 Feb 2018 08:22:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517588545; cv=none; d=google.com; s=arc-20160816; b=REksdcHt2U1L4xSPXX4mjMb63I1b181Q/wyzMGwsh1T7XR7EoplE4DsFB2YrJF6FlY /eHzCVKu+u9D1tpaf9/tKM/ONa0y0T4blxV5lOo/iSS0xQQ7Y+7KoQhRI8xy+Ds60aqg xnVW1+/vuB6C2MMGUN+bdXrQVM3sSLAYG5rAdMRRGMzfx3CHRZWEklxbOQ6oFs5oIoGa Dqj5fqTWrkjhqa2l5I9UG8ShtnARss/fKPIy1Q1lhxBGRlYlzmiOrudLdAW/tAuOpcom 6x/kJy1sEUOJJr75DBUrGWl/JmGVQBRTTTe188sKZ7l3vbwr9Y67qMV91HLBpfSijzwH Yr6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=sHIrjt/uCiTFwx3pw1hyadPrL+jkZeEBRpXaNH2nknY=; b=ctL6BdpySPtaSsJQlj9aY0OgYgrQAAN3UXkCQl1c0aaJNjMEoWP4REF/OVuo+LlCAB cu95kI53f4sb1vuEqynOVz6eMazxMOhkijZoA12i72pTsehabAbxiSYLTjVm6RY4GD9u TfQh73EmGzRXz09sv/kiPMb3lm+Gc+KZZltI027WnwB4CImWoFp4vDA2omtalMWRi0du o00Uh1v06y7VqGdiWJ4FM2BGdcJKt73dHYYuHt1yCmwV8Ale3W+f0+fztkdv82w1G7yT RmBNlLq7/SM3YUhKQGFMGog4MmIlF5LBYRbpG9I3ECf3Mkb0sNkC+YRyW1kUBNn3yEY8 U4bg== 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 v3-v6si2029394plb.329.2018.02.02.08.22.24; Fri, 02 Feb 2018 08:22:25 -0800 (PST) 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 S1752484AbeBBQWV (ORCPT + 28 others); Fri, 2 Feb 2018 11:22:21 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:50294 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751651AbeBBQVd (ORCPT ); Fri, 2 Feb 2018 11:21:33 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0M2d6r-1eyLQR12W5-00sOIL; Fri, 02 Feb 2018 17:21:18 +0100 From: Arnd Bergmann To: Andi Kleen Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnd Bergmann Subject: [PATCH 6/7] Kbuild: lto: clean build artifacts Date: Fri, 2 Feb 2018 17:21:03 +0100 Message-Id: <20180202162104.2300532-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de> References: <20180202161550.2106846-1-arnd@arndb.de> X-Provags-ID: V03:K0:Q1tpS3sWZ5LNeV0el4my5icWFnLMwoMc+8eoN7V3rt5qwXJuzQ8 vtGU13j1C9xMJsLIEv7EsNn9CsyZ5lo0q/dSqI6FT9QppVG7WB1NajeZiF/dN97kNSEdMv2 ANuasXrS4Poz+3emQBbyrmrRT85DQUrq92OWbzC+dMhLcD1UhfkKTBNK3XyyAIa13xVFDVE SN6aiXKdt/FN06bBO1p6g== X-UI-Out-Filterresults: notjunk:1; V01:K0:RWiW4QIXb4c=:1Q4uXSpidCYq2vVAjTNwZd 0k+FQ78LOWPtd92fMTBUMoF3pe6xPsYu23LUOt+u8ttFjYcWhjDtaJ1G6bxnv2wyCnQJW6hsv /sDahi74CGuj4Om9RoyKOb/vGL2f+k+LW1uTlp2banOv1lpPzjVJgIlmAO5Xa7oWvVgR3Hdd7 S6tIyatXO7r05c5z2afhJRO0RWIqYCzPfInjhOS39GJtUexIYi4cJ51iEVl+QfD09niPAJOxb r3uLW3GbOoFSK3acLKy74H8WuFyCeBNRsHPof/dG3jnQzXf8YdO29sVMvzYQR/8c6j4rh35dA tClPoT7qJJcdxI5ouOgvYbQZ90gxnW4zhV0xV1IZJyUUepGIAjUmkC4c41dS1WbKIIVimq3fZ EFi4aJCqMYnFdMSootJTCR7rxAme2OPQamgSJ7yy+FvyWb5qsytymz9C5zSREouW2oxT6lP1t rxcP6Hv8D0EyhmyWVb8XxhIJiD92TF9Vg08Arv/Mfl26rxE5tbOfLCXzfLyn4KVeOyG5rfOw3 XhoBkPlYZ8sQAhvu1SjTJA6xQMsGRT06PiDya71GpEBcE8KuWecOa8vJhy2oUpp3+wayKdtga xvOLvWWaREoEwzHh+SyIxDnV2boAyNGxi96t+wxl0ZqPn7c3XKSNFFXAAg+HCAEBoh0elG9OL rxToquRiW65cJpkng2jOedOHRAPW4MAT6Yp1J/AGttk/TkAfAsKALSkqD6Bifv9DUCLgtSyzP 5oSpGG2ulqM2svtyn8Ea/6ucGp3kvORvEJRxlA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During test-building I filled up my disk with stale files that never got cleaned. This should make sure we remove them all. Signed-off-by: Arnd Bergmann --- scripts/link-vmlinux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 964b2ee855dd..130df0781072 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -113,7 +113,7 @@ vmlinux_link() ${1}" fi - ${LDFINAL} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} \ + ${LDFINAL} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} \ -T ${lds} ${objects} else if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then @@ -195,6 +195,8 @@ cleanup() rm -f System.map rm -f vmlinux rm -f vmlinux.o + rm -f cc*.ltrans*.o + rm -f vmlinux.o.* vmlinux.ltrans* vmlinux.wpa* } on_exit() From patchwork Fri Feb 2 16:21:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126748 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp785555ljc; Fri, 2 Feb 2018 08:21:51 -0800 (PST) X-Google-Smtp-Source: AH8x224oZEMdb4q9TwhyW9B9pCzkyLa3R+T8pLl0WbWsUA4+WUPiBk563fsW9igqeozsO1vui8zx X-Received: by 10.98.137.197 with SMTP id n66mr40775555pfk.70.1517588511750; Fri, 02 Feb 2018 08:21:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517588511; cv=none; d=google.com; s=arc-20160816; b=nqWm0gy4phb+luOrbrZcstyxZoioVJi3Or5OYTiT+IdxItuzMeoq3vNA6IqVenA0Y4 Pn1kUy/Ek4v5qw9jpTxUhKfxalpYN0YkLdDTg7gBpBQe9ZGy8KeKQZaD+TQPnngJsnZQ N3rXJJsoUkypAg2lHX4Krzw/hNUiLtqXvTLPWscpr9VPgWDjAFqh2jUPVDxGRH2INAaa 6KvS/1pwP4Kx0o4qq0VVD/yCyZp0xJmxpDpb1PEKAhv9oCsZNyw5tTR4pB8H2PIZ0I5b w9r7sI46adRbqAsSqX3pgH+5A31NsCw6W2ukx1llnzoNL22Ya7cc8tExTgvKCVylKE8b Dp9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=ssCrHE5uCZ7nftjhWd3H46BrGbw1ElwWJVPLpsIZvCA=; b=qrwB9D7RuFsehIQfhDY9QOYK2oyKV8TSFPBCZlBpSWwk+OjshtQn8NXMCGJZEeDK4s 1S65Lfbb/m8ncsRZHOaDPPUEte6abvubpCamNjrLkhysjjKf6o2+coWAxanEqmIfXTgU Wl8XJSYXiIt/oOQvAuawr3u363sFQU5KqUXDuZNZDPEIjA6hadKExBvT+288M2goyxgx EmuNQSHAXVliqzcvtcNj8UJp/albt0BdW456KHI9eMSUE1jIkwJaiPwFzRnnTDs7Phpy Fxv7hTA7ud6Soya7b6e5zZ4jEU2JIhfTVoiaYfBJzLZ4gopNXd4AJlyCTECc/b3XKWjv viwQ== 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 q13si1665579pgp.262.2018.02.02.08.21.51; Fri, 02 Feb 2018 08:21:51 -0800 (PST) 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 S1752372AbeBBQVs (ORCPT + 28 others); Fri, 2 Feb 2018 11:21:48 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:52417 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752125AbeBBQVX (ORCPT ); Fri, 2 Feb 2018 11:21:23 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MFban-1eTfRb2Mj7-00Edhx; Fri, 02 Feb 2018 17:21:18 +0100 From: Arnd Bergmann To: Andi Kleen Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnd Bergmann Subject: [PATCH 7/7] Kbuild: lto: pass -m32/-m64 to to LDFINAL Date: Fri, 2 Feb 2018 17:21:04 +0100 Message-Id: <20180202162104.2300532-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de> References: <20180202161550.2106846-1-arnd@arndb.de> X-Provags-ID: V03:K0:4ECsBi2t1oAQ5HuIiYfI+w52xH4FAbmkMiZ2HC4PkcnhD/g+Iei dVC7acy0XKm/GvBM0XwxYvtbAXM/hEIusroRxTjKpl3bH2fjGNVOj9n5h6UNTKqht4PheHf NkQ+Urc63v8Q5p8+tMRtHTJXvYvvC0rs8tQW7JQzbI90Y74o/nzCL4bAIqt3umJV8gzj1WY /UEvU28DoAB9pW6KhOJug== X-UI-Out-Filterresults: notjunk:1; V01:K0:RhUdhm7XNWE=:k/47m+5LlPN7xCgDbKjpkX CWzf5dY064pBY9IdGYtf12Ts4Fh3CQbF4E7cgbZDtviJDcN/8CjjCeutbJEE4/7TgEZG1qBbn WImKTr5TXrmAZET2mz1W8q0dt0q5ozhiEogfXreqmu7ZX5Rk4p6BONcROWuLwkp28qC73j3m2 2gL1wc6gKhCP5QWCRbskVG6ZFV0yc4WyXxC2cPGlyrXHSPk/mOb8/gOZsBPv1NCLhyWMaavxo BRiPa/q4/fckTQF4BxtioqEU8Xx4/5A1gOiTVtcV65I5Q5h1gafl8geLWup0pcoTRfnHPNErL 8cQvNdECLA978RlruOGaLy/lam5S1+5j7ZBNR4b6QC+cBkOPSWWnrKYp/BLzKyJ8tBplTR9I9 l12AJEXQaQCgEfCKWIa4yLnvobFsamQf6W3KFJD4ENHZba3oGEpReY6GF35ae9kRA/Ljk4U7n XkawCULIOZxCbsX9hgeto1bBUNmpriT4HbE7gnQvC8az10BqXV5tV0cnC4aJvacJ++6bw1A7r ehYyEQWMUGXOgxikIoe+Mkzrb582QrpOybW45uXUQoE/tYuJi222Uze1zxg0zWIYLoTDncUYF 2qYTF63NiT5Ny/5Y/K873Qdi9RqzVquAfoI5yYlqzh1jJrtdoEQILKlMvxQj8hKneNlVVhMMl g0HQvzS31bzjJ9/iK/iTCJIqWjAdDfWhvjY1QNW9VfM/10tElGjzsHZ2BpH0vnehGLHsmlJuq ESdGWxt2G5kf4fdLDdQy4hq4guenG6/6oQzcXA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building randconfig kernels with a biarch compiler fails with LTO when the final link uses a different target architecture compared to the earlier compilation stages. Setting -m32 or -m64 in ${LDFINAL} solves this problem, though my feeling is that there is a better way to do this. There might also be other from KBUILD_CFLAGS that we may need in LDFINAL. Signed-off-by: Arnd Bergmann --- Makefile | 2 +- arch/x86/Makefile | 2 ++ scripts/Makefile.lto | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- 2.9.0 Signed-off-by: Nicolas Pitre diff --git a/Makefile b/Makefile index 3b214c5a51a5..1a82fa39f82b 100644 --- a/Makefile +++ b/Makefile @@ -440,7 +440,7 @@ export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE CFLAGS_UBSAN export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL -export KBUILD_ARFLAGS +export KBUILD_ARFLAGS KBUILD_BIARCHFLAGS # When compiling out-of-tree modules, put MODVERDIR in the module # tree rather than in the kernel tree. The kernel tree might diff --git a/arch/x86/Makefile b/arch/x86/Makefile index e79f0fda9aea..12425aafc7fc 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -69,6 +69,7 @@ ifeq ($(CONFIG_X86_32),y) biarch := $(call cc-option,-m32) KBUILD_AFLAGS += $(biarch) KBUILD_CFLAGS += $(biarch) + KBUILD_BIARCHFLAGS += $(biarch) KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return @@ -97,6 +98,7 @@ else biarch := -m64 KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 + KBUILD_BIARCHFLAGS += $(biarch) # Align jump targets to 1 byte, not the default 16 bytes: KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1) diff --git a/scripts/Makefile.lto b/scripts/Makefile.lto index 2d6995ba7d0b..e57d025b7728 100644 --- a/scripts/Makefile.lto +++ b/scripts/Makefile.lto @@ -72,7 +72,7 @@ endif KBUILD_CFLAGS += ${LTO_CFLAGS} LDFINAL := ${CONFIG_SHELL} ${srctree}/scripts/gcc-ld \ - ${LTO_FINAL_CFLAGS} + ${LTO_FINAL_CFLAGS} ${KBUILD_BIARCHFLAGS} # LTO gcc creates a lot of files in TMPDIR, and with /tmp as tmpfs # it's easy to drive the machine OOM. Use the object directory