ARM gcc5.4.1 (on beta) doesn't define __unix__ or _POSIX_VERSION #210

Open
pcordes opened this Issue Dec 18, 2016 · 5 comments

Projects

None yet

3 participants

@mattgodbolt
Owner

Hi Peter,

Thanks so much for the report: I'm not quite sure what might be going on here; I'll have a dig about!

Thanks for the report (and on a personal note THANK YOU so much for all the Stack Overflow posts you make, answering x86 questions. You, sir, are an absolute star).

@mattgodbolt
Owner

Ok the clue is the none in the gcc-arm-none-eabi-5_4-2016q3 that I download and run as the GCC 5.4.1 on ARM. It's from the "ARM embedded" toolchain, which I get by

# GNU ARM Embedded toolchain
if [[ ! -d gcc-arm-none-eabi-5_4-2016q3 ]]; then
    curl -L https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q3-update/+download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 | tar jxf -
    do_strip gcc-arm-none-eabi-5_4-2016q3 
fi

I guess I should either make it clear this is the embedded ARM compiler? and/or remove from the site and try and find another ARM GCC 5.4.1?

@offa
offa commented Dec 30, 2016

The freestanding ARM GCC is very useful, please keep it.

@offa
offa commented Dec 30, 2016 edited

Usually arm-linux-gnueabi or arm-linux-gnueabihf should define define both macros.

@offa
offa commented Dec 30, 2016

Linaro ships GCC version for bare metal and linux platforms: https://www.linaro.org/downloads/

Even though the arm-none-eabi is a better choice for Cortex-M etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment