Good evenging, the commit which introduced the regression in tinycc preprocessor/assembly parser was identified:
08a4c52de39b202f02d1ec525c64336d11ad9ccf march 2024 I wouldn't know how to best revert/backout this commit; to my understanding the desired parsing semantics introduced should apply to C/macro-definition language context, but the parser picks up tokens inside .S assembly context where '#' denotes a comment instead of pre-processing marcros, and by accident then causes the mentioned parsing error, which probably is incorrect behaviour for a valid comment section inside assembly files. An intermediate easy workaround to compile kernel was replacing the code snippet inside linux-2.4.37.11/arch/i386/boot/setup.S - # 64mb + # _64mb and the tcc pre-processed output is still valid then and can be digested by binutils-as with correct 16bit bootcode emitted. Regards aggi P.S. Maybe this problem is related to the issue... error: invalid macro name '$' https://lists.gnu.org/archive/html/tinycc-devel/2024-11/msg00015.html On 2024-11-16 03:31, Michael Ackermann via Tinycc-devel wrote: > Greetings. > > While regression-testing tcc against linux-2.4.37.11 kernel compilation > another > problem got introduced some time on tcc mob branch: > > $ i386-tcc -E -P -I../linux/include setup.S \ > -D__ASSEMBLY__ -D__KERNEL__ -D__BIG_KERNEL__ -o setup.s > > ### inside a comment section number parsing isn't ignored although it should > be: > # Ye Olde Traditional Methode. Returns the memory size (up to 16mb or > # 64mb, depending on the bios) in ax. ### <- line 391 > mem88: > > ### yields -> setup.S:391: error: invalid number > > Although tcc doesn't support 16bit real-mode assembly, it was possible before > to pre-process the mentioned assembly file with it and then dumping the > pre-processed output into binutils-as. > > The assembly parsing problem got introduced some time in between > commit e7262accb6e6965452e7f82c0ff281ef8412af4d (march 2023,assembly parsing > OK) > ... latest HEAD (2024, problem with assembly/pre-processing parsing FAILURE) > > I could not in detail identify/bisect exactly which commit introduced the > problem, nor haven't i got a patch to offer for it yet. > Let me know if further details are necessary to re-produce the issue. > Currently i'm idling in #tcc channel at OFTC. > > Regards. > aggi > -- --
signature.asc
Description: Digital signature
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel