Small cleanup
This commit is contained in:
parent
9cc29cbffc
commit
dcb3fb560f
@ -190,19 +190,31 @@ set( WARN "-Wall -ggdb3" )
|
||||
#| Tuning Options
|
||||
#| -f...: tuning, see GCC manual
|
||||
#| NOTE: -fshort-wchar is specified to allow USB strings be passed conveniently
|
||||
#| Bootloader Compiler Flags
|
||||
if( BOOTLOADER )
|
||||
|
||||
## Clang Compiler
|
||||
if ( "${COMPILER}" MATCHES "clang" )
|
||||
# TODO Not currently working, clang doesn't support all the neccessary extensions
|
||||
message ( AUTHOR_WARNING "clang doesn't support all the needed extensions, code may need rework to use clang" )
|
||||
set ( TUNING "-D_bootloader_ -Wno-main -msoft-float -target arm-none-eabi -mthumb -nostdlib -fdata-sections -ffunction-sections -fshort-wchar -fno-builtin -fplan9-extensions -fstrict-volatile-bitfields -flto -fno-use-linker-plugin" )
|
||||
|
||||
## GCC Compiler
|
||||
else ()
|
||||
set ( TUNING "-D_bootloader_ -Wno-main -msoft-float -mthumb -fplan9-extensions -ffunction-sections -fdata-sections -fno-builtin -fstrict-volatile-bitfields -flto -fno-use-linker-plugin -nostdlib" )
|
||||
#set( TUNING "-mthumb -fdata-sections -ffunction-sections -fno-builtin -msoft-float -fstrict-volatile-bitfields -flto -fno-use-linker-plugin -fwhole-program -Wno-main -nostartfiles -fplan9-extensions -D_bootloader_" )
|
||||
endif ()
|
||||
elseif ( "${COMPILER}" MATCHES "clang" )
|
||||
set ( TUNING "-target arm-none-eabi -mthumb -nostdlib -fdata-sections -ffunction-sections -fshort-wchar -fno-builtin" )
|
||||
else()
|
||||
set( TUNING "-mthumb -nostdlib -fdata-sections -ffunction-sections -fshort-wchar -fno-builtin -nostartfiles" )
|
||||
|
||||
#| Firmware Compiler Flags
|
||||
else ()
|
||||
## Clang Compiler
|
||||
if ( "${COMPILER}" MATCHES "clang" )
|
||||
set ( TUNING "-target arm-none-eabi -mthumb -nostdlib -fdata-sections -ffunction-sections -fshort-wchar -fno-builtin" )
|
||||
|
||||
## GCC Compiler
|
||||
else()
|
||||
set( TUNING "-mthumb -nostdlib -fdata-sections -ffunction-sections -fshort-wchar -fno-builtin -nostartfiles" )
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user