tinycc-devel
[Top][All Lists]
Advanced

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

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


From: Michael Matz
Subject: Re: [Tinycc-devel] CI improvements (was: Re: TinyCC failure on i386)
Date: Tue, 17 Dec 2019 23:57:05 +0100 (CET)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hi,

On Tue, 17 Dec 2019, Giovanni Mascellani wrote:

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.

Super, thanks.

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?

Is it possible to put them in some subdir (ci/ or somesuch)? I certainly wouldn't mind to have them in the repo.

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.

Btw, for my local development I'm using user-space emulation of qemu, not full system emulation. (And the userspace is simply an unpacked minimal distro of the right type, either debian or suse, in some subdir). Makes development a bit faster and less cumbersome as well (e.g. I don't need an editor in that chroot, but can simply edit from the outside). But I don't know if that's easily/usefully possible with the CI infrastructure. Anyway, just FYI, the CI as is is useful enough.

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"):

I can't say, looks like some incomplete installation of either the compiler or some environment variables missing. At another place I was using msys2 (http://www.msys2.org/) and pristine cygwin successfully, I don't remember if I ever used mingw as is.

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?

I think you'd at least need a make that is sufficiently GNU make compatible for this; mingw, cygwin and friends come with it, the MSVC toolchain also has a native make system but it's not fully compatible, and I don't think it'd be usable. You could of course always write another batch file that compiles and executes the tests manually, or at least a subset. (E.g. tcctest.c and those in tests2/*.c).

Or just get one of the mingw derivates working ;-)

For simple checking of PE code generation I'm actually using linux and wine:

% make cross-x86_64-win32
% ./x86_64-win32-tcc -B. -Iwin32/include/ -Iwin32/include/sys ~/hello.c \
  -Lwin32/lib/ -L.
% wine ./hello.exe
Hello World!

(This is using the uninstalled compiler) That can probably be extended somewhat to also compile and run the testsuite via a wine wrapper.


Ciao,
Michael.



reply via email to

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