Commit Graph

392 Commits (2d3b9559bf569f137cefb7f8386a0dc58e33c81f)

Author SHA1 Message Date
seyko 859ce5e47f Report a mingw as a execution environment instead of the
Win32, Win64, WinCE when executing "tcc -v". Example
	$ ./i386-win-tcc -v
	tcc version 0.9.26 (i386, mingw)
instead of the
	tcc version 0.9.26 (i386, Win32)

There is a cpu info already about bits of the excution environment
And display C67 for the TCC_TARGET_C67
2015-03-03 22:30:24 +03:00
seyko 2e6626a4b3 Don't add a slash to the install path of the tcc in display_info() 2015-03-03 21:41:22 +03:00
seyko 20074d8862 Use a display_info() to output a header of the tcc help listing
tcc version 0.9.26 (i386 Linux)
    Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard
    Usage: tcc [options...] [-o outfile] [-c] infile(s)...
	   tcc [options...] -run infile [arguments...]
    ...

instead of the

    tcc version 0.9.26 - Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard
    Usage: tcc [options...] [-o outfile] [-c] infile(s)...
	   tcc [options...] -run infile [arguments...]
    ...

Displaing a "Hard Float" info for the ARM arch is restored. It was broken by the AArm64 patch.
2015-03-03 16:08:33 +03:00
seyko b7b9f9f511 A gcc preprocessor option -dD added
With this option on a defines are included into the output
(inside comments). This will allow to debug a problems like:

    In file included from math.c:8:
    In file included from /usr/include/math.h:43:
    /usr/include/bits/nan.h:52: warning: NAN redefined
2015-03-03 14:25:57 +03:00
seyko 50cdccf3ef Added a gcc preprocessor options -P, -P1
tcc -E -P
  do not output a #line directive, a gcc compatible option

tcc -E -P1
  don't follow a gcc preprocessor style and do output a standard
  #line directive. In such case we don't lose a location info when
  we going to compile a resulting file wtith a compiler not
  understanding a gnu style line info.
2015-03-03 14:19:14 +03:00
Edmund Grimley Evans b14ef0e24b Add arm64 (AArch64) as a target architecture. 2015-02-23 22:51:03 +00:00
seyko c334b59142 Warn about a conflicting compile options spectified on the command line.
Try "tcc -E -c tccasm.c -o tccasm.o"
2015-01-06 22:19:45 +03:00
minux df0267b287 tcc, libtcc: fix build on windows with latest mingw. 2014-04-11 23:49:53 -04:00
grischka f90bad0925 tests2: cleanup
- remove -norunsrc switch
  Meaning and usage (-run -norun...???) look sort of screwed.  Also
  general usefulness is unclear, so it was actually to support exactly
  one (not even very interesting) test

This partially reverts e31579b076
2014-04-07 11:20:45 +02:00
Thomas Preud'homme b6247d1f3c Add support for runtime selection of float ABI 2014-01-08 15:00:52 +08:00
YX Hao 642b6d0f50 Add the possibility to use noname functions by ordinal
tcc.c:
process.h:177:20: note: expected 'char * const*' but argument is of type 'char const*const*'

tccpe.c:
Add the possibility to use noname functions by ordinal.
use def file: "AliasName @n"

build-tcc.bat:
1. Enable 32 bits mode on 64 bits OS.
2. build doc.

_parseLibs.bat:
Convenient to use "*.def + *.c" instead of *.a, just use -l*

_tcc.bat:
a practice of _parseLibs.bat

Signed-off-by: YX Hao <lifenjoiner@163.com>
2013-09-19 21:50:38 +08:00
James Lyon 55ea6d3fc1 x86-64 ABI fixes.
abitest now passes; however test1-3 fail in init_test. All other tests
pass. I need to re-test Win32 and Linux-x86.

I've added a dummy implementation of gfunc_sret to c67-gen.c so it
should now compile, and I think it should behave as before I created
gfunc_sret.
2013-04-19 00:46:49 +01:00
James Lyon e31579b076 Fixed tests on Windows (including out-of-tree problems)
Modified tcctest.c so that it uses 'double' in place of 'long double'
with MinGW since this is what TCC does, and what Visual C++ does. Added
an option -norunsrc to tcc to allow argv[0] to be set independently of
the compiled source when using tcc -run, which allows tests that rely on
the value of argv[0] to work in out-of-tree builds.

