Commit Graph

849 Commits

Author SHA1 Message Date
07eb850608 make --enable-cross work properly on x86_64
merge more changes from Fedora spec file into Makefile
I did a lot of reading on Makefiles. It should be a lot less hacked now that I got rid of my temporary cross-build script. I had to build i386-win32-tcc as 32 bit in order to use it to build the windows version of libtcc1.a and move that into lib directory. Still testing, but it does build windows fib.exe smoothly now and generates shard lib, libtcc.so.1.0 and test links against it.
2010-04-25 00:35:25 -07:00
1a8e7d9fbb Merge branch 'mob' of ssh://repo.or.cz/srv/git/tinycc into makefile 2010-04-25 00:32:10 -07:00
239fdf0b87 remove make_libtcc1_win32.sh shell script
and merge commands into Makefile
2010-04-24 22:16:39 -07:00
eb78e94300 reverse make win32 version of libtcc1.a patch 2010-04-24 21:58:12 -07:00
80b4c698c2 make win32 version of libtcc1.a for cross-compiler on x86 / x86_64 2010-04-24 13:27:56 -07:00
b0b29d8013 put tcc in /usr/lib64/tcc on distros that have it 2010-04-24 03:30:46 -07:00
2ab42855cb make --with-selinux work with libtcc, too 2010-04-24 03:28:54 -07:00
a4ed587f61 add --disable-static option to build libtcc.so instead of libtcc.a
for distros that want static libs
2010-04-24 02:35:43 -07:00
1578322b06 fix typo in configure 2010-04-24 02:32:41 -07:00
4686236091 i386-win32-tcc fails to build a valid win32 executable if built
on x86_64 using --enable-cross. The easiest way to fix this is
to put -m32 in the Makefile.

Committer: Henry Kroll <henry@comptune.com>

Committer: Henry Kroll <henry@comptune.com>
2010-04-23 18:36:12 -07:00
be7e339d8a Use mmap instead of exec mem for Selinux machines. Fixes crash on Fedora. 2010-04-20 23:43:02 -07:00
a64a6f36a0 Replace malloc+strcpy by tcc_strdup in ld_load_file_list 2010-04-20 22:25:16 +02:00
6525a15919 Fix "already done" test in libname_to_filename()
if "(libname == '\0')" should be instead "if (libname != '\0')"
2010-04-20 16:21:13 +02:00
4d5fcfb971 Delete unused vtop_saved variable in unary_type 2010-04-20 16:12:41 +02:00
3ad3168125 Clean changes introduced by 47abdbd
* Replace the save/load_buffer_state by a dynarray approach:
  - Filename and libname are added to a dynarray when first encountered
  - Load repeatedly the files in the dynarray until no new undefined
    symbol are encountered
* Replace snprintf by sprintf in libname_to_filename
* Use tcc_fileextension in filename_to_libname
* Introduce a tcc_strcpy_part fonction to copy only a subset of a
  string
* Move new_undef_syms declaration from tcc.h to tccelf.c
2010-04-20 16:02:42 +02:00
809f489662 WinCE PE subsystem 2010-04-19 16:34:59 +03:00
2cb1fd6a10 PE ARM: jump IAT arm code 2010-04-19 15:50:22 +03:00
83b0bd3095 libtcc.c: fix compilation failure (inconsistent tcc_add_file_internal)
gcc -o libtcc1.o -c lib/libtcc1.c -O2 -Wall
libtcc.c: At top level:
libtcc.c:1063: error: static declaration of 'tcc_add_file_internal' follows non-static declaration
tccelf.c:2915: note: previous implicit declaration of 'tcc_add_file_internal' was here

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2010-04-19 11:46:36 +03:00
e4ed4e7f4f Support more arm EABI compatible architectures
Add support for:
  - armv5tel
  - armv6j
  - armv7a
2010-04-18 19:29:11 +02:00
e9406c09a3 Complain for static fct declared w/o file scope
Error out on static function without file scope and give an explaination
to the user
2010-04-15 19:33:47 +02:00
47abdbd3d5 Better handle ld scripts
* search file from INPUT and GROUP commands in the library path in
  addition to the current directory
