From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 15 May 2017 18:18:26 -0600 Subject: [U-Boot] Fwd: arch/x86/cpu/x86_64/built-in.o: In function `checkcpu': (.text.checkcpu+0x0): multiple definition of `checkcpu' arch/x86/cpu/efi/built-in.o:(.text.checkcpu+0x0): first defined here In-Reply-To: References: Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 11 May 2017 at 01:39, Jeroen Roovers wrote: > On 11 May 2017 at 06:31, Bin Meng wrote: >> +Simon >> >> On Wed, May 10, 2017 at 6:15 PM, Jeroen Roovers wrote: >>> Trying to compile an x86_64 u-boot with EFI support: >>> >>> arch/x86/cpu/x86_64/built-in.o: In function `checkcpu': >>> (.text.checkcpu+0x0): multiple definition of `checkcpu' >>> arch/x86/cpu/efi/built-in.o:(.text.checkcpu+0x0): first defined here >>> arch/x86/cpu/x86_64/built-in.o: In function `arch_setup_gd': >>> /home/jer/airfi/airfi-base/buildroot-2016.02-apollo/output/build/uboot-2017.05/arch/x86/cpu/x86_64/cpu.c:18: >>> multiple definition of `misc_init_r' >>> arch/x86/cpu/efi/built-in.o:(.text.misc_init_r+0x0): first defined here >>> arch/x86/cpu/x86_64/built-in.o: In function `arch_setup_gd': >>> /home/jer/airfi/airfi-base/buildroot-2016.02-apollo/output/build/uboot-2017.05/arch/x86/cpu/x86_64/cpu.c:18: >>> multiple definition of `print_cpuinfo' >>> arch/x86/cpu/efi/built-in.o:(.text.print_cpuinfo+0x0): first defined here >>> make[2]: *** [scripts/Makefile.build:359: arch/x86/cpu/built-in.o] Error 1 >>> make[1]: *** [Makefile:1234: arch/x86/cpu] Error 2 >>> make[1]: *** Waiting for unfinished jobs.... >>> >>> with the attached configuration. Am I doing it wrong? >> >> I don't have the environment to test but did you use efi-x86_defconfig? > > No, the config I attached has been edited because when I use > efi-x86_defconfig I get a mix of 32-bit and 64-bit objects: > > /home/jer/airfi/airfi-base/apollo/output/host/usr/bin/x86_64-buildroot-linux-gnu-ld.bfd: > Relocatable linking with relocations from format elf32-i386 > (board/efi/efi-x86/efi.o) to format elf64-x86-64 > (board/efi/efi-x86/built-in.o) is not supported > make[2]: *** [scripts/Makefile.build:359: board/efi/efi-x86/built-in.o] Error 1 > make[1]: *** [Makefile:1234: board/efi/efi-x86] Error 2 > make[1]: *** Waiting for unfinished jobs.... > > So I needed to adapt it for a 64-bit target by enabling CONFIG_X86_RUN_64BIT How did you provoke this build error? Did something change? Regards, Simon