Also added Makefile rules to automatically update out-of-tree build
Makefiles when in-tree Makefiles have changed.
2013-04-17 20:32:07 +01:00
Andrew Aladjev 0ad857c80e added CPATH, C_INCLUDE_PATH and LD_LIBRARY_PATH 2013-02-19 14:47:36 +03:00
grischka 762a43877b configure: pass CONFIG_xxxDIR/PATH options via commandline
- except for CONFIG_SYSROOT and CONFIG_TCCDIR

Strictly neccessary it is only for CONFIG_MULTIARCHDIR
because otherwise if it's in config.h it is impossible to
leave it undefined.

But it is also nicer not to use these definitions for
cross-compilers.

- Also:
lib/Makefile : include ../Makefile for CFLAGS
lib/libtcc1.c : fix an issue compiling tcc with tcc on x64
2013-02-14 17:43:24 +01:00
Urs Janssen 062efe6ab8 - make clang accept unportable code in libtcc1.c
- add -dumpversion cmd.line opt
2013-02-14 08:24:51 +01:00
grischka 05108a3b0a libtcc: new LIBTCCAPI tcc_set_options(TCCState*, const char*str)
This replaces       -> use instead:
-----------------------------------
- tcc_set_linker    -> tcc_set_options(s, "-Wl,...");
- tcc_set_warning   -> tcc_set_options(s, "-W...");
- tcc_enable_debug  -> tcc_set_options(s, "-g");

parse_args is moved to libtcc.c (now tcc_parse_args).

Also some cleanups:
- reorder TCCState members
- add some comments here and there
- do not use argv's directly, make string copies
- use const char* in tcc_set_linker
- tccpe: use fd instead of fp

tested with -D MEM_DEBUG: 0 bytes left
2013-02-12 19:13:28 +01:00
grischka 829655949b tcc --help: update option summary
tcc-doc.texi: also
2013-02-10 20:39:05 +01:00
grischka 8042121d74 tcc -vv/--print-search-dirs: print more info
tests/Makefile:
- print-search-dirs when 'hello' fails
- split off hello-run

win32/include/_mingw.h:
- fix for compatibility with mingw headers
  (While our headers in win32 are from mingw-64 and don't have
  the problem)

tiny_libmaker:
- don't use "dangerous" mktemp
2013-02-10 00:38:40 +01:00
grischka 263dc93cfa c67: remove global #define's for TRUE/FALSE/BOOL
Also use uppercase TRUE/FALSE instead of true/false
2013-02-04 16:24:56 +01:00
Thomas Preud'homme 8c56b0cf90 Revert "Added what I call virtual io to tinycc this way we can make a monolitic executable or library that contains all needed to compile programs, truly tinycc portable."
This reverts commit 59e18aee0e.
tcc is being stabilized now in order to do a new release soon.
Therefore, such a change is not appropriate now.
2013-01-14 17:34:07 +01:00
mingodad 59e18aee0e Added what I call virtual io to tinycc this way we can make a monolitic executable or library that contains all needed to compile programs, truly tinycc portable.
Tested under linux exec the "mk-it" shell script and you'll end up with a portable tinycc executable that doesn't depend on anything else.
2013-01-11 00:04:38 +00:00
grischka 27d38bf23f tcc.c: fix argv index for parse_args
I probably broke that myself earlier.  In any case parse_args
needs to start with index 0 because it is is used also recursively
to expand the shebang command from scripts such as
    #!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11
which arrives at tcc as only two argv's
    "tcc" "-run -L/usr/X11R6/lib -lX11"
2012-06-12 15:32:44 +02:00
grischka 4274c44de7 tcc.c: fix previous commit "Use CString to concat linker options"
- remove redunant else branch
- zero-terminate linker_arg
- declare cstr_xxx as PUB_FUNC
  (which are functions used in tcc.c but not in the libtcc API.
   Useful for a tcc(.exe) that uses the libtcc.(so/dll))
- while at it, export PUB_FUNCs from dll
2012-04-18 18:32:37 +02:00
Gabriel Corneanu 214564b1dc Re-enable "Use CString to concat linker options"
This reverts commit 16202e054f.

Changed win32 build to use ONE_SOURCE just like libtcc.dll
Therefore CString can be used again...
2012-04-18 10:01:45 +02:00
Thomas Preud'homme 16202e054f Revert "Use CString to concat linker options"
This reverts commit 1c11b857fe.

