[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] change to test_x86_emulator.c break gcc -fPIC flag, compile err



>>> "Dennis Lan (dlan)" <dennis.yxun@xxxxxxxxx> 10/09/14 4:17 AM >>>
>problem here is Gentoo Linux's hardened toolchain turn on -fPIC,
>-fPIE flags by default, and here is a simple patch to fix this by
>enable no-pic explicitly (I'd rather not touch the assemble code
>myself)
>just let me know if you willing to take it(if yes,I could re-send a
>patch with proper commit msg), btw, I'm also CCing the original patch
>author - Claudio Calvelli.
>downstream bug: https://bugs.gentoo.org/show_bug.cgi?id=522642

Might be acceptable provided you verify that the added option works
with all supported compilers and ...

>--- a/tools/tests/x86_emulator/Makefile 2014-09-20 10:13:14.725597054 +0100
>+++ b/tools/tests/x86_emulator/Makefile 2014-09-20 10:13:41.537107466 +0100
>@@ -28,7 +28,7 @@
>endif
>
>$(TARGET): x86_emulate.o test_x86_emulator.o
>- $(HOSTCC) -o $@ $^
>+ $(HOSTCC) -fno-pie -o $@ $^

... you clarify whether this is really needed (since this is a linking step, 
not a
compilation one). In fact I don't even think this one

>@@ -43,7 +43,7 @@
>HOSTCFLAGS += $(CFLAGS_xeninclude)
>
>x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c
>x86_emulate/x86_emulate.h
>- $(HOSTCC) $(HOSTCFLAGS) -c -g -o $@ $<
>+ $(HOSTCC) $(HOSTCFLAGS) -fno-pie -c -g -o $@ $<

is needed either.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.