Skip to content

Commit 4af2ef0

Browse files
committed
Remove unnecessary "-fsingle-precision-constant" flag for Teensy4 core
Resolves #94, resolves #95, resolves #96
1 parent fe49131 commit 4af2ef0

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

builder/frameworks/_bare_arm.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"-ffunction-sections", # place each function in its own section
3535
"-fdata-sections",
3636
"-mthumb",
37-
"-nostdlib",
38-
"-fsingle-precision-constant"
37+
"-nostdlib"
3938
],
4039

4140
CXXFLAGS=[
@@ -56,8 +55,7 @@
5655
"-Os",
5756
"-Wl,--gc-sections,--relax",
5857
"-mthumb",
59-
"-Wl,--defsym=__rtc_localtime=$UNIX_TIME",
60-
"-fsingle-precision-constant"
58+
"-Wl,--defsym=__rtc_localtime=$UNIX_TIME"
6159
],
6260

6361
LIBS=["m", "stdc++"]
@@ -91,3 +89,17 @@
9189
"-mcpu=%s" % env.BoardConfig().get("build.cpu")
9290
]
9391
)
92+
93+
if env.BoardConfig().get("build.core", "") != "teensy4":
94+
env.Append(
95+
ASFLAGS=[
96+
"-mno-unaligned-access",
97+
],
98+
CCFLAGS=[
99+
"-mno-unaligned-access",
100+
"-fsingle-precision-constant"
101+
],
102+
LINKFLAGS=[
103+
"-fsingle-precision-constant"
104+
]
105+
)

builder/frameworks/arduino.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@
145145
"-fdata-sections",
146146
"-mthumb",
147147
"-mcpu=%s" % env.BoardConfig().get("build.cpu"),
148-
"-nostdlib",
149-
"-fsingle-precision-constant"
148+
"-nostdlib"
150149
],
151150

152151
CXXFLAGS=[

0 commit comments

Comments
 (0)