[Top][All Lists]

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

Re: [Tinycc-devel] CI improvements (was: Re: TinyCC failure on i386)

From: Christian Jullien
Subject: Re: [Tinycc-devel] CI improvements (was: Re: TinyCC failure on i386)
Date: Wed, 18 Dec 2019 06:46:17 +0100


To build and test tcc on Windows you can get tcc companion 
https://sourceforge.net/p/wintcc/svn/HEAD/tree/  I've made
See README. I use Cygwin build to test about each commit on Windows.


-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On 
Behalf Of Giovanni Mascellani
Sent: Tuesday, December 17, 2019 19:27
To: address@hidden
Subject: [Tinycc-devel] CI improvements (was: Re: TinyCC failure on i386)


Il 17/12/19 18:11, Michael Matz ha scritto:
> I had now time to look into this.  The immediate cause is that new 
> Debian enables PIC by default also with -m32, which triggers the error 
> message.
> It was always there, i.e. the construct used in the kernel is only 
> usable with either x86-64 or without -fPIC/-fPIE on i386.  There are 
> ways to write this construct without triggering the error message, but 
> I want to test the thing as written in the kernel.  So the only option 
> besides disabling the test is to force non-PIC code for it on i386, 
> which means for the whole file.  I've done that now on mob with a 
> lengthy comment in tcctest.c.

Right, thanks for the explanation. And for the patch.

> Oh, and the testing pipeline is useful, thanks for setting it up :-) 
> (Though it would be nice if at least the native machines, i.e.
> i386 and x86-64, wouldn't use a full system emulation seemingly 
> without paravirt; 8 minutes for a testrun of tcc seems a bit 
> excessive; but as you said, definitely better than nothing :) )

Ok, I enabled a "test_native" job that runs tests without a virtual machine. It 
is only for amd64, for the moment. I will add i386 as soon as I have some time 
to test the right environment and commands.

BTW, I am happy that my experiment was, as it appears, well received. If this 
is ok for you, I might add the CI files (.gitlab-ci.yml and related
scripts) to the main repository, so that everybody can fix them if necessary, 
and so that the commits shown in the Gitlab interface actually match those in 
the main repository. How do you find this?

Also, I have fixed my Debian image generator to use an older kernel for 
riscv64, because the latest one does not boot properly. Hopefully tomorrow (in 
the European sense) I will able to run a CI test also on riscv64.

At last, Windows, which I would like to test as well. For the moment, though, I 
cannot even build tcc with MinGW. I have installed MinGW following instructions 
in [1], installing all the packages that seem to be somehow relevant. However, 
the linker fails. Trying to compile the program "int main(){}" gives the 
following errors (running "gcc test.c"):

> ld.exe: cannot find -lgcc
> ld.exe: cannot find -lgcc_eh
> ld.exe: cannot find -lgcc
> ld.exe: cannot find -lgcc_eh
> collect2.exe: error: ld returned 1 exit status

Tcc linking fails with the same error. Does anybody know what is the problem 
here? It is the first time I use MinGW.

 [1] http://mingw.org/wiki/Getting_Started

I can compile on Windows using the MSVC compiler and the build-tcc.bat script. 
How can I run "make test" on the executable that is produced this way?

Thanks, Giovanni.
Giovanni Mascellani <address@hidden> Postdoc researcher - Université Libre de 

reply via email to

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