Commit Graph

784 Commits (b7d89ff8228145fe68e4ba8a4f73faca5f85cac5)
 

Author SHA1 Message Date
Henry Kroll III b7d89ff822 Makefile: fix Linux cross install, cleanup 2010-11-30 15:35:32 -08:00
Henry Kroll III c1a437add7 tccpe.c: Makefile: --enable-cross win64 cross library build 2010-11-30 15:15:55 -08:00
Henry Kroll III 9e406656c7 tcc.c: skip -lpthread when -c option specified 2010-11-30 13:58:18 -08:00
Henry Kroll III 0d38e3b663 make CC=tcc install: fixes strip:tcc: File format not recognized 2010-11-30 13:34:09 -08:00
Henry Kroll III 8185070841 Makefile: Add .PHONY targets 2010-11-30 13:09:16 -08:00
Henry Kroll III 52b75c5fa0 Makefile: Put i386-win32-tcc back into --enable-cross install 2010-11-30 02:42:38 -08:00
Henry Kroll III 7b18df138d Makefile: build --config-cross libtcc1.a directly to win32/lib 2010-11-30 01:49:34 -08:00
Henry Kroll III 48a2a8dabd Remove unnecessary $(PROGS_CROSS) from non-cross builds. 2010-11-29 21:09:20 -08:00
Henry Kroll III ddea94daea Makefile: TCC=tcc 2010-11-28 16:11:40 -08:00
Henry Kroll III 9a986f374e configure: allow changing installation directory 2010-11-28 15:54:27 -08:00
Henry Kroll III 3d35b6b36d Makefile: --enable-cross on x86_64 simplified 2010-11-28 15:51:03 -08:00
grischka f332bb3bca tccpe: typedef unsigned int DWORD for cross compilers.
This fixes the i386-win32-tcc cross-compiler on x86-64 linux
platform.

I verified that it produces identical binaries for 'hello_win.exe'
and 'tcc.exe' (tcc compiled by itself) compared to the output of
the native tcc on windows.
2010-11-27 15:02:57 +01:00
grischka 9bd69bf49f build: remove #include "config.h" from target dependent files
This is to make cross build of libtcc1.a easier.
2010-11-26 20:46:54 +01:00
grischka c4eef48025 libtcc: fix s->include_stack_ptr used uninitialized in tcc_open 2010-11-26 20:46:50 +01:00
Henry Kroll III 77e4679aec x86_64: finish biarch path fixup 2010-11-25 10:08:58 -08:00
grischka 44e84bb22a tccpp: fix token pasting ##
This patch takes advantage of new function tcc_open_bf
from previous commit.
2010-11-25 13:30:31 +01:00
grischka e97bf88bad libtcc: new function tcc_open_bf to create BufferedFile
Use it in:
- tcc_open
- tcc_compile_string
- tcc_define_symbol
- tcc_assemble_inline
2010-11-25 13:29:15 +01:00
Henry Kroll III f1c9f649da x86_64: fix --with-libgcc and simplify biarch paths 2010-11-25 02:57:19 -08:00
Henry Kroll III 9036c18170 tcc: Linux -pthread option sets -D_REENTRANT and -lpthread 2010-11-24 16:42:08 -08:00
Henry Kroll III f0afec709e Makefile: x86_64 win32-cross add clean: target 2010-11-06 02:39:28 -07:00
Henry K e250ffb319 Makefile: edit comments 2010-10-29 00:40:16 -07:00
Henry Kroll III 24d6a93f44 Makefile: cross-copiler tcc1.def is now libtcc1.a, ignore mv errors 2010-10-29 00:40:06 -07:00
Henry Kroll III c635976cd7 Force gcc for x86_64 --enable-cross 2010-10-28 22:08:44 -07:00
Henry Kroll III fb498eb925 selinux: correct ftruncate, fix bus error in tcc -run 2010-10-27 03:54:12 -07:00
Ben Bacarisse 14673d0c49 Fix binding of assignment expressions. 2010-10-25 15:40:30 +01:00
grischka 9228842fa7 win32: register SEH in startup code (i386 only)
Needed to handle signal() etc. with msvcrt
2010-10-19 13:15:06 +02:00
Thomas Preud'homme 036d94112d Remove ifdef STT_GNU_IFUNC test in tccrun.c
STT_GNU_IFUNC is always defined (there is no conditional definition of
it) so the ifdef test for STT_GNU_IFUNC in tccrun.c has no reason to
be.
2010-10-10 16:25:41 +02:00
Thomas Preud'homme c1c4040d75 Explicit license in tiny_libmaker.c
Explicit the license in tiny_libmaker.c to LGPLv2. Confirmation of the
license of this file can be found at
http://lists.nongnu.org/archive/html/tinycc-devel/2010-07/msg00004.html
2010-10-07 10:43:22 +02:00
Sergei Trofimovich 872cc430c0 info doc: fix --infodir to respect DESTDIR for 'make install'
info files are introduced by commit 3f829d11ff