On windows, libtcc.c is compiled with ONE_SOURCE and then tcc.c is
linked to it. Thus tcc.c can only use public functions which cstr_* are
not.
2012-04-10 16:33:39 +02:00
Thomas Preud'homme 1c11b857fe Use CString to concat linker options
As suggested, change type of linker_arg variable to the more appropriate CString
type, since linker_arg is about dynamically grown string.
2012-03-20 16:01:12 +01:00
Thomas Preud'homme 2eee100c37 Fix use after free for linker_arg
elements in linker_arg are used in TCCState structure and must thus not
be freed when option parsing is finished. Declare linker_arg as a global
static variable and free it after tcc_delete has been called on TCCState
structure.

This fix commit 7fb0482a46
2012-03-16 19:23:54 +01:00
Thomas Preud'homme 7fb0482a46 Support linker options passed in several -Wl param
ld support arguments to multiple-letter options being passed in two
ways:
* -opt=arg
* -opt arg

libtool generate command line of the second form. This commit add
support for the second form so that libtool works with tcc. The way it
is done is to concatenate all -Wl options into one and then pass it to
set_linker.
2012-03-15 00:25:40 +01:00
grischka a35b3059bb tcc.h: define TCC_IS_NATIVE
- disable tccrun feature for non-native (cross-) compilers
- define uplong for target adress size
- fix using -Wl,-Ttext=... for Win64 (tccpe: ADDR3264 imagebase)
2012-03-05 20:15:56 +01:00
grischka bf374a5f23 rename error/warning -> tcc_(error/warning) 2011-08-11 17:07:56 +02:00
grischka 74a24d77fd libtcc: minor adjustments
- use {B} to substitute tcc_lih_path (instead of \b)

- expand CONFIG_TCC_CRTPREFIX in CONFIG_TCC_LIBPATHS
  which fixes duplicate CONFIG_SYSROOT.

- put default CONFIG_SYSROOT ("") into tcc.h

- remove hack from commit db6fcce78f
  because $(tccdir)/include is already in sysincludes

- configure: error out for unrecognized options.

- win32/build-tcc.bat: put libtcc into base dir where it will
  find lib/include automatically, and build libtcc_test example.
2011-08-11 16:55:30 +02:00
grischka e6f3bf7f08 libtcc: cleanup the 'gen_makedeps' stuff 2011-08-06 16:11:58 +02:00
grischka 39a07cca58 tcc: fix -m32/64 & simplify
This cleans up the mess from commit
   8f98573658
and preceeding.

- make tcc -m64 work on windows
- execvp on windows returns 0 always, replace by spawnvp
- remove bizarre support for i386-win32-tcc -m64
2011-08-06 16:11:58 +02:00
grischka 5280293d6b make: create native tcc from separate objects
This was already possible using
    make NOTALLINONE=1
and is now the default.

To build as previously from one big source, use
    make ONE_SOURCE=1

Cross compilers are still build from one source because using
separate objects requires separate build directories one per
platform which currently is not (yet) supported by the makefile.

We could probably use gnu-makeish target variables like
    $(I386_CROSS): OUTDIR=build/i386
    $(X64_CROSS): OUTDIR=build/x86-64
and so on ...

Also NEED_FLOAT_TYPES for arm-gen is removed.  It was about
variables that are referenced from outside (libtcc, tccgen).
We could declare them in tcc.h (as with reg_classes) or have
them twice in arm-gen.c.  I chose option 2.
2011-07-14 18:45:37 +02:00
Joe Soroka db6fcce78f tcc: add sysinclude path with -B, like gcc does 2011-02-02 00:00:12 -08:00
Joe Soroka e939c4072c add -isystem cmdline option 2011-02-01 23:32:53 -08:00
Sergei Trofimovich 0a50e6c933 tcc.c: fix an error when you build an object file with '-pthread' key set
The problem was partially fixed by Henry in the following patch:

    tcc.c: skip -lpthread when -c option specified

But that patch had one brawback: it is sensitive to argument order,
as decision is taken during commandline parsing:

    $ tcc -c a.c -o a.o -pthread # 1. works fine
    tcc: error: file 'a.c' not found

    $ tcc -pthread -c a.c -o a.o # 2. blows
    tcc: error: cannot specify libraries with -c

