mirror of https://github.com/ARMmbed/mbed-os.git
Compatibilize ArmC6 with ArmC5-built archives
### Description
Arm compiler 5 builds with "short" enums and "short" wchars. This means
that C/C++ enums will be packed into the smallest power of 2 number of
bytes by the compiler and the `wchar_t` is 2 bytes. Arm compiler 6
defaults to packing enums into 4 bytes and `wchar_t` is 4 bytes.
Further, Arm Compiler 5's `-O0` (no optimizations) bulids will actually
do some amount of optimizing, similar to Arm Compiler 6's `-O1`. I have
switched the debug profile to `-O1` for maximum compatibility with our
prior behavior.
NOTE: "Compatibilize" is a word
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
pull/8803/head
parent
9aef9d3661
commit
b1b69d2d60
|
|
@ -16,10 +16,11 @@
|
|||
"-Wl,-n"]
|
||||
},
|
||||
"ARMC6": {
|
||||
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-g", "-O0",
|
||||
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-g", "-O1",
|
||||
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
|
||||
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
|
||||
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)="],
|
||||
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
|
||||
"-fshort-enums", "-fshort-wchar" ],
|
||||
"asm": [],
|
||||
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
|
||||
"cxx": ["-fno-rtti", "-std=gnu++98"],
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Os",
|
||||
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
|
||||
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
|
||||
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)="],
|
||||
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
|
||||
"-fshort-enums", "-fshort-wchar"],
|
||||
"asm": [],
|
||||
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
|
||||
"cxx": ["-fno-rtti", "-std=gnu++98"],
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Oz",
|
||||
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
|
||||
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
|
||||
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)="],
|
||||
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
|
||||
"-fshort-enums", "-fshort-wchar"],
|
||||
"asm": [],
|
||||
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
|
||||
"cxx": ["-fno-rtti", "-std=gnu++98"],
|
||||
|
|
|
|||
Loading…
Reference in New Issue