linking arm libc instead of thumb for Cortex-M3

Bug #1830431 reported by Jérôme Hamm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-arm-none-eabi (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,

I am using Ubuntu 18.04 arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620 and it looks like the selected libc is the ARM one, not the THUMB one. I first detected this through a BUS FAULT which upon investigation and disassembly (the .lss file) looks like arm code. Moreover I tried the following commands:

> arm-none-eabi-gcc -mthumb -mcpu=cortex-m3 --print-file-name=libc.a
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a
^^^ I have seen in another post that when some guy types the same command line (although for a Cortex-M4), he gets 'thumb' somewhere in the returned path.

> arm-none-eabi-gcc -mthumb -mcpu=cortex-m3 --print-multi-directory
thumb/v7-m

Other libs (for example function __eabi__uidiv) look like thumb code.

I have used
> sudo apt install gcc-arm-none-eabi

More information:
> sudo dpkg -l | grep gcc-arm-none-eabi
ii gcc-arm-none-eabi 15:6.3.1+svn253039-1build1 amd64 GCC cross compiler for ARM Cortex-A/R/M processors

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

Thank you for your time,
Best regards,
Jérôme.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.