From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cAg9O-0004LR-Mq for mharc-grub-devel@gnu.org; Sat, 26 Nov 2016 11:48:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAg9L-0004LB-OT for grub-devel@gnu.org; Sat, 26 Nov 2016 11:48:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAg9G-0005nv-SG for grub-devel@gnu.org; Sat, 26 Nov 2016 11:48:27 -0500 Received: from mail.gw90.de ([188.40.100.199]:34234) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cAg9G-0005nB-LZ for grub-devel@gnu.org; Sat, 26 Nov 2016 11:48:22 -0500 Received: from ipservice-092-216-118-131.092.216.pools.vodafone-ip.de ([92.216.118.131] helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cAg98-00031L-7m for grub-devel@gnu.org; Sat, 26 Nov 2016 16:48:14 +0000 Message-ID: <1480178885.8833.147.camel@users.sourceforge.net> Subject: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together` From: Paul Menzel To: grub-devel@gnu.org Date: Sat, 26 Nov 2016 17:48:05 +0100 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-hTAdydAwyVR6bugynyXH" X-Mailer: Evolution 3.22.2-1 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 188.40.100.199 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 16:48:28 -0000 --=-hTAdydAwyVR6bugynyXH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear GRUB folks, Using Debian Sid/unstable with GCC 6.2, which has PIE enabled by default *in Debian* since some time [1], building GRUB for the platform *coreboot* fails. ``` $ gcc --version gcc (Debian 6.2.1-5) 6.2.1 20161124 [=E2=80=A6] $ ld --version GNU ld (GNU Binutils for Debian) 2.27.51.20161124 [=E2=80=A6] $ git log --oneline | head -1 0d23457 efi: Move fdt helper into own file $ ./autogen.sh [=E2=80=A6] $ mkdir build $ cd build $ ../configure --with-platform=3Dcoreboot [=E2=80=A6] $ make -j [=E2=80=A6] gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I.. -Wall -W -DGRUB_MACHINE_CO= REBOOT=3D1 -DGRUB_MACHINE=3DI386_COREBOOT -m32 -nostdinc -isystem /usr/lib/= gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE=3D\"b= us/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../include= -I../include -I../../grub-core/lib/libgcrypt-grub/src/ -D_FILE_OFFSET_B= ITS=3D64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -W= comment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wf= loat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -W= implicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmiss= ing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-poi= nt -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused = -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunuse= d-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredund= ant-decls -Wmissing-prototypes -Wmissing-declarations -Wextra -Wattributes= -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-f= ield-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict= -aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissin= g-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=3D2 -ma= rch=3Di386 -m32 -mrtd -mregparm=3D3 -falign-jumps=3D1 -falign-loops=3D1 -fa= lign-functions=3D1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse= 3 -mno-3dnow -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asy= nchronous-unwind-tables -fno-unwind-tables -Qn -fno-PIE -fno-pie -fno-stack= -protector -Wtrampolines -Werror -ffreestanding -MT bus/usb/serial/usbs= erial_common_module-common.o -MD -MP -MF bus/usb/serial/.deps-core/usbseria= l_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-com= mon.o `test -f 'bus/usb/serial/common.c' || echo '../../grub-core/'`bus/usb= /serial/common.c /usr/bin/ld: -r and -pie may not be used together collect2: error: ld returned 1 exit status Makefile:27010: die Regel f=C3=BCr Ziel =E2=80=9Etrig.module=E2=80=9C schei= terte make[3]: *** [trig.module] Fehler 1 make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet... [=E2=80=A6] ``` Should PIE be disabled explicitly? Thanks, Paul [1]=C2=A0https://bugs.debian.org/835148 --=-hTAdydAwyVR6bugynyXH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQ8+w9d414FAVARIpk9fVorbA4dWAUCWDm8xwAKCRA9fVorbA4d WLACAJ9IaCfNQEbQojxY/hx7vHRo65zgLgCgiMs5natRnjxgF2+hNzkHzul6+gM= =ThT2 -----END PGP SIGNATURE----- --=-hTAdydAwyVR6bugynyXH--