From da8c62f75d893449e232944fc62566c020b4d010 Mon Sep 17 00:00:00 2001 From: grischka Date: Wed, 11 Oct 2017 18:13:43 +0200 Subject: various stuff win32/Makefile ("for cygwin") removed - On cygwin, the normal ./configure && make can be used with either cygwin's "GCC for Win32 Toolchain" ./configure --cross-prefix=i686-w64-mingw32- or with an existing tcc: ./configure --cc=/tcc.exe tcctest.c: - exclude test_high_clobbers() on _WIN64 (does not work) tests2/95_bitfield.c: - use 'signed char' for ARM (where default 'char' is unsigned) tests: - remove -I "expr" diff option to allow tests with busybox-diff. libtcc.c, tcc.c: - removed -iwithprefix option. It is supposed to be combined with -iprefix which we don't have either. tccgen.c: - fix assignments and return of 'void', as in void f() { void *p, *q; *p = *q: return *p; } This appears to be allowed but should do nothing. tcc.h, libtcc.c, tccpp.c: - Revert "Introduce VIP sysinclude paths which are always searched first" This reverts commit 1d5e386b0a78393ac6b670c209a185849ec798a1. The patch was giving tcc's system includes priority over -I which is not how it should be. tccelf.c: - add DT_TEXTREL tag only if text relocations are actually used (which is likely not the case on x86_64) - prepare_dynamic_rel(): avoid relocation of unresolved (weak) symbols tccrun.c: - for HAVE_SELINUX, use two mappings to the same (real) file. (it was so once except the RX mapping wasn't used at all). tccpe.c: - fix relocation constant used for x86_64 (by Andrei E. Warentin) - #ifndef _WIN32 do "chmod 755 ..." to get runnable exes on cygwin. tccasm.c: - keep forward asm labels static, otherwise they will endup in dynsym eventually. configure, Makefile: - mingw32: respect ./configure options --bindir --docdir --libdir - allow overriding tcc when building libtcc1.a and libtcc.def with make XTCC= - use $(wildcard ...) for install to allow installing just a cross compiler for example make cross-arm make install - use name -libtcc1.a build-tcc.bat: - add options: -clean, -b bindir --- tcc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tcc.c') diff --git a/tcc.c b/tcc.c index 53ee84e..c347a06 100644 --- a/tcc.c +++ b/tcc.c @@ -86,7 +86,6 @@ static const char help2[] = " -Wp,-opt same as -opt\n" " -include file include 'file' above each input file\n" " -isystem dir add 'dir' to system include path\n" - " -iwithprefix dir set tcc's private include/library subdir\n" " -static link to static libraries (not recommended)\n" " -dumpversion print version\n" " -print-search-dirs print search paths\n" @@ -181,7 +180,6 @@ static void print_search_dirs(TCCState *s) { printf("install: %s\n", s->tcc_lib_path); /* print_dirs("programs", NULL, 0); */ - print_dirs("tcc-include", s->tccinclude_paths, s->nb_tccinclude_paths); print_dirs("include", s->sysinclude_paths, s->nb_sysinclude_paths); print_dirs("libraries", s->library_paths, s->nb_library_paths); #ifndef TCC_TARGET_PE @@ -197,7 +195,7 @@ static void set_environment(TCCState *s) path = getenv("C_INCLUDE_PATH"); if(path != NULL) { - tcc_add_include_path(s, path); + tcc_add_sysinclude_path(s, path); } path = getenv("CPATH"); if(path != NULL) { @@ -278,6 +276,7 @@ redo: return 0; if (opt == OPT_PRINT_DIRS) { /* initialize search dirs */ + set_environment(s); tcc_set_output_type(s, TCC_OUTPUT_MEMORY); print_search_dirs(s); return 0; -- cgit v1.3.1