All of lore.kernel.org
 help / color / mirror / Atom feed
* Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together`
@ 2016-11-26 16:48 Paul Menzel
  2016-11-26 17:07 ` Andrei Borzenkov
  2016-11-28 16:12 ` Robert LeBlanc
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Menzel @ 2016-11-26 16:48 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 2836 bytes --]

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
[…]
$ ld --version
GNU ld (GNU Binutils for Debian) 2.27.51.20161124
[…]
$ git log --oneline | head -1
0d23457 efi: Move fdt helper into own file
$ ./autogen.sh
[…]
$ mkdir build
$ cd build
$ ../configure --with-platform=coreboot
[…]
$ make -j
[…]
gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I..  -Wall -W  -DGRUB_MACHINE_COREBOOT=1 -DGRUB_MACHINE=I386_COREBOOT -m32 -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE=\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../include -I../include -I../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -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-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -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-common.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-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ür Ziel „trig.module“ scheiterte
make[3]: *** [trig.module] Fehler 1
make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet...
[…]
```

Should PIE be disabled explicitly?


Thanks,

Paul


[1] https://bugs.debian.org/835148

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together`
  2016-11-26 16:48 Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together` Paul Menzel
@ 2016-11-26 17:07 ` Andrei Borzenkov
  2016-12-01  4:06   ` Andrei Borzenkov
  2016-12-13 22:45   ` Paul Menzel
  2016-11-28 16:12 ` Robert LeBlanc
  1 sibling, 2 replies; 6+ messages in thread
From: Andrei Borzenkov @ 2016-11-26 17:07 UTC (permalink / raw)
  To: The development of GNU GRUB


[-- Attachment #1.1: Type: text/plain, Size: 3011 bytes --]

26.11.2016 19:48, Paul Menzel пишет:
> 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
> […]
> $ ld --version
> GNU ld (GNU Binutils for Debian) 2.27.51.20161124
> […]
> $ git log --oneline | head -1
> 0d23457 efi: Move fdt helper into own file
> $ ./autogen.sh
> […]
> $ mkdir build
> $ cd build
> $ ../configure --with-platform=coreboot
> […]
> $ make -j
> […]
> gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I..  -Wall -W  -DGRUB_MACHINE_COREBOOT=1 -DGRUB_MACHINE=I386_COREBOOT -m32 -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE=\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../include -I../include -I../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -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-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -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-common.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-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ür Ziel „trig.module“ scheiterte
> make[3]: *** [trig.module] Fehler 1
> make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet...
> […]
> ```
> 
> 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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together`
  2016-11-26 16:48 Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together` Paul Menzel
  2016-11-26 17:07 ` Andrei Borzenkov
@ 2016-11-28 16:12 ` Robert LeBlanc
  1 sibling, 0 replies; 6+ messages in thread
From: Robert LeBlanc @ 2016-11-28 16:12 UTC (permalink / raw)
  To: The development of GNU GRUB

I just did

CC="/usr/bin/gcc -no-pie" ./configure

and got around the issue. This is from memory so it may not be 100% correct.
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904  C70E E654 3BB2 FA62 B9F1


On Sat, Nov 26, 2016 at 9:48 AM, Paul Menzel
<paulepanter@users.sourceforge.net> wrote:
> 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
> […]
> $ ld --version
> GNU ld (GNU Binutils for Debian) 2.27.51.20161124
> […]
> $ git log --oneline | head -1
> 0d23457 efi: Move fdt helper into own file
> $ ./autogen.sh
> […]
> $ mkdir build
> $ cd build
> $ ../configure --with-platform=coreboot
> […]
> $ make -j
> […]
> gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I..  -Wall -W  -DGRUB_MACHINE_COREBOOT=1 -DGRUB_MACHINE=I386_COREBOOT -m32 -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE=\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../include -I../include -I../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -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-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -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-common.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-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ür Ziel „trig.module“ scheiterte
> make[3]: *** [trig.module] Fehler 1
> make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet...
> […]
> ```
>
> Should PIE be disabled explicitly?
>
>
> Thanks,
>
> Paul
>
>
> [1] https://bugs.debian.org/835148
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together`
  2016-11-26 17:07 ` Andrei Borzenkov
@ 2016-12-01  4:06   ` Andrei Borzenkov
  2016-12-13 22:45   ` Paul Menzel
  1 sibling, 0 replies; 6+ messages in thread
From: Andrei Borzenkov @ 2016-12-01  4:06 UTC (permalink / raw)
  To: Paul Menzel; +Cc: The development of GNU GRUB


[-- Attachment #1.1: Type: text/plain, Size: 3150 bytes --]

Ping. Does proposed patch work for you?

26.11.2016 20:07, Andrei Borzenkov пишет:
> 26.11.2016 19:48, Paul Menzel пишет:
>> 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
>> […]
>> $ ld --version
>> GNU ld (GNU Binutils for Debian) 2.27.51.20161124
>> […]
>> $ git log --oneline | head -1
>> 0d23457 efi: Move fdt helper into own file
>> $ ./autogen.sh
>> […]
>> $ mkdir build
>> $ cd build
>> $ ../configure --with-platform=coreboot
>> […]
>> $ make -j
>> […]
>> gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I..  -Wall -W  -DGRUB_MACHINE_COREBOOT=1 -DGRUB_MACHINE=I386_COREBOOT -m32 -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE=\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../include -I../include -I../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -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-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -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-common.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-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ür Ziel „trig.module“ scheiterte
>> make[3]: *** [trig.module] Fehler 1
>> make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet...
>> […]
>> ```
>>
>> 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
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together`
  2016-11-26 17:07 ` Andrei Borzenkov
  2016-12-01  4:06   ` Andrei Borzenkov
@ 2016-12-13 22:45   ` Paul Menzel
  2016-12-14 17:48     ` Andrei Borzenkov
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Menzel @ 2016-12-13 22:45 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 3263 bytes --]

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 пишет:

> > 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
> > […]
> > $ ld --version
> > GNU ld (GNU Binutils for Debian) 2.27.51.20161124
> > […]
> > $ git log --oneline | head -1
> > 0d23457 efi: Move fdt helper into own file
> > $ ./autogen.sh
> > […]
> > $ mkdir build
> > $ cd build
> > $ ../configure --with-platform=coreboot
> > […]
> > $ make -j
> > […]
> > gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I..  -Wall -W  -DGRUB_MACHINE_COREBOOT=1 -DGRUB_MACHINE=I386_COREBOOT -m32 -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE=\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../include -I../include -I../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -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-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -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-common.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-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ür Ziel „trig.module“ scheiterte
> > make[3]: *** [trig.module] Fehler 1
> > make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet...
> > […]
> > ```
> > 
> > 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

Yes, with this patch applied, I could successfully build GRUB.


Thanks,

PAul

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together`
  2016-12-13 22:45   ` Paul Menzel
@ 2016-12-14 17:48     ` Andrei Borzenkov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrei Borzenkov @ 2016-12-14 17:48 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 3334 bytes --]

