Skip to content

linking error of gettimeofday with zephyr-sdk-0.10.0-rc2 #13384

@kelvincheung

Description

@kelvincheung

Hello,
I am poring dhrystone to zephyr(#13383 ),
and come across an linking error below with zephyr-sdk-0.10.0-rc2.
[ 95%] Linking C executable zephyr_prebuilt.elf
Memory region Used Size Region Size %age Used
FLASH: 34176 B 1 MB 3.26%
SRAM: 15640 B 192 KB 7.95%
IDT_LIST: 120 B 2 KB 5.86%
/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.2.0/../../../../arm-zephyr-eabi/bin/ld: /opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/lib/thumb/v7e-m/nofp/libc.a(lib_a-gettimeofdayr.o): in function _gettimeofday_r': /home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/newlib/newlib/libc/reent/gettimeofdayr.c:63: undefined reference to _gettimeofday'
collect2: error: ld returned 1 exit status
make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1
make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2
make: *** [all] Error 2

BTW, the same code could be built successfully with zephyr-sdk-0.9.5.

Steps to reproduce the behavior:

  1. apply tests: benchmarks: add Dhrystone benchmark #13383
  2. mkdir build; cd build
  3. cmake -DBOARD=stm32f4_disco ../tests/benchmarks/dhrystone/
  4. make

Environment (please complete the following information):

  • OS: Ubuntu 14.04.5 LTS
  • Toolchain: zephyr-sdk-0.10.0-rc2
  • Commit SHA: 7077602

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

Labels

area: ToolchainsToolchainsbugThe issue is a bug, or the PR is fixing a bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions