Skip to content

Commit 624e80d

Browse files
committed
waftools: Allow use of newer arm toolchains
Signed-off-by: Joshua Jun <[email protected]>
1 parent db880ae commit 624e80d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

waftools/pebble_sdk_gcc.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def configure(conf):
3131
'-mthumb',
3232
'-ffunction-sections',
3333
'-fdata-sections',
34+
'-fcommon',
3435
'-g',
3536
'-fPIE',
3637
optimize_flag]
@@ -39,10 +40,16 @@ def configure(conf):
3940
'-Werror',
4041
'-Wno-unused-parameter',
4142
'-Wno-error=unused-function',
42-
'-Wno-error=unused-variable']
43+
'-Wno-error=unused-variable',
44+
'-Wno-error=builtin-declaration-mismatch',
45+
'-Wno-error=format-truncation',
46+
'-Wno-error=expansion-to-defined',
47+
'-Wno-error=zero-length-bounds',]
4348

4449
if (conf.env.SDK_VERSION_MAJOR == 5) and (conf.env.SDK_VERSION_MINOR > 19):
4550
pebble_cflags.append('-D_TIME_H_')
51+
# Override time_t to be 32-bit for Pebble compatibility (newer toolchains default to 64-bit)
52+
pebble_cflags.append('-Dtime_t=long')
4653
pebble_cflags.extend(c_warnings)
4754

4855
pebble_linkflags = ['-mcpu=cortex-m3',

0 commit comments

Comments
 (0)