On Mon, 19 Jun 2017 15:16:17 +0900 Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> wrote: > Hi Nicholas, > > > 2017-06-09 14:24 GMT+09:00 Nicholas Piggin <npiggin@xxxxxxxxx>: > > Close the --whole-archives option with --no-whole-archive. Some > > architectures end up including additional .o and files multiple > > times after this, and they get duplicate symbols when they are > > brought under the --whole-archives option. > > Which architectures have additional files after --no-whole-archive ? > > I see this case only for ARCH = "um" in vmlinux_link() > where it adds some -l* options after --no-whole-archive. > > I think it is good to close the --whole-archives everywhere. > So, the code looks OK to me, but I just wondered about the log. Actually a number of archs seemed to get build errors without this, and they seem to come from libgcc perhaps. binfmt_elf.c:(.text+0x4851): undefined reference to `__kernel_syscall_via_epc' /c/gcc/libgcc/libgcc2.c:1318: multiple definition of `__ucmpdi2' /c/gcc/libgcc/libgcc2.c:405: multiple definition of `__lshrdi3' /c/gcc/libgcc/libgcc2.c:433: multiple definition of `__ashldi3' /c/gcc/libgcc/libgcc2.c:461: multiple definition of `__ashrdi3' /home/tony/buildall/src/gcc/libgcc/config/xtensa/lib2funcs.S:36: multiple definition of `__xtensa_libgcc_window_spill' etc m32r, parisc, xtensa seemed to be getting such errors. I wonder if the linker implicitly adds some runtime libs at the end that get caught up here. Either way I didn't look too far into it because this fix seems obviously correct and solved the problem. Thanks, Nick -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html