diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-03-31 07:01:06 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-03-31 07:02:17 +0100 |
commit | e3b9e3d04b8391ef39df40f190ef8b9d689c9f13 (patch) | |
tree | 5aa01e748a80a368813432baa14ae5977f0d582b /src/Makefile.housekeeping | |
parent | b0c818d7b57202ee937e6de2efb8cedcc70b5e96 (diff) | |
download | ipxe-e3b9e3d04b8391ef39df40f190ef8b9d689c9f13.zip ipxe-e3b9e3d04b8391ef39df40f190ef8b9d689c9f13.tar.gz ipxe-e3b9e3d04b8391ef39df40f190ef8b9d689c9f13.tar.bz2 |
[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.housekeeping | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 71592db..be36b36 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 |