[Top][All Lists]

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

Re: [Tinycc-devel] plans to 0.9.27

From: Christian Jullien
Subject: Re: [Tinycc-devel] plans to 0.9.27
Date: Fri, 13 Oct 2017 06:42:24 +0200

Hi Grischka,

Here are some news from OLD Christian :o)

First of all, with your explanations on how to build a native tcc, I'm very
close to be totally happy.

I'm building tcc using Cygwin64 with native gcc Cygwin x64:

/cygdrive/f/tinycc$ uname -a
CYGWIN_NT-10.0 coltrane 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
/cygdrive/f/tinycc$ gcc -v
Using built-in specs.
Target: x86_64-pc-cygwin
Configured with:
--prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
--build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
--enable-shared --enable-shared-libgcc --enable-static
--enable-version-specific-runtime-libs --enable-bootstrap
--enable-__cxa_atexit --with-dwarf2 --with-tune=generic
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libcilkrts
--enable-libgomp --enable-libitm --enable-libquadmath
--enable-libquadmath-support --enable-libssp --enable-libada
--disable-symvers --with-gnu-ld --with-gnu-as
--with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix
--without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 6.4.0 (GCC)

At the end, I get:
F:> dir *.exe
2017-10-13  06:16           294,400 i386-win32-tcc.exe
2017-10-13  06:16            19,456 tcc.exe

F:>file *.exe
i386-win32-tcc.exe: PE32+ executable (console) x86-64 (stripped to external
PDB), for MS Windows
tcc.exe:            PE32+ executable (console) x86-64 (stripped to external
PDB), for MS Windows

I wonder why i386-win32-tcc.exe is named like that while it's a native x64
bit executable?

The only real difference with my OLD Makefile is that "make test" only tests
default mode while mine was also testing -m32

Is there a way to detect that and run test two times, once with -m32, once
with -m64?

But worse, I've also the impression that, after building W/tcc, make test
still uses Cygwin version.  Can you please check and tell me if I'm wrong or
the way I can run "make test" using W/tcc?


-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of grischka
Sent: jeudi 12 octobre 2017 09:32
To: address@hidden
Subject: Re: [Tinycc-devel] plans to 0.9.27

Christian Jullien wrote:
> Chris,
> This is precisely why I wrote win32/Makefile which, with only
Cygwin+native Cygwin gcc, was able to bootstrap a native Windows tcc for x86
and x86_64 and check that all tests work.
> Grischka disliked to have this Makefile and insisted to remove it. HIMO,
we now lose the ability to very easily build native Windows tcc and test it
as there is no replacement atm.
> I dislike the idea to install mingw on top of Cygwin just to produce 
> native build while standard gcc is able to do that and works like a 
> charm

ONLY for people who not are already TOO OLD to type some configure options
or TO TRY something NEW or DIFFERENT, eventually:

# build a cross-tcc using standard cygwin gcc and install in X:

     ./configure --prefix=$PWD/X
     make install
     make distclean

# configure once for using that, anytime in future:

     ./configure --cc=$PWD/X/tcc --prefix=$PWD/W

# build a native windows tcc, optionally with -m32/64, run full tests,
   and install as ready-to-use relocatable tree in W:

     make cross-i386-win32  (cross-x86_64-win32 if on 32bits)
     make test
     make install

-- gr

> Until we have a way to do  that, I'll continue to use my own
win32/Makefile (now private) copy.
> Now, you can try to convince Grischka to restore it or ask him to add the
logic in main Makefile to produce Windows native tcc for x86/x86_64 with
just Cygwin+standard Cygwin gcc.
> If we dream, we should have Canadian-cross compiler with just configure
--triplet; make. Where triplet is:
> System types:
>   --build=BUILD     configure for building on BUILD [guessed]
>   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
>   --target=TARGET   configure for building compilers for TARGET [HOST]
> But this is a very huge task to make it work. Until then, I'll continue to
use my Makefile on Cygwin which is close to my ideal.
> Christian
> -----Original Message-----
> From: Tinycc-devel 
> [mailto:address@hidden On Behalf Of 
> Chris Marshall
> Sent: jeudi 12 octobre 2017 02:54
> To: address@hidden
> Subject: Re: [Tinycc-devel] plans to 0.9.27
> I just confirmed that restoring the "build windows tcc with cygwin"
win32/Makefile still works.
> Since there is no posix cygwin build of tcc available, I suggest not
breaking the cygwin build until there is an actual posix/cygwin tcc build
> After the 0.9.27 official release, I look forward to contributing
development of a native posix cygwin tcc.
> --Chris
> On 10/11/2017 19:14, Chris Marshall wrote:
>> I was able to 'make' and 'make test' with the original win32/Makefile.  
>> I got home and tried the "new" version building with cygwin and now 
>> it doesn't pass tests because it says -run is not valid for a cross 
>> compiler.
>> I think this is a bug since tcc does not have a posix version for 
>> cygwin so while tcc is built with a cross compiler, if you are 
>> running tcc on windows (built with cygwin or otherwise) then you have 
>> a
>> *windows* tcc not a "cross-compiler".
>> But,.... the win32/Makefile worked like a charm and all tests pass 
>> with a simple build.
>> Cheers,
>> Chris
>> On 10/11/2017 12:20, grischka wrote:
>>> grischka wrote:
>>>> avih wrote:
>>>>> Two things:
>>>>> 1. Will the version be 0.9.27 or 0.9.28? 
>>>> 0.9.27.
>>>>> 2. On windows in msys2 mingw 64 environment with gcc 7.2.0, 
>>>>> (building tcc 64 for windows with mingw gcc 64) the build 
>>>>> completes but some tests fail (see below).
>>> Now, I fixed that, plus the ARM signed char test, plus some other 
>>> stuff.
>>> Also, I removed the win32/Makefile (thanks to Christian's OK), and 
>>> the VIP patch (it is just not how it should work), and the 
>>> -iwithprefix option (what was the point without -iprefix).
>>> Moreover, there is
>>> * a patch to tccelf.c to avoid DT_TEXTREL unless really required
>>> * a nifty one in tccasm.c to avoid the 'p3' forward label from
>>>   alloca86_64.S being put into dynsym with a relocation (huh?)
>>> * and the (sig)set variable in tcctest.c was made static to
>>>   avoid some issue with inline asm that I didn't try to fix
>>> * no diff -I option anymore to make tests work with busybox
>>> * a patch to tccrun.c for better selinux support.
>>> With these changes, tcc now seems to build and pass all tests 
>>> cleanly on Alpine musl x86_64 standard-grsec and vanilla too, configured
>>>    ./configure --config-musl --with-selinux optionally also with
>>>    --disable-static and/or --cc=tcc (once it was installed)
>>> Patch is here:
>>> http://repo.or.cz/tinycc.git/commitdiff/da8c62f75d893449e232944fc625
>>> 6
>>> 6c020b4d010
>>> You might realize that I bumped the 'master' branch too, which is 
>>> meant to mean:
>>>     "This could be what we could release as 0,9,27, soon"
>>> Say next week or so, last-minute-fixes/features notwithstanding.
>>> Thanks,
>>> -- gr
>>> _______________________________________________
>>> Tinycc-devel mailing list
>>> address@hidden
>>> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Tinycc-devel mailing list

reply via email to

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