tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] win64 cross now sort of works


From: grischka
Subject: Re: [Tinycc-devel] win64 cross now sort of works
Date: Sat, 04 Dec 2010 20:13:18 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Okay, after something like over 40 commits trying to make this
feature work "sort of" I felt it might need some cleanup:

http://repo.or.cz/w/tinycc.git/commitdiff/86ffc4812952f11a35afa19b24a3e6d1a12f4490

1) New lib/Makefile to compile libtcc1.a for platforms easily.

This uses gcc for compilation on native linux, otherwise the
suitable just-built tcc compiler.

Also it uses cross-versions of tiny_libmaker to replace AR in
cases because an AR with missing support for the target platform
will happily make an invalid library which tcc will load but can't
find any symbols in it.

2) The install location for cross-compilers is passed on command-line:
    $(WIN32_CROSS): DEFINES = ...
      -DCONFIG_TCCDIR="\"$(tccdir)/win32\""
      -DCONFIG_TCC_CROSSLIB="\"lib/32\""

./configure was changed to allow this:
+   echo "#ifndef CONFIG_TCCDIR" >> $TMPH
    echo "#define CONFIG_TCCDIR \"$tccdir\"" >> $TMPH
+   echo "#endif" >> $TMPH

This installs all of the windows cross-compiler support under
$(tccdir)/win32.

3) Tested on Ubuntu 8.10:
  $ ./configure --enable-cross
  $ sudo make install
  $ cd win32/examples
  $ i386-win32-tcc hello_win.c -v
    <- hello_win.exe (3584 bytes)
  $ x86_64-win32-tcc hello_win.c -v
    <- hello_win.exe (4608 bytes)

Thanks,

--- grischka





reply via email to

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