14.12.2016 01:45, Paul Menzel пишет:
> 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 пишет:
> 
>>> 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
>>> […]
>>> $ ld --version
>>> GNU ld (GNU Binutils for Debian) 2.27.51.20161124
>>> […]
>>> $ git log --oneline | head -1
>>> 0d23457 efi: Move fdt helper into own file
>>> $ ./autogen.sh
>>> […]
>>> $ mkdir build
>>> $ cd build
>>> $ ../configure --with-platform=coreboot
>>> […]
>>> $ make -j
>>> […]
>>> gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I..  -Wall -W  -DGRUB_MACHINE_COREBOOT=1 -DGRUB_MACHINE=I386_COREBOOT -m32 -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/6/include -I../../include -I../include -DGRUB_FILE=\"bus/usb/serial/common.c\" -I. -I../../grub-core -I.. -I../.. -I../../include -I../include -I../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -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-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -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-common.o -MD -MP -MF bus/usb/serial/.deps-core/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-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ür Ziel „trig.module“ scheiterte
>>> make[3]: *** [trig.module] Fehler 1
>>> make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet...
>>> […]
>>> ```
>>>
>>> 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
> 
> Yes, with this patch applied, I could successfully build GRUB.
> 
> 

OK, committed.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-12-14 17:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-26 16:48 Fails to build with GCC from Debian Sid/unstable: `/usr/bin/ld: -r and -pie may not be used together` Paul Menzel
2016-11-26 17:07 ` Andrei Borzenkov
2016-12-01  4:06   ` Andrei Borzenkov
2016-12-13 22:45   ` Paul Menzel
2016-12-14 17:48     ` Andrei Borzenkov
2016-11-28 16:12 ` Robert LeBlanc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.