This patch fixes case 2.

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2011-01-04 11:17:52 +02:00
Henry Kroll III d16722481f tcc: add unsupported option -pedantic 2010-12-20 04:23:30 -08:00
Henry Kroll III 8f98573658 tcc: -m32 prefix "win32-" when file extension is present 2010-12-13 00:00:18 -08:00
Henry Kroll III c6f5d819af tcc: fix format string in error handler 2010-12-08 01:05:50 -08:00
Henry Kroll III ffb9fcc5a2 tcc: oops, error handler does not accept format strings 2010-12-08 00:52:33 -08:00
Henry Kroll III b3be007afa tcc: fix -m32 and add -m64 option 2010-12-08 00:27:06 -08:00
Henry Kroll III f3d3ab5a69 tcc: move undef out of if block 2010-12-06 16:36:00 -08:00
Henry Kroll III bb7bb37fe2 tcc: add -m32 option to x86_64 cross compilers 2010-12-06 16:17:20 -08:00
Henry Kroll III 33f86ada92 trim unnecessary bits from my previous 3 commits 2010-12-05 12:47:50 -08:00
Henry Kroll III eb550ed23b tcc: add option -s for gcc compatibility (ignored) 2010-12-04 16:04:33 -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 9036c18170 tcc: Linux -pthread option sets -D_REENTRANT and -lpthread 2010-11-24 16:42:08 -08:00
grischka a7fb00e887 tccmain: simplify option help 2010-09-08 19:13:36 +02: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 0c928da96d tcc: Draft suppoprt for -MD/-MF options
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", ...)
2010-06-21 20:49:02 +04:00
Kirill Smelkov bdae4a59c3 tcc: Refactor "compute default outfile name" into libtcc function
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...
2010-06-20 21:36:47 +04:00
Kirill Smelkov a919a373da Add input files/libs and reloc_output switch to TCCState
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...
2010-06-20 20:30:01 +04:00
Kirill Smelkov 66b54af8ea tcc: Fix typo in error (it's '%s', not '%s) 2010-06-16 16:51:55 +04:00
Detlef Riekenberg 34dabe496f libtcc: Detect (but ignore) -init and -fini for -Wl
--
By by ... Detlef
2010-04-05 22:56:33 +02:00
Detlef Riekenberg 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
Detlef Riekenberg 62ba135228 Add support for --help 2010-01-26 22:58:48 +01:00
Detlef Riekenberg 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
grischka 88a3ccab9f allow tcc be build from separate objects
If you want that, run: make NOTALLINONE=1
2009-12-20 01:53:49 +01:00
grischka e81569bc70 tcc: add "-Wl,-rpath=path" option (library search path) 2009-12-19 22:16:20 +01:00
Frederic Feret b7d7af4fa2 ARM: first support for arm-pe target 2009-11-13 18:09:00 +01:00
Frederic Feret 2f73e42d87 various fixes and new options for PE format 2009-11-13 18:09:00 +01:00
grischka b08dfb8273 tcc: optionally build using libtcc 2009-07-18 22:08:01 +02:00
grischka 94ae3984b0 tccpe: set tcc_lib_path from DLL 2009-07-18 22:07:33 +02:00
grischka 0085c648f6 bcheck: restore malloc hooks when done 2009-07-18 21:54:47 +02:00
grischka c4b7e77bbe accept option -x <lang> 2009-06-17 02:11:27 +02:00
grischka 67aebdd5b7 enable making tcc using libtcc 2009-05-11 18:46:02 +02:00
grischka 0a35f9d66e move static prototypes to libtcc.c 2009-05-11 18:45:56 +02:00
grischka f9181416f6 move some global variables into TCCState 2009-05-11 18:45:44 +02:00
grischka 5c6509578e make tcc from tcc.c and libtcc from libtcc.c 2009-05-05 20:41:17 +02:00
grischka b8f6e1ae30 move minor things from libtcc.c to other files 2009-05-05 20:30:39 +02:00
grischka 9dc9cbf319 move libtcc interface and helper functions to libtcc.c 2009-05-05 20:18:53 +02:00
grischka 0d1ed74102 move parser/generator to tccgen.c 2009-05-05 20:18:10 +02:00
grischka 805990b94e move preprocessor to tccpp.c 2009-05-05 20:17:49 +02:00
grischka ae37bd5abc move declarations to tcc.h 2009-05-05 20:17:26 +02:00
grischka e9e89ad699 enable backtrace only when it's supported 2009-04-18 18:39:27 +02:00
grischka d165e87340 libtcc: new api tcc_set_lib_path 2009-04-18 15:08:03 +02:00
grischka 73ba078d2f tcc_relocate: return error and remove unused code 2009-04-18 15:08:03 +02:00
Shinichiro Hamaji d36fea34e3 Call relocate_sym() before we return the offset, so user doesn't need to check the return value twice. 2009-04-18 15:08:03 +02:00
grischka dd5630ff95 tcc -E: fix pasting empty tokens
/* test case */
#define t(x,y,z) x ## y ## z
int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
        t(10,,), t(,11,), t(,,12), t(,,) };