This patch helps packagers to avoid problems when install to $DESTDIR

    >>> Starting src_install
    make -j3 bindir=/tmp/paludis/dev-lang-tcc-9999/image//usr/bin libdir=/tmp/paludis/dev-lang-tcc-9999/image//usr/lib tccdir=/tmp/paludis/dev-lang-tcc-9999/image//usr/lib/tcc includedir=/tmp/paludis/dev-lang-tcc-9999/image//usr/include docdir=/tmp/paludis/dev-lang-tcc-9999/image//usr/share/doc/tcc-9999 mandir=/tmp/paludis/dev-lang-tcc-9999/image//usr/share/man install
    mkdir -p "/tmp/paludis/dev-lang-tcc-9999/image//usr/bin"
    install -m755 tcc "/tmp/paludis/dev-lang-tcc-9999/image//usr/bin"
    mkdir -p "/tmp/paludis/dev-lang-tcc-9999/image//usr/share/man/man1"
    install tcc.1 "/tmp/paludis/dev-lang-tcc-9999/image//usr/share/man/man1"
    mkdir -p /usr/share/info
    install  tcc-doc.info "/usr/share/info"
    ACCESS DENIED  open_wr:      /usr/share/info/tcc-doc.info
    install: cannot create regular file `/usr/share/info/tcc-doc.info': Permission denied
    make: *** [install] Error 1
    /usr/libexec/paludis/utils/emake: emake returned error 2

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2010-09-21 10:04:05 +03:00
Thomas Preud'homme b8adf0090e Move asm label functions from tccasm.c to tccgen.c
* Move functions parse_asm_str and asm_label_instr from tccasm.c to
  tccgen.c
* Remove CONFIG_TCC_ASM_LABEL macro as asm label are available on all
  archs.
See:
http://lists.nongnu.org/archive/html/tinycc-devel/2010-09/msg00026.html
for the rationale.
2010-09-14 23:21:15 +02:00
Thomas Preud'homme 2596273fce Add support for __REDIRECT_NTH needed with eglibc.
Add support for __REDIRECT_NTH as eglibc makes use of this macro to
redirect long double functions to long functions on arch not supporting
long double.
2010-09-12 01:19:19 +02:00
Thomas Preud'homme 3f829d11ff Add info file creation into tcc build process
Add info file creation in tcc Makefile
2010-09-10 21:19:01 +02:00
Thomas Preud'homme 36f74e46b4 Add missing dircategory and direntry to texi file 2010-09-10 21:11:45 +02:00
Thomas Preud'homme 776364f395 Add support for __FreeBSD_kernel__ kernel
Add support for kfreebsd-i386 and kfreebsd-amd64 Debian arch with
thanks to Pierre Chifflier <chifflier@cpe.fr>.
2010-09-10 21:09:07 +02:00
Thomas Preud'homme 2887f40f76 Add support for GNU/Hurd
+ Add i686-AT386 to the list of x86 platform
+ Define SA_SIGINFO is not defined
2010-09-10 20:55:54 +02:00
Thomas Preud'homme 9b09fc376e Add support of asm label for functions.
Add support for asm labels for functions, that is the ability to rename
a function at assembly level with __asm__ ("newname") appended in
function declaration.
2010-09-10 20:15:03 +02:00
grischka a7fb00e887 tccmain: simplify option help 2010-09-08 19:13:36 +02:00
Shinichiro Hamaji c31dc7aa0c Fix casts from 32bit integer types to 64bit integer types.
This bug was reported in
http://lists.gnu.org/archive/html/tinycc-devel/2010-08/msg00050.html

In this case, we should not emit any code when we cast from VT_FUNC to VT_PTR.
2010-08-31 08:35:31 +09:00
Shinichiro Hamaji 9d347f8742 Probably wrong stack alignment for struct on Win64 2010-08-27 02:49:09 +09:00
Shinichiro Hamaji 1f6781f0ee Fix alignment around struct for SSE.
- Fix a wrong calculation for size of struct
- Handle cases where struct size isn't multple of 8
- Recover vstack after memcpy for pushing struct
- Add a float parameter for struct_assign_test1 to check SSE alignment
2010-08-27 02:32:19 +09:00
grischka 4ab4efd3a6 Revert "implemented C99 for loop with variable declaration"
This reverts commit 433ecdfc9d.

The patch breaks e.g. with
    for ((i = 10); --i;);

In particular to check for a type decl. this is not sufficient:
    if (tok < TOK_UIDENT) {

A future approach to c99 loop variables might instead use:
    if (parse_btype(...)) {

plus refactor function decl() accordingly.
2010-08-21 13:39:12 +02:00
Kirill Smelkov 7901d1e3ad tcc_set_linker: mimic all option forms as supported by GNU ld
Namely

 *  `-option' or `--option'  (start with double or single dash)
 *  `-param=val' or `-param,val'

