aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: edit commentsHenry K2010-10-291-2/+1
|
* Makefile: cross-copiler tcc1.def is now libtcc1.a, ignore mv errorsHenry Kroll III2010-10-291-7/+7
|
* Force gcc for x86_64 --enable-crossHenry Kroll III2010-10-281-1/+1
|
* selinux: correct ftruncate, fix bus error in tcc -runHenry Kroll III2010-10-271-2/+3
|
* Fix binding of assignment expressions.Ben Bacarisse2010-10-251-29/+29
|
* win32: register SEH in startup code (i386 only)grischka2010-10-194-2/+126
| | | | Needed to handle signal() etc. with msvcrt
* Remove ifdef STT_GNU_IFUNC test in tccrun.cThomas Preud'homme2010-10-101-5/+1
| | | | | | 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.
* Explicit license in tiny_libmaker.cThomas Preud'homme2010-10-071-2/+14
| | | | | | 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
* info doc: fix --infodir to respect DESTDIR for 'make install'Sergei Trofimovich2010-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | info files are introduced by commit 3f829d11ff231980383c384df2ae38e369cd8079 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>
* Move asm label functions from tccasm.c to tccgen.cThomas Preud'homme2010-09-144-44/+29
| | | | | | | | | | * 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.
* Add support for __REDIRECT_NTH needed with eglibc.Thomas Preud'homme2010-09-121-0/+3
| | | | | | 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.
* Add info file creation into tcc build processThomas Preud'homme2010-09-102-3/+17
| | | | Add info file creation in tcc Makefile
* Add missing dircategory and direntry to texi fileThomas Preud'homme2010-09-101-0/+4
|
* Add support for __FreeBSD_kernel__ kernelThomas Preud'homme2010-09-105-13/+21
| | | | | Add support for kfreebsd-i386 and kfreebsd-amd64 Debian arch with thanks to Pierre Chifflier <chifflier@cpe.fr>.
* Add support for GNU/HurdThomas Preud'homme2010-09-102-1/+5
| | | | | + Add i686-AT386 to the list of x86 platform + Define SA_SIGINFO is not defined
* Add support of asm label for functions.Thomas Preud'homme2010-09-104-2/+57
| | | | | | 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.
* tccmain: simplify option helpgrischka2010-09-081-4/+4
|
* Fix casts from 32bit integer types to 64bit integer types.Shinichiro Hamaji2010-08-312-5/+15
| | | | | | | 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.
* Probably wrong stack alignment for struct on Win64Shinichiro Hamaji2010-08-271-1/+1
|
* Fix alignment around struct for SSE.Shinichiro Hamaji2010-08-272-9/+21
| | | | | | | - 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
* Revert "implemented C99 for loop with variable declaration"grischka2010-08-211-37/+4
| | | | | | | | | | | | | | | This reverts commit 433ecdfc9d1402ecf03e710de481e2063ad6de90. 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.
* tcc_set_linker: mimic all option forms as supported by GNU ldKirill Smelkov2010-08-121-11/+55
| | | | | | | | | Namely * `-option' or `--option' (start with double or single dash) * `-param=val' or `-param,val' See GNU ld manual (2.1 Command Line Options)
* Add support for indirect functions as externals.Thomas Preud'homme2010-08-093-7/+14
| | | | Add link support to use indirect functions defined in external modules
* Avoid crash with "Avoid a crash with weak symbols for "make test""grischka2010-06-303-18/+1
| | | | | | | This fixes commit 197a6acb30940068d1dc3d0fa53c9f0863309885 which fixed commit 95b9a477b6743004e0e9bf728b25bf63d2908777 Also remove useless example files
* Revert "Use mktemp to generate temp files."Thomas Preud'homme2010-06-231-1/+2
| | | | | Doesn't seem to work on windows This reverts commit 27988c5e6648810db2074a2e80edaf74678e9977.
* Use mktemp to generate temp files.Thomas Preud'homme2010-06-221-2/+1
| | | | | Fix the $RANDOM bashism properly by using mktemp. mktemp is part of MSYS so this should work on UNIXes and Windows
* Merge branch 'kirr/tcc-MD' into mobKirill Smelkov2010-06-219-34/+150
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * .gitignore += tagsKirill Smelkov2010-06-211-1/+2
| |
| * tcc: Explicitly require -l<lib> for librariesKirill Smelkov2010-06-211-1/+1
| | | | | | | | | | 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.'
| * Document what tcc_fileextension doesKirill Smelkov2010-06-211-0/+4
| | | | | | | | This is evident, but won't hurt
| * tcc -E: Let output_default be <file>.o instead of a.outKirill Smelkov2010-06-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affectes where `tcc -E -MD file.c` will place generated dependency information -- previously, for `tcc -E` output_default was a.out, and so deps were put into a.d . Avoid this behaviour, by treating `tcc -E` as `tcc -c` with respect to output_default computation. This will not hurt anything else (preprocessor outputs to either stdout, or to explicitely given (-o <file>) destination, so no default filename is used here), and on the other hand `tcc -E -MD file.c` now puts dependencies into file.d (the same behaviour as for gcc -E). v2: - restructured condition a bit to make it more clear
| * tcc: Draft suppoprt for -MD/-MF optionsKirill Smelkov2010-06-217-7/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In build systems, this is used to automatically collect target dependencies, e.g. ---- 8< (hello.c) ---- #include "hello.h" #include <stdio.h> int main() { printf("Hello World!\n"); return 0; } $ tcc -MD -c hello.c # -> hello.o, hello.d $ cat hello.d hello.o : \ hello.c \ hello.h \ /usr/include/stdio.h \ /usr/include/features.h \ /usr/include/bits/predefs.h \ /usr/include/sys/cdefs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs-32.h \ /home/kirr/local/tcc/lib/tcc/include/stddef.h \ /usr/include/bits/types.h \ /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h \ /usr/include/libio.h \ /usr/include/_G_config.h \ /usr/include/wchar.h \ /home/kirr/local/tcc/lib/tcc/include/stdarg.h \ /usr/include/bits/stdio_lim.h \ /usr/include/bits/sys_errlist.h \ NOTE: gcc supports -MD only for .c -> .o, but in tcc, we generate dependencies for whatever action is being taken. E.g. for .c -> exe, the result will be: $ tcc -MD -o hello hello.c # -> hello, hello.d hello: \ /usr/lib/crt1.o \ /usr/lib/crti.o \ hello.c \ hello.h \ /usr/include/stdio.h \ /usr/include/features.h \ /usr/include/bits/predefs.h \ /usr/include/sys/cdefs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs-32.h \ /home/kirr/local/tcc/lib/tcc/include/stddef.h \ /usr/include/bits/types.h \ /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h \ /usr/include/libio.h \ /usr/include/_G_config.h \ /usr/include/wchar.h \ /home/kirr/local/tcc/lib/tcc/include/stdarg.h \ /usr/include/bits/stdio_lim.h \ /usr/include/bits/sys_errlist.h \ /usr/lib/libc.so \ /lib/libc.so.6 \ /usr/lib/ld-linux.so.2 \ /lib/ld-linux.so.2 \ /usr/lib/libc_nonshared.a \ /lib/libc.so.6 \ /usr/lib/libc_nonshared.a \ /home/kirr/local/tcc/lib/tcc/libtcc1.a \ /usr/lib/crtn.o \ So tcc dependency generator is a bit more clever than one used in gcc :) Also, I've updated TODO and Changelog (in not-yet-released section). v2: (Taking inputs from grischka and me myself) - put code to generate deps file into a function. - used tcc_fileextension() instead of open-coding - generate deps only when compilation/preprocessing was successful v3: - use pstrcpy instead of snprintf(buf, sizeof(buf), "%s", ...)
| * tcc: Refactor "compute default outfile name" into libtcc functionKirill Smelkov2010-06-202-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since for upcoming -MD support default _compile_ output file be needed even when preprocesssing (tcc -E), let's move this code out of one particular condition block into a common function, so that we could use it in deps generation code too. v2: - As suggested by grischka, moved into libtcc function instead of always computing near start of main() - There is a FIXME about how to return result - I don't want to bother callers with allocating temp buffers, not I think it will be a good idea to hook default_target to TCCState. Clearly, I'm to used to things like std::string and python's str...
| * Add input files/libs and reloc_output switch to TCCStateKirill Smelkov2010-06-204-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files[0], and reloc_outpu will be needed for (upcoming in the next patch) "compute default outfile name" refactored into libtcc function. Also, since for symmetry and from libification point of view, it makes some sense to also put all information about what was given as input to compilation into TCCState, let's not only put files[0], but all files and all libraries given explicitely by user. One point: I've used bitfield for reloc_output & trimmed down output_type to 8 bits so that TCCState stays the same in size, and also access to output_type is (hopefully) is not slower. By the way -- as of today, sizeof(TCCState) on i686-pc-linux-gnu is 2884 bytes...
| * tcc: Fix typo in error (it's '%s', not '%s)Kirill Smelkov2010-06-161-1/+1
| |
| * chmod a-x i386-gen.cKirill Smelkov2010-06-161-0/+0
| | | | | | | | No need to keep executable bit on plain C source.
| * .gitignore += *.o *.aKirill Smelkov2010-06-121-0/+2
| | | | | | | | | | Ignores libtcc.o, libtcc.a and a bunch of other files (see previous patch for details)
| * .cvsignore -> .gitignoreKirill Smelkov2010-06-121-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer use CVS, so let's teach Git about what files to ignore... ... though doing `git status` after make + `make test` still gives untracked content: # Untracked files: # (use "git add <file>..." to include in what will be committed) # # alloca86-bt.o # alloca86.o # bcheck.o # libtcc.a # libtcc.o # libtcc1.a # libtcc1.o # tcc.o See next patch about this stuff.
* | tccgen: Revert yuanbin's recent patchesgrischka2010-06-211-19/+17
| | | | | | | | | | This reverts commits 670993..d35138 Maybe these commits fixed something but also seemed to cause problems.
* | implemented C99 for loop with variable declarationClaudio Bley2010-06-211-4/+37
| |
* | Revert "Complain for static fct declared w/o file scope"grischka2010-06-151-3/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit e9406c09a3212ab3f120412a6bbdacb0cdd25deb. We don't want errors for static local function pointers, such as: { static void (*fn)(); ... }
* | Fix "Fix bashims in configure ..." for MSYSgrischka2010-06-151-17/+9
| | | | | | | | Fixes commit dc265feb63c70a1a76fb566a6c05fe62246b65a0
* | Fix last commits: remove CRLF, chmod 644 tccgen.cgrischka2010-06-151-24/+24
| |
* | tccgen: skip ')' in front of ',' for initializeryuanbin2010-06-131-5/+14
| |
* | tccgen: skip fields from same unionyuanbin2010-06-131-2/+8
| |
* | tccgen.c: skip fields from same unionyuanbin2010-06-131-26/+5
| |
* | tccgen: initial the last member of unionyuanbin2010-06-111-1/+1
| |
* | tccgen: initial last member of unionyuanbin2010-06-111-20/+28
|/
* Fix bashims in configure and gcctestsuite.sh.Thomas Preud'homme2010-05-262-9/+19
| | | | | | | | configure and gcctestsuite.sh shell scripts contains bashisms although being bourne shell script. This patch fixes the following bashisms: * Use of $RANDOM variable (replaced by reading in /dev/urandom) * Use == in tests instead of just = * Use $[] for arithmetic computation istead of $(())
* don't discard SHT_((PRE)INIT|FINI)_ARRAY sectionsDaniel Glöckner2010-05-152-1/+9
|