Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cHDgl-0004DN-7P for mharc-grub-devel@gnu.org; Wed, 14 Dec 2016 12:49:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHDgi-0003uF-Ff for grub-devel@gnu.org; Wed, 14 Dec 2016 12:49:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHDgf-00049j-BN for grub-devel@gnu.org; Wed, 14 Dec 2016 12:49:56 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHDgf-00047Z-5X for grub-devel@gnu.org; Wed, 14 Dec 2016 12:49:53 -0500 Received: by mail-wm0-f67.google.com with SMTP id m203so721961wma.3 for ; Wed, 14 Dec 2016 09:49:52 -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=RV4Hs8pQ+zo/s/U4V3PTIrIkZPkHRG4vT9fKDbpesiY=; b=kGDwhBxdHjaHZzL5/YGFr3VqWZ2YPTA3lVHYIL+yFGthZ7Fso/hNRmdCgD28Xinkkr BPElXj6Dr53NL0Ca50Z2sto+dHaQy2DGe0JIC5GnaIz9VU5rQgG0Vi3mk5pAXv3hYdP+ O/MWi9ffXSne3MgS5dDgHlpzeiR2vlbKSL17/EIbhmYV2G3KG48dToDx+62Rb6C5ZZvS ORTg89umnkeq4F5/QR9mUN0BbohkzX8qOcTkjctAT50cY/t5hmuwhlBE6L+KQzyR1ryC 9nWvisJ/W0iby14pCAOrm62APFUK45tJAzW+cJzeZu4tbLTcN9lM1X9E3HT90WApsGbC aXHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=RV4Hs8pQ+zo/s/U4V3PTIrIkZPkHRG4vT9fKDbpesiY=; b=R+8ZfHvqGIR4zgSlkasrYMSG5uEWTxlvmMiZI7N9Ts1ry/lGD40yAUesXeSGkvBn09 axr37BcS7lIFj1IGxeoJYlAzSOnKLT4f43NhA9vQQrAefaDuOTaaU74nxLcsCobyq/5i t2fZU/Qug07l/IZ4Sy0tJ+fVxBvoxy5Ntyr7ybFJv61oEIEsEHG9crRbbnut9L5uZDj4 w4njTIm0Q/ZmjHwK9d8dyCpz53sbuM98PjTCICcNmAcU7OZ16tZGj8+B2gszFNDmQHbx xvom7kILH6KybM3zjItGBYuss1dw+WJMWAabn+KbbLfQzFv0X49AuLhkUtnE8zCNHuTl B/pQ== X-Gm-Message-State: AKaTC02++TfGyu7JzLFaV9FlvVs+z7J0fJ/Tp324Mx6tic/tcJ0F269A+DOUYgQj3OTf5A== X-Received: by 10.25.67.83 with SMTP id m19mr3699078lfj.137.1481737731704; Wed, 14 Dec 2016 09:48:51 -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 a63sm10646099ljb.46.2016.12.14.09.48.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2016 09:48:51 -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: grub-devel@gnu.org References: <1480178885.8833.147.camel@users.sourceforge.net> <1481669155.14679.133.camel@users.sourceforge.net> From: Andrei Borzenkov Message-ID: <9183ddd6-7872-a378-7caa-0343d1b7f7dd@gmail.com> Date: Wed, 14 Dec 2016 20:48:46 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1481669155.14679.133.camel@users.sourceforge.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2rVIRKEHhDiXVGR8h2Vigq8w8bDaC7Vl4" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.67 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: Wed, 14 Dec 2016 17:49:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2rVIRKEHhDiXVGR8h2Vigq8w8bDaC7Vl4 Content-Type: multipart/mixed; boundary="Augs35h8AI26ndn3HoQQpi3TFFLt8lMu8" From: Andrei Borzenkov To: grub-devel@gnu.org Message-ID: <9183ddd6-7872-a378-7caa-0343d1b7f7dd@gmail.com> 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> <1481669155.14679.133.camel@users.sourceforge.net> In-Reply-To: <1481669155.14679.133.camel@users.sourceforge.net> --Augs35h8AI26ndn3HoQQpi3TFFLt8lMu8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 14.12.2016 01:45, Paul Menzel =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Dear Andrei, >=20 >=20 > I am sorry for the late reply. >=20 >=20 > 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: >=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 platfo= rm >>> *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_MACH= INE_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.= =2E/../include -I../include -I../../grub-core/lib/libgcrypt-grub/src/ = -D_FILE_OFFSET_BITS=3D64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -W= char-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimizati= on -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wfo= rmat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain= -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -W= return-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs= -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-par= ameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs= -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-= declarations -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-po= inter-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflo= w -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolat= ile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototyp= es -Wmissing-declarations -Wformat=3D2 -march=3Di386 -m32 -mrtd -mregparm= =3D3 -falign-jumps=3D1 -falign-loops=3D1 -falign-functions=3D1 -freg-stru= ct-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 -Wtrampoline= s -Werror -ffreestanding -MT bus/usb/serial/usbserial_common_module-c= ommon.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-com= mon.Tpo -c -o bus/usb/serial/usbserial_common_module-common.o `test -f 'b= us/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= scheiterte >>> make[3]: *** [trig.module] Fehler 1 >>> make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet... >>> [=E2=80=A6] >>> ``` >>> >>> Should PIE be disabled explicitly? >>> >>> >> >> Does patch in this message work for you? >> >> http://lists.gnu.org/archive/html/bug-grub/2016-11/msg00011.html >=20 > Yes, with this patch applied, I could successfully build GRUB. >=20 >=20 OK, committed. --Augs35h8AI26ndn3HoQQpi3TFFLt8lMu8-- --2rVIRKEHhDiXVGR8h2Vigq8w8bDaC7Vl4 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 iEYEARECAAYFAlhRhf8ACgkQR6LMutpd94xzdQCg0irdxyCFtmc3ib/BP4MzzkOs s5sAnRKI7hf5yiYgm5pDYN6xYaErohNA =PfNn -----END PGP SIGNATURE----- --2rVIRKEHhDiXVGR8h2Vigq8w8bDaC7Vl4--