See GNU ld manual (2.1 Command Line Options)
2010-08-12 23:30:21 +04:00
Thomas Preud'homme bcc9137a10 Add support for indirect functions as externals.
Add link support to use indirect functions defined in external modules
2010-08-09 20:20:09 +02:00
grischka 82c5edb31c Avoid crash with "Avoid a crash with weak symbols for "make test""
This fixes commit 197a6acb30
which fixed commit 95b9a477b6

Also remove useless example files
2010-06-30 20:25:04 +02:00
Thomas Preud'homme 5e6fabefd7 Revert "Use mktemp to generate temp files."
Doesn't seem to work on windows
This reverts commit 27988c5e66.
2010-06-23 14:10:22 +02:00
Thomas Preud'homme 27988c5e66 Use mktemp to generate temp files.
Fix the $RANDOM bashism properly by using mktemp.
mktemp is part of MSYS so this should work on UNIXes and Windows
2010-06-22 18:40:35 +02:00
Kirill Smelkov 9775aea1ab Merge branch 'kirr/tcc-MD' into mob
Hello up there.

I'm trying to change gcc to tcc for faster develpment on slow machines,
and the first obstacle that turned out was lack of dependency generation
on tcc side.

Attached patches try to fix that.

Thanks,
Kirill

* tcc-MD:
  .gitignore += tags
  tcc: Explicitly require -l<lib> for libraries
  Document what tcc_fileextension does
  tcc -E: Let output_default be <file>.o instead of a.out
  tcc: Draft suppoprt for -MD/-MF options
  tcc: Refactor "compute default outfile name" into libtcc function
  Add input files/libs and reloc_output switch to TCCState
  tcc: Fix typo in error (it's '%s', not '%s)
  chmod a-x i386-gen.c
  .gitignore += *.o *.a
  .cvsignore -> .gitignore
2010-06-21 20:50:41 +04:00
Kirill Smelkov 2fe5210a33 .gitignore += tags 2010-06-21 20:49:46 +04:00
Kirill Smelkov 93de8d8038 tcc: Explicitly require -l<lib> for libraries
Previously it was possible to specify e.g. -q<lib> and still link with
lib. Avoid such behaviour by checking for '-l' instead of '-l.'
2010-06-21 20:49:46 +04:00
Kirill Smelkov 441a089aa4 Document what tcc_fileextension does
This is evident, but won't hurt
2010-06-21 20:49:46 +04:00