From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S8YNM-0002OT-Sr for mharc-grub-devel@gnu.org; Fri, 16 Mar 2012 10:43:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8TIo-0001S2-Bf for grub-devel@gnu.org; Fri, 16 Mar 2012 05:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8TIh-0008CC-Gs for grub-devel@gnu.org; Fri, 16 Mar 2012 05:18:25 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59842 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8TIh-0008Bw-7x for grub-devel@gnu.org; Fri, 16 Mar 2012 05:18:19 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 8BA1689471 for ; Fri, 16 Mar 2012 10:18:17 +0100 (CET) Message-ID: <4F630543.1020703@suse.de> Date: Fri, 16 Mar 2012 10:17:55 +0100 From: Andreas Jaeger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Properly set linker flags Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 X-Mailman-Approved-At: Fri, 16 Mar 2012 10:43:27 -0400 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 09:18:30 -0000 Compiling grub2 with gcc 4.7 gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef=20 -Wstrict-prototypes -g -fno-dwarf2-cfi-asm -m64 -mcmodel=3Dlarge=20 -mno-red-zone -fno-stack-protector -mno-stack-arg-probe -Werror=20 -Wno-trampolines -DUSE_ASCII_FAILBACK=3D1 -DHAVE_UNIFONT_WIDTHSPEC=3D1=20 -ffreestanding -static -m64 -Wl,--build-id=3Dnone -melf_x86_64=20 -nostdlib -Wl,-N,-r,-d -o trig.module trig_module-trigtables.o gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include=20 -DGRUB_MACHINE_EFI=3D1 -DGRUB_MACHINE=3DX86_64_EFI -nostdinc -isystem=20 /usr/lib64/gcc/x86_64-suse-linux/4.7/include=20 -DGRUB_FILE=3D\"bus/usb/usbtrans.c\" -I. -I. -I.. -I.. -I../include=20 -I../include -Os -Wall -W -Wshadow -Wpointer-arith=20 -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -fno-dwarf2-cfi-asm=20 -m64 -mcmodel=3Dlarge -mno-red-zone -fno-stack-protector=20 -mno-stack-arg-probe -Werror -Wno-trampolines -DUSE_ASCII_FAILBACK=3D1=20 -DHAVE_UNIFONT_WIDTHSPEC=3D1 -ffreestanding -c -o=20 bus/usb/usb_module-usbtrans.o `test -f 'bus/usb/usbtrans.c' || echo=20 './'`bus/usb/usbtrans.c gcc: error: unrecognized command line option '-melf_x86_64' to pass linker flags to gcc, we should use -Wl,-melf_x86_64 Here's the obvious patch against 1.99 that should still apply to current=20 head, Andreas Index: grub-1.99/conf/Makefile.common =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- grub-1.99.orig/conf/Makefile.common +++ grub-1.99/conf/Makefile.common @@ -11,10 +11,10 @@ if COND_i386_pc CFLAGS_PLATFORM +=3D -mrtd -mregparm=3D3 endif if COND_i386_efi - LDFLAGS_PLATFORM =3D -melf_i386 + LDFLAGS_PLATFORM =3D -Wl,-melf_i386 endif if COND_x86_64_efi - LDFLAGS_PLATFORM =3D -melf_x86_64 + LDFLAGS_PLATFORM =3D -Wl,-melf_x86_64 endif if COND_i386_qemu CFLAGS_PLATFORM +=3D -mrtd -mregparm=3D3 --=20 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imend=F6rffer,HRB16746 (AG N=FCrnb= erg) GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A1= 26