[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mes wip-arm state
From: |
Jan Nieuwenhuizen |
Subject: |
Re: mes wip-arm state |
Date: |
Mon, 01 Jun 2020 16:46:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Danny Milosavljevic writes:
Hello Danny,
> On Mon, 01 Jun 2020 08:33:30 +0200
> Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>
>> I checked and I don't believe they do [force usage of signed char].
>
> That's too bad because mescc ARM uses signed char (I haven't changed
> it, so it should interpret "char" as signed char like it always did).
Oops...does that mean we (probably) have to implement -funsigned-char
(and make that the default for ARM?). Of course, we can see how far
we get with tcc first.
>> We can also make tcc work before merging, but we could also start a new
>> wip-tcc / wip-arm-tcc later if the need arises. Whatever works for you!
>
> I'd definitely have the current state marked and stored somewhere--at least
> tagged or something.
>
> If it's not too much work, let's merge it into master. I think I haven't
> changed the compiler frontend much (or at all), so the risk of affecting x86
> should be minimal.
>
> If the changeset would touch something it shouldn't, let's stop merging then.
Sure, that makes sense.
> (The syscall stuff was technically changed--but only minimally by splitting
> it into two source files so I don't have to carry errno everywhere. Effect
> for callers of _syscall* should be unchanged)
>
> Let's definitely test it on x86, though :)
Yeah ;)
>> As you propbably have seen, in the bootstrap we use a forked tcc:
>> somewhat older (0.9.27), patched.
>>
>> https://gitlab.com/janneke/tinycc/-/tree/mes-0.21
>
> I've checked it out now.
>
>> ba1c47d * lotsa debug printing.
>
> ... and readded that for me.
>
> Thanks!
>
> How do I build tcc using mescc?
I created some scripts to do that, it's less than great. My excuse is
that mescc only recently grew a POSIX command line, and we don't have
"make" during the guix bootstrap anyway. Then, I also keep changing
the mes directory layout and build system...Maybe we can give this
a facelift.
Anyway...I went to gnu/packages/commencement.scm to check...I saw
build.sh and cc.sh but those are not used atm.
Also, "bootstrap.sh" has some commented code
cp -f $MES_PREFIX/lib/crt$i.c .
##cp -f $MES_PREFIX/gcc-lib/x86-mes/crt$i.c .
that you may want to flip to
##cp -f $MES_PREFIX/lib/crt$i.c .
cp -f $MES_PREFIX/gcc-lib/x86-mes/crt$i.c .
and you'll have look into setting environment variables (MES_PREFIX,
GUILE_LOAD_PATH for Nyacc).
As a summary: we build "mes-tcc" first, then using the "boot.sh" script,
we build several new iterations (bootX-tcc) until fixpoint.
You'll probably want to first just build mes-tcc and do some tests with
that. I suspect you'll hit some hurdles (undefined symbols, or even
unsupported C constructs...Good luck! :-)
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com