* handle libraries specified by -lfoo options
* Search lib in GROUP command repeatedly
2010-04-15 19:30:00 +02:00
6d4166df61 Don't prefix $prefix with $(DESTDIR) in configure
Prefixing $prefix with $(DESTDIR) is an error as it could lead for
example to mandir being equal to $(DESTDIR)$prefix/man where
$prefix itself is equal to $(DESTDIR)/usr/local which make man be equal
to $(DESTDIR)$(DESTDIR)/usr/local/man
2010-04-15 19:10:59 +02:00
8de9b7a631 Correctly support all unary expression with sizeof
Unary expression can start with a parenthesis. Thus, the current test
to detect which sizeof form is being parsed is inaccurate. This patch
makes tcc able to handle things like sizeof (x)[1] where x is declared
as char x[5]; wich is a valid unary expression
2010-04-15 19:05:53 +02:00
6655e06ec8 Error out on bad char array initialization
Error out with an explicit message when trying to initialize a
character array with something that's not a literal (optionally
enclosed in braces) as per C99 6.7.8:14; thanks to Antti-Juhani
Kaijanaho <ajk@debian.org> who did all the work.
2010-04-15 19:04:25 +02:00
d2cf970a41 tccelf: fix warning 2010-04-13 18:30:01 +02:00
e6f43dd0c6 win32: sys/timeb.h use _ftime instead of _ftime32 2010-04-12 20:56:13 +02:00
a3b932b3f9 tccgen: Fix broken use of ATTR_MODE
Sorry for that.

--
By by ... Detlef
2010-04-06 22:53:16 +02:00
264a103610 tccgen: Detect (but ignore) function redirection
tcc is now able to parse <stdio.h> from gcc, when
__GNUC__ is also defined

--
By by ... Detlef
2010-04-06 00:33:15 +02:00
34dabe496f libtcc: Detect (but ignore) -init and -fini for -Wl
--
By by ... Detlef
2010-04-05 22:56:33 +02:00
87574de8ed libtcc: Support -soname for the linker
--
By  by ... Detlef
2010-04-05 21:37:54 +02:00
78e83d8761 libtcc: Allow multiple options for -Wl separated with ','
I moved the code to libtcc to prepare for a later tiny_ld

--
By by ... Detlef
2010-04-05 21:21:58 +02:00
a135dd50c6 tccasm: Detect (but ignore) .ident directive
tcc is now able to compile many asm files generated by gcc

--
By by ... Detlef
2010-04-05 12:45:52 +02:00
558258a301 tccasm: Detect (but ignore) .size directive
--
By by ... Detlef
2010-04-05 12:43:51 +02:00
6825c5db72 tccasm: Support .type directive (only name,@function)
--
By by ... Detlef
2010-04-05 12:31:45 +02:00
f740485a5a tccpp: Allow local labels to start with a dot
--
By by ... Detlef
2010-04-05 12:28:27 +02:00
9ff7a0bc98 tccasm: Detect (but ignore) the .file directive
Some patches, to allow tcc to compile asm sources generated by gcc
and help tcc with the autoconf stuff used in Wine
( http://source.winehq.org/git/wine.git/ )

--
By by ... Detlef
2010-04-05 12:19:49 +02:00
197a6acb30 Avoid a crash with weak symbols for "make test"
Patch from the mailing list by Timo VJ Lähde

--
By by ... Detlef
2010-04-05 01:08:49 +02:00
d3c432244c generate inc and dec for smaller code 2010-04-03 21:20:34 +03:00
27bcc8f583 tinylibmaker: On error situation tempfile was not removed 2010-04-03 11:31:38 +03:00
95bc36a149 tccpp: Add missing bracket in an error message 2010-03-31 00:42:39 +02:00
4d05a6319d Catch array[index] with unknown sizeof(*array)
We could support this for index == 0, but GCC doesn't bother, so why should we?
2010-03-15 22:51:19 +01:00
95b9a477b6 weak function symbols 2010-02-27 17:37:59 +01:00
d63ec6f20d fill got table for static linking 2010-02-05 08:25:48 +03:30
b9aeac0a64 Fixed bug which prevent tcc preprocessor to ignore line number directives 2010-02-01 18:08:51 +01:00
253bad7993 Added patch to detect and use the paths for 64bit libraries as
used by CentOS (affects X86_64 only).
2010-01-28 08:27:38 +01:00
900871ca8d Dump the current token in skip(), when it's not the expected token 2010-01-27 00:02:33 +01:00
62ba135228 Add support for --help 2010-01-26 22:58:48 +01:00
a975008ae7 Add support for the __mode__ attribute
--
By by ... Detlef
2010-01-26 22:56:22 +01:00
2650584ac4 Recognize -Wl,-Bsymbolic
Without -Bsymbolic, a symbol/function in a *.so can be overridden
by a symbol/function in the main module.
That is the default search order, but not supported by tcc.

With -Bsymbolic, the linker tries to resolve a symbol/function in
the current module first.
The loader in tcc implements this search order.

We do not distinguish -Bsymbolic and -Bsymbolic-function

--
By by ... Detlef
2010-01-26 22:55:14 +01:00
5caf6235cf Makefile: Delete tcc-doc.html during 'make distclean' 2010-01-26 22:53:52 +01:00