[ipxe-devel] [PATCH 1/1] make sure not to generate position independent code
Christian Hesse
list at eworm.de
Thu Apr 2 11:15:25 UTC 2015
From: Christian Hesse <mail at eworm.de>
We have assembler code that breaks when generating position independent
code. So make sure we do not.
Signed-off-by: Christian Hesse <mail at eworm.de>
---
src/Makefile.housekeeping | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index f54008c..5687c66 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -179,6 +179,11 @@ WNA_FLAGS := $(shell $(WNA_TEST) && $(ECHO) '-Wno-address')
WORKAROUND_CFLAGS += $(WNA_FLAGS)
endif
+# we have assembler code, that does not work with position independent code
+PIC_TEST = $(CC) -dM -E - < /dev/null | grep -q '__PIC__'
+PIC_FLAGS := $(shell $(PIC_TEST) && $(ECHO) '-fno-pic')
+WORKAROUND_CFLAGS += $(PIC_FLAGS)
+
# Some versions of gas choke on division operators, treating them as
# comment markers. Specifying --divide will work around this problem,
# but isn't available on older gas versions.
--
2.3.5
More information about the ipxe-devel
mailing list