tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] gnu89-inline and other tests ok - Re: regression tinycc g


From: Michael Ackermann
Subject: [Tinycc-devel] gnu89-inline and other tests ok - Re: regression tinycc gets stuck infinitely while parsing options
Date: Sat, 23 Nov 2024 07:47:39 +0000

Hi Grischka,

thanks for quickly committing the required changes.

Now a few more test cases got covered for -fgnu89-inline option:
1) patched linux-2.4.37.11 replacing extern inline occurences with static inline
   then didn't depend upon gnu89-inline compiler switch with either gcc47 or tcc
   and compiles/links/boots
2) compilation with gcc-47 with and without gnu89-inline after removing the
   kernel-patches failed both with or without -f[no-]gnu89-inline switch
3) compilation with latest tcc
   a) -fgnu89-inline semantics prevent a 'symbol defined twice' error/warning
      (i had patched tcc itself to issue tcc_warning instead of error)
      in any case kernel compiled/linked/booted
   b) -fno-gnu89-inline semantics causes 'symbol defined twice' warning
      without patches (1) applied to kernel, but compiles/boots regardless
The gnu89-inline switch for tcc seems to works as it should, however i will not
keep gcc-4.7 test cases covered, which are not needed anymore anyway since
a known working state with a tcc compiled kernel exists since recently;
(it is explicitely mentioned in kernel README an earlier gcc version would be
needed though; and i'll keep the dirty static/inline kernel patchset
in case anyone would need those to reproduce the seyko2 kbuilds, let me know).

Furthermore with commit dd2e5f8b06bc6ada943291fa4c67c8397038310f linked sections
are in order with the kernel binary image emitted and this latest commit too
fixed the endless-loop condition problem.

Concerning https://github.com/susematz/linux/blob/tcc46/README.tcc
i do not see a realistic chance to support any later than linux-2.4.37.11 with
tcc yet, with the acceptence criteria gcc must not become a mandatory dependency
Currently it still is, for example, since any later KBuild ever since needs some
features which tcc doesn't have (and maybe should not have):
- an equivalent to gcc -S
- support for linker scripts
- and who knows what else ...
Binutils 16bit real-mode assembly support isn't a most urgent concern, and if
all other issues were addressed for some recent kernel version and tcc support i
would instantly re-consider, but to my knowledge tcc/linux support got stalled
for decades already.
Hence i rather continue with some known-working variant of tcc/linux-2.4,
that i even got some configuration variants for, including working
usb/sata/ioapic/highmem support on x86; smp fails still with tcc, gcc47 worked
That's something which can be approached gradually, and i can quickly establish
some test-setup to isolate those issues to be coped with one by one.

Another potential iregularity i had discovered, to mention this one briefly too:
i386-tcc cross-compiler was used on a aarch32 buildhost(as another sanity check)
, which caused various side-effects while compiling/linking tccboot (JiT)
and or linux-2.4 (AoT) for x86 target.
Currently I got no time to re-confirm this, since i moved buildhost to x86.
But i kept this on todo, if there's some potential problem when using tcc
as a cross-compiler accross different architectures.

Meanwhile i've too re-iterated over compiling those ~500 builds against
linux-2.4 kernel API headers, so i may soon see to runtime/abi issues.
I'll have to backport some stuff to linux-2.4 before (squashfs), and a few
other things that i need for this, since 500 builds may not fit into a tiny
initrd to boot a devdrop pre-release.

I am still maintaining tcc support with crossdev/portage, which leaves me with a
blown-up overlay, confusing if/else scripting and hundreds of patches.
That's a decent approach for regression-testing still. But i cannot retain
python support itself with tcc yet, and system-integration itself needs
extensive re-write (bootstrappable.org compatible scripting maybe) and cleanup
to maintain a distribution _without_ depending on python/portage/crossdev.
That's why i hesitate to upload this, because it would cause too much confusion,
at too many frontlines. So far i got the i486-tcc-musl-root.squashfs zipped
(static with debugging symbols) and linux-2.4 kernel binary ready,
which will be re-united in a few days.

aggi

On 2024-11-17 23:14, grischka via Tinycc-devel wrote:
> On 16.11.2024 04:02, Michael Ackermann via Tinycc-devel wrote:
> > Greetings,
> >
> > while regression-testing tcc against a system profile of ~500 ebuilds a
> > potential endless-loop condition was spotted
> > (during one of hundreds of configure checks):
> > - if a library linking option is passed such as -lz
> > - and this library libz.so isn't present in the library search path
> >    (i am supporting static linking against libz.a currently)
> > - then tcc option parser got stuck in an endless loop and tcc binary
> >    didn't terminate then
> >
> > The problem got introduced with the following commit February 2024:
> > 42395a19128b7db756721a55e4630ece82cb315b
> >
> > It may not be trivial to re-produce the error-condition, and it is rarely 
> > hit,
> > but I could reliably confirm reverting the change made to tcc.c resolved the
> > issue under mentioned circuumstances. The required revert/patch is attached.
> 
> hi,  hopefully fixed now.  I also added a -fgnu89-inline option that
> might help to workaround 'extern inline' problems.
> 
> > As a side note, i am not sure if each individual regression that i could 
> > reveal
> > with extensive testing if those should be posted to the mailing list
> > (see https://lists.gnu.org/archive/html/tinycc-devel/2024-11/msg00016.html).
> > Temporarily i joined #tcc channel at OFTC, but it seems completely 
> > abandoned.
> > Please let me know how efforts could best be coordinated to produce the 
> > least
> > amount of noise possible.
> 
> I'd hope the amount of regressions will turn out to be somewhat finite ;)
> 
> Btw there is also an approach to a 4.6 linux kernel (by Michael Matz)
> https://github.com/susematz/linux/blob/tcc46/README.tcc
> 
> As to x86-16bit asm, tcc actually had it, to some extend, once:
> https://repo.or.cz/tinycc.git/commitdiff/55bd08c5
> 
> --gr
> 
> >
> > Regards.
> > aggi
> 
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

-- 

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]