public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
From: Stuart Longland <stuartl@longlandclan.yi.org>
To: gentoo-embedded@lists.gentoo.org
Subject: Re: [gentoo-embedded] Building a bare-metal ARM hard-float compiler, what ABI?
Date: Sat, 05 Sep 2015 16:43:26 +1000	[thread overview]
Message-ID: <55EA8F0E.4040004@longlandclan.yi.org> (raw)
In-Reply-To: <55EA7699.9070200@longlandclan.yi.org>

On 05/09/15 14:59, Stuart Longland wrote:
>> arm-none-eabi-gcc … -mthumb -mthumb-interwork -nostartfiles -mcpu=cortex-m4 -fsingle-precision-constant -Wdouble-promotion -mfpu=fpv4-sp-d16 -mfloat-abi=hard …
> …
> When I try `crossdev -t arm-hardfloat-eabi` (as clearly "none" gave me a
> softfloat one) I got this building gcc at stage 1.
> 
>> configure:3389: /tmp/portage/cross-arm-hardfloat-eabi/gcc-4.9.3/work/build/./gcc/xgcc -B/tmp/portage/cross-arm-hardfloat-eabi/gcc-4.9.3/work/build/./gcc/
>>  -B/usr/arm-hardfloat-eabi/bin/ -B/usr/arm-hardfloat-eabi/lib/ -isystem /usr/arm-hardfloat-eabi/include -isystem /usr/arm-hardfloat-eabi/sys-include  -mt
>> humb -o conftest -g -O2 -pipe   conftest.c  >&5
>> conftest.c: In function 'main':
>> conftest.c:12:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
> 
> Now, there's an option to pass in ABIs to crossdev, and for the default
> one to be identified.  Question is, where can I find what the ABIs are
> called?

Well, seems I'm possibly onto a different solution.  I noticed in the
toolchain eclass, some FPU options get set based on the target (apart
from using softfloat if "softfloat" is seen there).

>                 # Make default mode thumb for microcontroller classes #418209
>                 [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb )
> 
>                 # Enable hardvfp
>                 if [[ $(tc-is-softfloat) == "no" ]] && \
>                    [[ ${CTARGET} == armv[67]* ]] && \
>                    tc_version_is_at_least 4.5
>                 then
>                         # Follow the new arm hardfp distro standard by default
>                         confgcc+=( --with-float=hard )
>                         case ${CTARGET} in
>                         armv6*) confgcc+=( --with-fpu=vfp ) ;;
>                         armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
>                         esac
>                 fi

That got me thinking, I can pass parameters in using EXTRA_CONFIG and
--genv, maybe I can force things my way?  I figured this would generate
a toolchain that would be less generic, so I've altered my target to
mark it as a "Cortex M4" toolchain:

> crossdev -t arm-cortexm4-eabi -s4 --ex-gcc --genv 'EXTRA_CONF="--with-float=hard --with-fpu=fpv4-sp-d16"'

That got all the way to gcc stage 2, failing with:

> In file included from /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:14:0,
>                  from /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_flags.h:15,
>                  from /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_flags.cc:12:
> /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_platform.h:15:3: error: #error "This operating syst
> em is not supported"
>  # error "This operating system is not supported"
>    ^
> In file included from /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_libignore.cc:8:0:
> /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_platform.h:15:3: error: #error "This operating syst
> em is not supported"
>  # error "This operating system is not supported"
>    ^
> Makefile:416: recipe for target 'sanitizer_common_libcdep.lo' failed
> make[4]: *** [sanitizer_common_libcdep.lo] Error 1
> make[4]: *** Waiting for unfinished jobs....
> Makefile:416: recipe for target 'sanitizer_linux_libcdep.lo' failed
> make[4]: *** [sanitizer_linux_libcdep.lo] Error 1
> In file included from /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_linux.cc:13:0:
> /tmp/portage/cross-arm-cortexm4-eabi/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_platform.h:15:3: error: #error "This operating syst
> em is not supported"
>  # error "This operating system is not supported"
>    ^
> Makefile:416: recipe for target 'sanitizer_linux.lo' failed

I'll keep plugging away at this, I'm close.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.


  reply	other threads:[~2015-09-05  6:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-05  4:59 [gentoo-embedded] Building a bare-metal ARM hard-float compiler, what ABI? Stuart Longland
2015-09-05  6:43 ` Stuart Longland [this message]
2015-09-05  8:34   ` Manuel Lauss
2015-09-05  8:43     ` Stuart Longland
2015-09-05  8:53       ` Manuel Lauss
2015-09-05  9:16         ` Manuel Lauss
2015-09-05 10:11           ` Stuart Longland
2015-09-05 11:51             ` Stuart Longland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55EA8F0E.4040004@longlandclan.yi.org \
    --to=stuartl@longlandclan.yi.org \
    --cc=gentoo-embedded@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox