Le samedi 11 avril 2015, 15:54:45 Sergey Korshunoff a écrit : > Hi! > > > I don't mind people reverting my patch but this seems > > like the wrong solution here > > Sorry :-) I think I can introduce an option like -flinux-kernel-2426 > and then use this option to exclude/change code which breaks > compilation of this code w/o affecting other usage cases.
It's not what I meant. I'm happy to see a fix to compile an old linux kernel. It's just that I think this is not the right place for a fix. nocode_wanted is there to indicate that we are out of a function and so generating code doesn't have any meaning. This suggest that nocode_wanted was set when it shouldn't have. > > It is possible to reduce a test like a linux 2.4.26 kernel? I can > replace -c by -E and then compile a big preprocessed source. But I > don't know how to use creduce with this file. The size of the file doesn't matter. creduce works by iteratively trying some valid transformation on the source and then running the script you specified it and see if it fails or not. Here the script would just look at the warning generated by tcc and return an exit code accordingly. If the file after reduction is still too big, try a few transformation yourself and try to reduce the result again. I've used it a few times and it works quite well. > > PS: this version of the kernel is not a good one. 2.4.37 is better. > But currently 2.4.26 is the only one which can be compiled by tcc. What do you mean by "is not a good one"? Is the code totally invalid C? It all boils down to whether we want tcc to be able to compile such code. If yes, then it doesn't matter if the code is ugly or what. Best regards, Thomas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel