mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rob Landley <rob@landley.net>
To: musl@lists.openwall.com
Subject: Re: cortex-m support?
Date: Thu, 8 Dec 2016 16:36:02 -0600	[thread overview]
Message-ID: <1507a1db-9153-f5a6-8af8-a80c77c2ef87@landley.net> (raw)
In-Reply-To: <20161208210114.GN1555@brightrain.aerifal.cx>



On 12/08/2016 03:01 PM, Rich Felker wrote:
> On Thu, Dec 08, 2016 at 01:10:11PM -0600, Rob Landley wrote:
>> On 12/07/2016 07:16 PM, Rich Felker wrote:
>>> On Wed, Dec 07, 2016 at 06:55:56PM -0600, Rob Landley wrote:
>>>> Not sure where you get the relevant gcc patch...
>>>
>>> I have links to the repos somewhere; the problem is that they're
>>> forked from a fairly old gcc version (although not nearly as bad as
>>> sh-fdpic; I think it's 4.8 or so)
>>
>> https://github.com/mickael-guene/gcc has a 5.2 branch and "master"
>> updated 20 hours ago, although I'm not sure how much of master updating
>> is an automatic tracking branch and how much is the account owner
>> updating things.
> 
> Excellent! That's new since I last communicated with him.
> 
>>> and the authors probably don't have
>>> copyright assignments taken care of.
>>
>> Nobody does copyright assignments voluntarily. In the long run those
>> kill projects.
> 
> I don't want to start an unrelated GNU-politics thread, but...
>...
> In my opinion this is 100% the FSF's fault for creating such a broken
> system, but it's the reality.

More or less what I meant, yes.

Keep in mind gcc development -already_ died once (egcs), and the lesson
the llvm guys learned is "don't fork off the old dead base, even if it's
been dead for years it's poison and they'll steal it back if you get it
going again, instead start over from scratch with something they have no
claim to".

> So people who modify GNU stuff and who do want their work
> to live on and be useful in the future

already screwed up before the "and"; everything else is damage control.

> This is really good news -- I think adding the patches should be easy.
> You can probably just diff his tree against stock 5.2.0 and make it
> one big combined patch. This makes getting stuff ready on the musl
> side a lot more attractive to me, so I will try to get back to is
> asap.

FYI, the cortex-m toolchain I've been building (which builds a kernel
and userspace that runs on the board) is just buildroot's cortex-m
toolchain.

Grab current buildroot, "make defconfig" then "make menuconfig" and:

  target options -> target architecture -> arm little endian
  target options -> target architecture variant -> cortex-m3
  build options -> host dir (set to /opt/arm-linux)
  toolchain->enable c++ support

Then "sudo make" (so it can write to /opt/arm-linux).

The version of buildroot I had needed to do "ln -s arm-linux-ld.real
/opt/arm-linux/usr/bin/ld.real" because the binflt wrapper is broken and
evil, but maybe that's fixed upstream since? And the buildroot commit
history disables -Os on cortex-m due to some compiler bug (maybe fixed
now? Haven't hit it myself but I build with -O2 instead for this board
on general principles.)

Oh, and there's a separate "Enable elf2flt support" config thing in the
toolchain menu that you DON'T want to select or it'll wrap the toolchain
_twice_ and break, buildroot does it automatically for cortex-m. I think
it's even a magic wrapper doing the -Wl,-elf2flt stuff automatically. :)

> Rich
> .

Rob


  reply	other threads:[~2016-12-08 22:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07  5:52 Rob Landley
2016-12-07 15:29 ` Szabolcs Nagy
2016-12-07 15:35   ` Szabolcs Nagy
2016-12-08  0:55     ` Rob Landley
2016-12-08  1:16       ` Rich Felker
2016-12-08 19:10         ` Rob Landley
2016-12-08 21:01           ` Rich Felker
2016-12-08 22:36             ` Rob Landley [this message]
2016-12-13  0:29             ` Rob Landley
2016-12-13  1:48               ` Rich Felker
2016-12-20  4:23           ` Rich Felker
2016-12-07 20:19   ` Rob Landley
2016-12-08 21:11 ` Rich Felker
2016-12-09  6:33   ` Rich Felker
     [not found]   ` <20161208211116.GO1555-C3MtFaGISjmo6RMmaWD+6Sb1p8zYI1N1@public.gmane.org>
2016-12-15 18:34     ` [musl] " Rob Landley
     [not found]       ` <7bfe2625-725d-d1bb-7177-f2d31ce09e9c-VoJi6FS/r0vR7s880joybQ@public.gmane.org>
2016-12-15 18:51         ` Waldemar Brodkorb
2016-12-20  7:18           ` [Buildroot] " Rob Landley
     [not found]             ` <48fb6c09-9dcb-e563-dc2d-f30062c5fceb-VoJi6FS/r0vR7s880joybQ@public.gmane.org>
2016-12-20  8:26               ` Thomas Petazzoni
     [not found]                 ` <20161220092600.2ca96088-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-12-20 18:17                   ` Rob Landley
2016-12-21  6:18               ` [musl] " Waldemar Brodkorb
     [not found]                 ` <20161221061853.GB2915-zdp6y753eiWHneL7xjqqhBsWhVFi+jh/@public.gmane.org>
2016-12-27 22:03                   ` Rob Landley
2016-12-18  0:29       ` Rich Felker

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=1507a1db-9153-f5a6-8af8-a80c77c2ef87@landley.net \
    --to=rob@landley.net \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).