[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] .rept .endr for *.S. Any ideas?
From: |
Michael Matz |
Subject: |
Re: [Tinycc-devel] .rept .endr for *.S. Any ideas? |
Date: |
Fri, 15 Apr 2016 18:39:44 +0200 (CEST) |
User-agent: |
Alpine 2.20 (LSU 67 2015-01-07) |
Hi,
On Thu, 14 Apr 2016, Sergey Korshunoff wrote:
> > Simply use GNU as for compiling your .S files from that old kernel.
> It is not so old.
Yes it is. 2.4.26 was released 2004, 12 years ago, which makes it
ancient.
> It boots fine on AMD v140 CPU 2.2Ghz notebook (2011)
Sure, but that doesn't make the kernel non-old. Or make it somehow
sensible to change tcc to be able to compile it (except perhaps as
testcase).
> And this kernel is compiled in one pass, with all source files passed to
> the tcc. There are a few *.S files along *.c
Well, then change the build process to compile the *.S first by gas into
.o files the pass those to tcc.
> > Remember tokes between the directives (instead of parsing them) and repeat
> > the parsing loop N times with that token list at .endr, for instance.
>
> A main problem -- how to pass tokens to the next(). I can't remember how
> to do this :-(
See begin_macro and it's uses. That can store token in a buffer, which
you then have to repeatedly reset macro_ptr from. E.g. the use in
tccgen.c for initializer parsing.
Ciao,
Michael.