[ipxe-devel] [PATCH] [build] Use correct PIE disabling argument with gcc

2016-04-29 Thread Steve Beattie
Hardened versions of gcc default to building position-independent
code, which breaks the i386 build. Upstream GCC has standardized on
using -no-pie to turn off PIE:

  
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/doc/invoke.texi;h=515d948ce710a2fba98c586ea2efa05d4cf60979;hb=HEAD#l10620

introduced in commit:

  
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e9abca4f4a48fa8b1fd9778f6a3cd748e099e3bb

However, the test in src/arch/i386/Makefile looks for '-nopie' which
is not a valid upstream GCC argument. This patch converts the test
to look for '-no-pie'.

Signed-off-by: Steve Beattie 

diff --git a/src/arch/i386/Makefile b/src/arch/i386/Makefile
index fe3adc9..59ad25b 100644
--- a/src/arch/i386/Makefile
+++ b/src/arch/i386/Makefile
@@ -75,8 +75,8 @@ CFLAGS+= -Ui386
 # output on stderr instead of checking the exit status.
 #
 ifeq ($(CCTYPE),gcc)
-PIE_TEST = [ -z "`$(CC) -fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1`" ]
-PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -nopie')
+PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" 
]
+PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -no-pie')
 WORKAROUND_CFLAGS += $(PIE_FLAGS)
 endif
 

-- 
Steve Beattie

http://NxNW.org/~steve/


signature.asc
Description: PGP signature
___
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel


Re: [ipxe-devel] [ipxe/ipxe] Fixed bug in intel 10M/100M/1G NIC driver. (#52)

2016-04-29 Thread Oliver Nie
OK. Here are results of [ipxe.org/dev/driver](ipxe.org/dev/driver)
- Link detection--- Pass
- Basic DHCP  --- Pass
- Close and reopen  --- Pass
- Large file transfer correctness   --- Pass
- Large file transfer speed--- 4.6s on 512MB
- Link interruption --- Transfer finished with no error
- Loopback   --- Not Applicable since I have 
only one port on intel 82576
- High-MTU loopback   --- Not Applicable
- VLAN loopback  --- Not Applicable

---
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/52#issuecomment-215895475___
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel