Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753666AbbKXQdl (ORCPT ); Tue, 24 Nov 2015 11:33:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:45064 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753121AbbKXQdj (ORCPT ); Tue, 24 Nov 2015 11:33:39 -0500 Date: Tue, 24 Nov 2015 17:33:36 +0100 Message-ID: From: Takashi Iwai To: Andi Kleen Cc: Michal Marek , Stephen Rothwell , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: LTO build errors (Re: linux-next: clean up the kbuild tree?) In-Reply-To: <20151124021231.GE8438@tassilo.jf.intel.com> References: <20151115112705.0bf4f0ed@canb.auug.org.au> <20151115175848.GD10150@tassilo.jf.intel.com> <5649D3B9.7020701@suse.cz> <20151121010033.GB8438@tassilo.jf.intel.com> <20151124021231.GE8438@tassilo.jf.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2666 Lines: 57 On Tue, 24 Nov 2015 03:12:31 +0100, Andi Kleen wrote: > > > > 5.x is better than 4.x but it's still a slower. It's also not incremential. > > > > At the last time I tested with the latest 5.x and stock binutils on > > openSUSE Tumbleweed, I failed to build, unfortunately. Partly the > > detection of gcc version doesn't work for 5.x, and partly something is > > Really? It work for me with gcc 5 I retested now, and it seems like only the binutils, not about gcc version, indeed. Sorry for confusion. > > missing in binutils side, although it's already built with plugin. > > Yes it needs HJ Lu's Linux binutils, not the standard FSF binutils. > The patch to fix LTO with ld -r was submitted to standard binutils, but they > didn't want to fix the issue. I did "make allnoconfig", disabled tracers, gcov, etc, and then enabled LTO. With hlj version, the build reaches to the almost end hitting this: LD vmlinux arch/x86/kernel/cpu/perf_event_intel_rapl.c:66:20: error: rapl_domain_names causes a section type conflict with __setup_str_set_reset_devices static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = { ^ init/main.c:159:19: note: ‘__setup_str_set_reset_devices’ was declared here __setup("reset_devices", set_reset_devices); Hmm... I see no direct relation, but OK, let's try to get rid of __initconst. Now it hits lots of other errors like: `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin) `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin) `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin) `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin) /tmp/ccUCMU7n.ltrans21.ltrans.o: In function `do_exit': :(.text+0xfc0): undefined reference to `sys_futex' /tmp/ccUCMU7n.ltrans22.ltrans.o: In function `_do_fork': :(.text+0x39f7): undefined reference to `ret_from_fork' :(.text+0x4428): undefined reference to `ret_from_kernel_thread' .... Any hints to solve these? thanks, Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/