From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cGvq0-0001N2-U6 for mharc-grub-devel@gnu.org; Tue, 13 Dec 2016 17:46:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGvpy-0001JS-8B for grub-devel@gnu.org; Tue, 13 Dec 2016 17:46:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGvpv-0004wI-5H for grub-devel@gnu.org; Tue, 13 Dec 2016 17:46:18 -0500 Received: from mail.gw90.de ([2a01:4f8:100:7463::3]:51051) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGvpu-0004u6-Ug for grub-devel@gnu.org; Tue, 13 Dec 2016 17:46:15 -0500 Received: from dslb-092-077-222-122.092.077.pools.vodafone-ip.de ([92.77.222.122] helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cGvpk-0007zl-Mw for grub-devel@gnu.org; Tue, 13 Dec 2016 22:46:06 +0000 Message-ID: <1481669155.14679.133.camel@users.sourceforge.net> Subject: Re: 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: Tue, 13 Dec 2016 23:45:55 +0100 In-Reply-To: References: <1480178885.8833.147.camel@users.sourceforge.net> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-dNcP5Mvtve72i5JiAjez" X-Mailer: Evolution 3.22.3-1 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:4f8:100:7463::3 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: Tue, 13 Dec 2016 22:46:19 -0000 --=-dNcP5Mvtve72i5JiAjez Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Andrei, I am sorry for the late reply. Am Samstag, den 26.11.2016, 20:07 +0300 schrieb Andrei Borzenkov: > 26.11.2016 19:48, Paul Menzel =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > 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. > >=20 > > ``` > > $ 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_MACHIN= E_COREBOOT=3D1 -DGRUB_MACHINE=3DI386_COREBOOT -m32 -nostdinc -isystem /usr/= lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE= =3D\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../i= nclude -I../include -I../../grub-core/lib/libgcrypt-grub/src/ -D_FILE_OF= FSET_BITS=3D64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscri= pts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-ze= ro -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimpli= cit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces = -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequen= ce-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wu= nused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -= Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -W= redundant-decls -Wmissing-prototypes -Wmissing-declarations -Wextra -Wattr= ibutes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmis= sing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -W= strict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -W= missing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat= =3D2 -march=3Di386 -m32 -mrtd -mregparm=3D3 -falign-jumps=3D1 -falign-loops= =3D1 -falign-functions=3D1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 = -mno-sse3 -mno-3dnow -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe = -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-PIE -fno-pie -f= no-stack-protector -Wtrampolines -Werror -ffreestanding -MT bus/usb/ser= ial/usbserial_common_module-common.o -MD -MP -MF bus/usb/serial/.deps-core/= usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_mo= dule-common.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 s= cheiterte > > make[3]: *** [trig.module] Fehler 1 > > make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet... > > [=E2=80=A6] > > ``` > >=20 > > Should PIE be disabled explicitly? > >=20 > >=20 >=20 > Does patch in this message work for you? >=20 > http://lists.gnu.org/archive/html/bug-grub/2016-11/msg00011.html Yes, with this patch applied, I could successfully build GRUB. Thanks, PAul --=-dNcP5Mvtve72i5JiAjez 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+w9d414FAVARIpk9fVorbA4dWAUCWFB6JQAKCRA9fVorbA4d WEsaAJ9NkRm5vAQ0/XGSNtM2+aFBPy+acgCePgXLkUhZ8nKS+e/WlyLeHFjxxHM= =U1JE -----END PGP SIGNATURE----- --=-dNcP5Mvtve72i5JiAjez--