cmake: add --divide to GNU assembler options for x86
GNU Assembler, by default on non-Linux targets, treats slashes as start of comments on i386. (https://sourceware.org/binutils/docs-2.33.1/as/i386_002dChars.html#i386_002dChars) In order to use division, `--divide` needs to be passed to the assembler. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
468a834af0
commit
7308fdc3c7
1 changed files with 7 additions and 0 deletions
|
@ -9,3 +9,10 @@ else()
|
||||||
string(PREPEND CMAKE_C_FLAGS "-m32 ")
|
string(PREPEND CMAKE_C_FLAGS "-m32 ")
|
||||||
string(PREPEND CMAKE_CXX_FLAGS "-m32 ")
|
string(PREPEND CMAKE_CXX_FLAGS "-m32 ")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# GNU Assembler, by default on non-Linux targets, treats slashes as
|
||||||
|
# start of comments on i386.
|
||||||
|
# (https://sourceware.org/binutils/docs-2.33.1/as/i386_002dChars.html#i386_002dChars)
|
||||||
|
# In order to use division, `--divide` needs to be passed to
|
||||||
|
# the assembler.
|
||||||
|
list(APPEND TOOLCHAIN_C_FLAGS -Wa,--divide)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue