summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2009-03-31 08:01:06 +0200
committerMichael Brown2009-03-31 08:02:17 +0200
commite3b9e3d04b8391ef39df40f190ef8b9d689c9f13 (patch)
tree5aa01e748a80a368813432baa14ae5977f0d582b /src/Makefile.housekeeping
parent[int13] Improve debugging messages (diff)
downloadipxe-e3b9e3d04b8391ef39df40f190ef8b9d689c9f13.tar.gz
ipxe-e3b9e3d04b8391ef39df40f190ef8b9d689c9f13.tar.xz
ipxe-e3b9e3d04b8391ef39df40f190ef8b9d689c9f13.zip
[build] Add --divide to ASFLAGS if supported by the assembler
Some builds of the GNU assembler will treat a '/' character as a comment delimiter. Adding "--divide" will cause it to be treated as a division operator, as we expect. The "--divide" option is not available in all gas versions, so apply it only conditionally. Suggested-by: Joshua Oreman <oremanj@rwcr.net>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 71592db8..be36b36b 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -126,6 +126,14 @@ SP_FLAGS := $(shell $(SP_TEST) && $(ECHO) '-fno-stack-protector')
CFLAGS += $(SP_FLAGS)
endif
+# 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.
+#
+DIVIDE_TEST = $(AS) --divide /dev/null -o /dev/null 2>/dev/null
+DIVIDE_FLAGS := $(shell $(DIVIDE_TEST) && $(ECHO) '--divide')
+ASFLAGS += $(DIVIDE_FLAGS)
+
###############################################################################
#
# Build verbosity