Skip to content

Commit 77f239a

Browse files
mbrossardmathias-arm
authored andcommitted
gcc: Support for Arm GNU Toolchain version 11.3 and later
1 parent d0a6d59 commit 77f239a

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

records/tools/gcc_arm.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ tool_specific:
3030
- -Wl,-fatal-warnings
3131
- -Wl,--gc-sections
3232
- -Wl,--no-wchar-size-warning
33+
- -Wl,--no-warn-rwx-segment
3334
- -Wl,--print-memory-usage
3435
pre_build_script:
3536
- tools/pre_build_script.py

source/daplink/sdk_stub.c renamed to source/daplink/stubs.c

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
* @file sdk_stub.c
2+
* @file stubs.c
33
* @brief
44
*
55
* DAPLink Interface Firmware
6-
* Copyright (c) 2017-2017, ARM Limited, All Rights Reserved
6+
* Copyright (c) 2017, 2023, ARM Limited, All Rights Reserved
77
* SPDX-License-Identifier: Apache-2.0
88
*
99
* Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -25,3 +25,21 @@ __WEAK void sdk_init()
2525
{
2626
// Do nothing
2727
}
28+
29+
/*
30+
* Work-around for a link-time issue with Arm GNU Toolchain
31+
* in version 11.3 and later.
32+
*/
33+
#ifdef __GNUC__
34+
#if ((__GNUC__ > 11) || \
35+
((__GNUC__ == 11) && (__GNUC_MINOR__ >= 3)))
36+
__WEAK void _close() {}
37+
__WEAK void _fstat() {}
38+
__WEAK void _getpid() {}
39+
__WEAK void _isatty() {}
40+
__WEAK void _kill() {}
41+
__WEAK void _lseek() {}
42+
__WEAK void _read() {}
43+
__WEAK void _write() {}
44+
#endif
45+
#endif

0 commit comments

Comments
 (0)