arm-none-eabi-gcc misses cstdint

Asked by Hermann Kleier

Ugrading to trusty thar supplied gcc-arm-none-eabi. This is a great
step for ...!!!

gcc-arm-none-eabi contained /usr/bin/arm-none-eabi-g++ but including
<cstdint> failed. Fortunately the package contains
/usr/lib/gcc/arm-none-eabi/4.8.2/include/stdint.h which eventually
points to <stdint.h>.

Simply linking <cstdint> to <stdint.h>

  pushd /usr/lib/gcc/arm-none-eabi/4.8.2/include
  ln -s stdint.h cstdint
  popd

fails because this does not define the types in the std-namespace
(e.g. std::uint8_t).

Is there anything to be said against including a file of similar type
as /usr/include/c++/4.8/cstdint in
/usr/lib/gcc/arm-none-eabi/4.8.2/include?

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Hermann Kleier
Solved:
Last query:
Last reply:

This question was originally filed as bug #1300643.

Revision history for this message
Nicholas Skaggs (nskaggs) said :
#1

Attempting to divert this to the right place. That said, this is really a question, so I'll convert it.

Revision history for this message
Terry Guo (terry.guo) said :
#2

Please be noted that there are two gcc-arm-none-eabi toolchains in Trusty, one is shipped with Trusty and provided by Ubuntu, another is provided by us. After add our ppa repo, simply running "sudo apt-get install gcc-arm-none-eabi" will install the one provide by Ubuntu. You might run into some issues in this case.

To install tool chain provided by us, you need command "sudo apt-get install gcc-arm-none-eabi=4-8-2014q2-0trusty10". I am not understanding your question very well, but below case:

terguo01@terry-pc01:tmp$ cat x.cc
#include<cstdint>

volatile std::uint8_t x;

void
foo ()
{
x = 1;
}

can be successfully built with command "arm-none-eabi-g++ -S x.cc -std=c++11". I guess this can prove that we do have cstdint. Please confirm.

Revision history for this message
Hermann Kleier (hermann-kleier) said :
#3

As already stated I had installed gcc-arm-none-eabin not gcc-arm-none-eabi=4-8-2014q2-0trusty10. Commonly I try to avoid to install PPAs and stick to the mainstream.

Today I added ppa:terry.guo/gcc-arm-embedded and installed gcc-arm-none-eabi=4-8-2014q2-0trusty10. First, upgrading failed because of conflicts with the standard trusty gcc-arm-none-eabi. After de-installing all "arm-none-eabi"-packages manually I could install the 4-8-2014q2-0trusty10 version.

I confirm that the new revision (and only the new revision) comes with cstdint (@ /usr/arm-none-eabi/include/c++/4.8.4/cstdint).

Another system (w/o ppa:terry.guo/gcc-arm-embedded) has no cstdint.

Revision history for this message
Hermann Kleier (hermann-kleier) said :
#4

Thank you for pointing to the ppa.

On Tue, 8 Jul 2014, Terry Guo wrote:

> Your question #251325 on GCC ARM Embedded changed:
> https://answers.launchpad.net/gcc-arm-embedded/+question/251325
>
> Status: Open => Needs information
>
> Terry Guo requested more information:
> Please be noted that there are two gcc-arm-none-eabi toolchains in
> Trusty, one is shipped with Trusty and provided by Ubuntu, another is
> provided by us. After add our ppa repo, simply running "sudo apt-get
> install gcc-arm-none-eabi" will install the one provide by Ubuntu. You
> might run into some issues in this case.
>
> To install tool chain provided by us, you need command "sudo apt-get
> install gcc-arm-none-eabi=4-8-2014q2-0trusty10". I am not understanding
> your question very well, but below case:
>
> terguo01@terry-pc01:tmp$ cat x.cc
> #include<cstdint>
>
> volatile std::uint8_t x;
>
> void
> foo ()
> {
> x = 1;
> }
>
> can be successfully built with command "arm-none-eabi-g++ -S x.cc
> -std=c++11". I guess this can prove that we do have cstdint. Please
> confirm.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/gcc-arm-embedded/+question/251325
>
> You received this question notification because you asked the question.
>

Revision history for this message
Terry Guo (terry.guo) said :
#5

Currently the standard gcc-arm-none-eabi from Ubuntu isn't supported by us. Instead the one from "ppa:terry.guo/gcc-arm-embedded" is supported by us. If you can confirm there is problem related to cstdint in gcc-arm-none-eabi from "ppa:terry.guo/gcc-arm-embedded", we definitely need to fix it as soon as possible. But if the problem is from standard gcc-arm-none-eabi, we will wait. This is because we are working with people from Debian/Ubuntu to try to consolidate those two gcc-arm-none-eabi tool chains. By the time they got consolidated, the problem should be gone.

Revision history for this message
Hermann Kleier (hermann-kleier) said :
#6

I do confirm that the problem is only in the "standard gcc-arm-none-eabi from Ubuntu". There is no problem with "ppa:terry.guo/gcc-arm-embedded". Thanks a lot!