[Qemu-devel] [PATCH] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default

2016-11-27 Thread Adrian Bunk
-r to the linker when PIE is enabled. Signed-off-by: Adrian Bunk --- rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.mak b/rules.mak index 0333ae3..545ebd9 100644 --- a/rules.mak +++ b/rules.mak @@ -93,7 +93,7 @@ module-common.o: CFLAGS += $(DSO_OBJ_CFLAGS

Re: [Qemu-devel] [PATCH] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default

2016-11-28 Thread Adrian Bunk
On Mon, Nov 28, 2016 at 04:05:33PM +0100, Paolo Bonzini wrote: > > > On 27/11/2016 17:28, Adrian Bunk wrote: > > Building qemu fails in distributions where gcc enables PIE > > by default (e.g. Debian unstable) with: > > /usr/bin/ld: -r and -pie may not be used to

Re: [Qemu-devel] [PATCH] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default

2016-11-28 Thread Adrian Bunk
On Mon, Nov 28, 2016 at 04:42:54PM +0100, Paolo Bonzini wrote: > > Aha, I looked at GCC source code and this is incorrect: "Use -r instead > of -Wl,-r to avoid gcc passing -r to the linker when PIE is enabled". > When GCC sees -r (as opposed to -Wl,-r) it does not pass -pie to the linker. That's