-
Notifications
You must be signed in to change notification settings - Fork 2.1k
unittests: tests-core doesn't compile for all platforms #2143
Copy link
Copy link
Closed
Labels
Area: coreArea: RIOT kernel. Handle PRs marked with this with care!Area: RIOT kernel. Handle PRs marked with this with care!Area: testsArea: tests and testing frameworkArea: tests and testing frameworkCommunity: Hack'n'ACK candidateThis PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK partiesThis PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK partiesDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRThe issue/PR is used as a discussion starting point about the item of the issue/PRPlatform: MSPPlatform: This PR/issue effects MSP-based platformsPlatform: This PR/issue effects MSP-based platforms
Description
Currently, the unit test for core doesn't compile for msp430 based platforms.
In my opinion at least the unit test for core must compile for every platform we support.
The primary problem seems to be the use of gcc compiler builtins (__builtin_clz and __builtin_ctz) in the bitarithm test:
$ msp430-gcc --version
msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make tests-core BOARD=telosb
touch /home/philipp/RIOT/tests/unittests/main.c
Building application unittests for telosb w/ MCU msp430f1611.
"make" -C /home/philipp/RIOT/boards/telosb
"make" -C /home/philipp/RIOT/core
"make" -C /home/philipp/RIOT/cpu/msp430x16x
"make" -C /home/philipp/RIOT/cpu/msp430-common
"make" -C /home/philipp/RIOT/drivers
"make" -C /home/philipp/RIOT/sys
"make" -C /home/philipp/RIOT/sys/oneway-malloc
"make" -C /home/philipp/RIOT/tests/unittests/embunit/embUnit
"make" -C /home/philipp/RIOT/tests/unittests/tests-core
/home/philipp/RIOT/tests/unittests/bin/telosb/tests-core.a(tests-core-bitarithm.o): In function `test_bitarithm_lsb_all':
/home/philipp/RIOT/tests/unittests/tests-core/tests-core-bitarithm.c:188: undefined reference to `__ctzhi2'
/home/philipp/RIOT/tests/unittests/bin/telosb/tests-core.a(tests-core-bitarithm.o): In function `test_bitarithm_msb_16bit':
/home/philipp/RIOT/tests/unittests/tests-core/tests-core-bitarithm.c:164: undefined reference to `__clzhi2'
collect2: ld returned 1 exit status
make: *** [all] Error 1
Does anybody have an idea how to fix this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: coreArea: RIOT kernel. Handle PRs marked with this with care!Area: RIOT kernel. Handle PRs marked with this with care!Area: testsArea: tests and testing frameworkArea: tests and testing frameworkCommunity: Hack'n'ACK candidateThis PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK partiesThis PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK partiesDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRThe issue/PR is used as a discussion starting point about the item of the issue/PRPlatform: MSPPlatform: This PR/issue effects MSP-based platformsPlatform: This PR/issue effects MSP-based platforms