Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cAgS3-0000N7-Ne for mharc-grub-devel@gnu.org; Sat, 26 Nov 2016 12:07:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAgS0-0000Mh-MP for grub-devel@gnu.org; Sat, 26 Nov 2016 12:07:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAgRx-0004Z1-Et for grub-devel@gnu.org; Sat, 26 Nov 2016 12:07:44 -0500 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:35265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cAgRx-0004Yj-74 for grub-devel@gnu.org; Sat, 26 Nov 2016 12:07:41 -0500 Received: by mail-lf0-x233.google.com with SMTP id b14so69131401lfg.2 for ; Sat, 26 Nov 2016 09:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=bWGtAELXHc1LA1/XuqvraRHnLwvnZoB2u8DVQYJjkNA=; b=IQ6R8OSvSsqyXdluM+c6ixet48iKisv01QE9eLtX88RYRgwR4ta62in8t3G+0SztOZ 44f9ucj102MaJoFJJ6KjsNU0VtiyPLN2be6MWcedLbTr6LTR3f7Gbx3t23O4jCMPIYAw T4v2PzOzbrb35HV9wIrTutC4nd7P1bnizEMhGVfAGkl8rTjviLDV+bV055sR5NE8DWcG p3+qO8pnEJ44yKzN52tpi9n5fTDucv3LdPcMgiyaEmz0s4pL9ZXX1yz9hMEHcJeE4/wq 4vmvWDic62Q+hniUZ/k3Y2D6EXlOcHXImWQRjXdFaTmZUrsQaxrC1jnUCKsYU4vwqkWW Z4YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=bWGtAELXHc1LA1/XuqvraRHnLwvnZoB2u8DVQYJjkNA=; b=hnDD1IKxOZq+gwlC/SYU8qv3NA6zspjFcNCcwavB9EkVa5lHKJivJhmlm4FbBhj5y2 WJtsFp3C2IJ8k92mi/dK81izJJdQkTeEqXB4EQ+PMFhxJZFjcTybH3MRFbho3bQ7qzqn yFyMTIlj8p1wegwL+pKOy/4iFwkT+5qmJewzWC1IJgJG+Gkw02xgbhY/tWs6DcBVIVY/ /ry8Kn8opBOGB0uDDmOblC3DlY6j+SAZ5z+zaT+V3z1+B+CdrSt8f+OPoytu+coEe8gW DABYCNvqi0W2fk4XdbpiRgXTz+RPPZHpLYldTTxt/xosmM637CxXyANVfAEo2Y5Iyikz 7b1w== X-Gm-Message-State: AKaTC01oqyeOAxOSH6weBujA6iPkZRKCe9jynC6sFyZofRDyXVau3hQv8q0wF1Q4u2O4OA== X-Received: by 10.46.5.149 with SMTP id 143mr6957789ljf.73.1480180059361; Sat, 26 Nov 2016 09:07:39 -0800 (PST) Received: from [192.168.1.44] (ppp109-252-90-110.pppoe.spdop.ru. [109.252.90.110]) by smtp.gmail.com with ESMTPSA id h129sm10551040lfh.7.2016.11.26.09.07.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Nov 2016 09:07:38 -0800 (PST) Subject: Re: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together` To: The development of GNU GRUB References: <1480178885.8833.147.camel@users.sourceforge.net> From: Andrei Borzenkov Message-ID: Date: Sat, 26 Nov 2016 20:07:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1480178885.8833.147.camel@users.sourceforge.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4eoH4dK9Fkhu8d6mBw80qHioMLI8hd3Sq" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::233 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 17:07:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4eoH4dK9Fkhu8d6mBw80qHioMLI8hd3Sq Content-Type: multipart/mixed; boundary="6FU3rFqxjrsUIooeFNWJ1v6wou0FGEpQa" From: Andrei Borzenkov To: The development of GNU GRUB Message-ID: Subject: Re: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together` References: <1480178885.8833.147.camel@users.sourceforge.net> In-Reply-To: <1480178885.8833.147.camel@users.sourceforge.net> --6FU3rFqxjrsUIooeFNWJ1v6wou0FGEpQa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 26.11.2016 19:48, Paul Menzel =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Dear GRUB folks, >=20 >=20 > 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 /us= r/lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FI= LE=3D\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../= =2E./include -I../include -I../../grub-core/lib/libgcrypt-grub/src/ -D= _FILE_OFFSET_BITS=3D64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wch= ar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization= -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wform= at-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -= Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wre= turn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -= Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-param= eter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -= Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-de= clarations -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-poin= ter-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow = -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatil= e-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes= -Wmissing-declarations -Wformat=3D2 -march=3Di386 -m32 -mrtd -mregparm=3D= 3 -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 -fno-stack-protector -Wtrampolines -= Werror -ffreestanding -MT bus/usb/serial/usbserial_common_module-comm= on.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-common= =2ETpo -c -o bus/usb/serial/usbserial_common_module-common.o `test -f 'bu= s/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 Does patch in this message work for you? http://lists.gnu.org/archive/html/bug-grub/2016-11/msg00011.html --6FU3rFqxjrsUIooeFNWJ1v6wou0FGEpQa-- --4eoH4dK9Fkhu8d6mBw80qHioMLI8hd3Sq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlg5wVkACgkQR6LMutpd94xRDwCfR+tqPO3S4MhVcwIFZkfiYsx2 v+kAmweqDZ9Tx5J55/65sN5S9UJOHUT2 =nJfk -----END PGP SIGNATURE----- --4eoH4dK9Fkhu8d6mBw80qHioMLI8hd3Sq--