tcc -E: xpected result:
int j[] = { 123, 45, 67, 89,
 10, 11, 12, };
2009-04-18 15:08:02 +02:00
grischka 0f0ed4a8bf tcc -E: preserve spaces, alternative solution
/* test case */
#define STR(x) #x
#define MKSTR(x) STR(x)
MKSTR(-A-)
MKSTR(+ B +)

tcc -E: expected result:
"-A-"
"+ B +"
2009-04-18 15:08:02 +02:00
grischka 90697c4c56 CONFIG_TCC_STATIC: add dummy for dlclose 2009-04-18 15:08:02 +02:00
grischka d62301b050 avoid warning uninitialized 2009-04-18 15:08:02 +02:00
Shinichiro Hamaji 9a7173bf69 x86-64: Fix tcc -run. We need extra memory for PLT and GOT.
Size of the extra buffer is too large for now.
2009-04-18 15:08:02 +02:00
grischka e6ba81b012 get rid of 8 bytes memory leak 2009-04-18 15:08:02 +02:00
grischka b1697be691 change tcc_add/get_symbol to use void* 2009-04-18 15:08:02 +02:00
grischka 795f67428e alternative int tcc_relocate(TCCState *s1, void *ptr); 2009-04-18 15:08:02 +02:00
grischka 9a8b2912ed TOK_builtin_malloc: alternative solution 2009-04-18 15:08:02 +02:00
Shinichiro Hamaji 39a4b859d4 x86-64: Fix cast from integers to pointers.
Now,

./tcc -run -DTCC_TARGET_X86_64 tcc.c -run tcctest.c

works!
2009-04-18 15:08:02 +02:00
Shinichiro Hamaji 83fd36333a Fixes for issues I've just found/introduced to x86 TCC.
- Cast from pointer to long long makes TCC output an error. Use cast to int before we apply shift operation for a pointer value.
- Removed test cases for casts from pointer to char/short because they produce warning.
2009-04-18 15:08:01 +02:00
Shinichiro Hamaji be43c8e0ed x86-64: Cast from 64bit pointer to long long must not generate movslq. 2009-04-18 15:08:01 +02:00
grischka a9c78d04f2 win32: accept uppercase filename suffixes 2009-04-18 15:08:01 +02:00
Shinichiro Hamaji b879ffa193 x86-64: There can be valid addresses which is greater than 0xc0000000. 2009-04-18 15:08:01 +02:00
Shinichiro Hamaji de3f0a46fe Fix for x86-64: The first and second arguments of memcpy must be pointers. 2009-04-18 15:08:01 +02:00
Shinichiro Hamaji 2e9b57b6d0 Fix silly typos in the previous change. 2009-04-18 15:08:01 +02:00
Shinichiro Hamaji 9fe28b610e x86-64: Make ABI for long double compatible with GCC.
- Now we use x87's stack top the long double return values.
- Add rc_fret and reg_fret, wrapper functions for RC_FRET and REG_FRET.
- Add a test case to check if strto* works OK.
2009-04-18 15:08:01 +02:00
Shinichiro Hamaji fcf2e5981f x86-64: Combine buffers of sections before we call tcc_run().
- Now we can run tcc -run tcc.c successfully, though there are some bugs.
- Remove jmp_table and got_table and use text_section for got and plt entries.
- Combine buffers in tcc_relocate().
- Use R_X86_64_64 instead of R_X86_64_32 for R_DATA_32 (now the name R_DATA_32 is inappropriate...).
2009-04-18 15:08:01 +02:00
Shinichiro Hamaji 830b7533c9 Generate PIC code so that we can create shared objects properly.
- Add got_table in TCCState. This approach is naive and the distance between executable code and GOT can be longer than 32bit.
- Handle R_X86_64_GOTPCREL properly. We use got_table for TCC_OUTPUT_MEMORY case for now.
- Fix load() and store() so that they access global variables via GOT.
2009-04-18 15:08:01 +02:00
grischka 6c10429aa5 check for absolute include paths
Suggested by Sandor Zsolt <narkoskatona@yahoo.com>
2009-04-18 15:07:28 +02:00