summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2022-12-29 15:18:36 +0800
committerGitHub <[email protected]>2022-12-29 15:18:36 +0800
commit8a71ae75ade43c8d580252469f3635cc1cbc4d21 (patch)
treef47369050243d276a7b200a47caa7abe6c99f50b
parent0d1c709fa502f30ecbd8438fe63233ebcd4283a7 (diff)
[BSP][smart] fix link script for smart in vexpress-a9 (#6764)
-rw-r--r--bsp/qemu-vexpress-a9/SConstruct4
-rw-r--r--bsp/qemu-vexpress-a9/link_smart.lds (renamed from bsp/qemu-vexpress-a9/link-lwp.lds)0
-rw-r--r--bsp/qemu-vexpress-a9/rtconfig.py4
-rw-r--r--components/libc/compilers/common/include/sys/time.h2
4 files changed, 8 insertions, 2 deletions
diff --git a/bsp/qemu-vexpress-a9/SConstruct b/bsp/qemu-vexpress-a9/SConstruct
index 287bb0fa2e..aa95fff7df 100644
--- a/bsp/qemu-vexpress-a9/SConstruct
+++ b/bsp/qemu-vexpress-a9/SConstruct
@@ -28,5 +28,9 @@ Export('rtconfig')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT)
+if GetDepend('RT_USING_SMART'):
+ # use smart link.lds
+ env['LINKFLAGS'] = env['LINKFLAGS'].replace('link.lds', 'link_smart.lds')
+
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/qemu-vexpress-a9/link-lwp.lds b/bsp/qemu-vexpress-a9/link_smart.lds
index 04e3eb3a92..04e3eb3a92 100644
--- a/bsp/qemu-vexpress-a9/link-lwp.lds
+++ b/bsp/qemu-vexpress-a9/link_smart.lds
diff --git a/bsp/qemu-vexpress-a9/rtconfig.py b/bsp/qemu-vexpress-a9/rtconfig.py
index 5aa123823b..9707400629 100644
--- a/bsp/qemu-vexpress-a9/rtconfig.py
+++ b/bsp/qemu-vexpress-a9/rtconfig.py
@@ -37,7 +37,7 @@ BUILD = 'debug'
LINK_SCRIPT = 'link.lds'
if PLATFORM == 'gcc':
- PREFIX = os.getenv('RTT_EXEC_PREFIX') or 'arm-none-eabi-'
+ PREFIX = os.getenv('RTT_CC_PREFIX') or 'arm-none-eabi-'
CC = PREFIX + 'gcc'
CXX = PREFIX + 'g++'
AS = PREFIX + 'gcc'
@@ -66,7 +66,7 @@ if PLATFORM == 'gcc':
else:
CFLAGS += ' -Os'
CXXFLAGS += ' -Os'
- CXXFLAGS += ' -Woverloaded-virtual -fno-exceptions -fno-rtti'
+ CXXFLAGS += ' -Woverloaded-virtual -fno-rtti'
M_CFLAGS = CFLAGS + ' -mlong-calls -fPIC '
M_CXXFLAGS = CXXFLAGS + ' -mlong-calls -fPIC'
diff --git a/components/libc/compilers/common/include/sys/time.h b/components/libc/compilers/common/include/sys/time.h
index 8a1ae60909..87be959715 100644
--- a/components/libc/compilers/common/include/sys/time.h
+++ b/components/libc/compilers/common/include/sys/time.h
@@ -40,6 +40,8 @@ extern "C" {
#define DST_TUR 9 /* Turkey */
#define DST_AUSTALT 10 /* Australian style with shift in 1986 */
+struct itimerspec;
+
struct timezone
{
int tz_minuteswest; /* minutes west of Greenwich */