From d0c2f00df2366ba2114c75ada95c578864a81387 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Wed, 2 Oct 2013 21:49:55 +0200 Subject: [PATCH] Fix CONFIG_TCC_SYSINCLUDEPATHS on !win32 systems Commit 9382d6f1 ("Fix lib, include, crt and libgcc search paths", 07-09-2013) inadvertently included an initial empty entry to the CONFIG_TCC_SYSINCLUDEPATHS variable (for non win32 targets). In addition to an empty line in the 'tcc -vv' display, this leads to the preprocessor attempting to read an include file from the root of the filesystem (i.e. '/header.h'). Signed-off-by: Ramsay Jones --- tcc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tcc.h b/tcc.h index 5ed3e21c..92e528d0 100644 --- a/tcc.h +++ b/tcc.h @@ -185,7 +185,7 @@ # define CONFIG_TCC_SYSINCLUDEPATHS "{B}/include;{B}/include/winapi" # else # define CONFIG_TCC_SYSINCLUDEPATHS \ - ":" CONFIG_SYSROOT "/usr/local/include/" CONFIG_MULTIARCHDIR \ + CONFIG_SYSROOT "/usr/local/include/" CONFIG_MULTIARCHDIR \ ":" CONFIG_SYSROOT "/usr/local/include" \ ":" CONFIG_SYSROOT "/usr/include/" CONFIG_MULTIARCHDIR \ ":" CONFIG_SYSROOT "/usr/include" \ @@ -753,8 +753,9 @@ struct TCCState { #define VT_IMPORT 0x00004000 /* win32: extern data imported from dll */ #define VT_EXPORT 0x00008000 /* win32: data exported from dll */ #define VT_WEAK 0x00010000 /* weak symbol */ +#define VT_TLS 0x00040000 /* thread-local storage */ -#define VT_STRUCT_SHIFT 18 /* shift for bitfield shift values (max: 32 - 2*6) */ +#define VT_STRUCT_SHIFT 19 /* shift for bitfield shift values (max: 32 - 2*6) */ /* type mask (except storage) */ #define VT_STORAGE (VT_EXTERN | VT_STATIC | VT_TYPEDEF | VT_INLINE | VT_IMPORT | VT_EXPORT | VT_WEAK) @@ -1140,6 +1141,7 @@ ST_FUNC void expect(const char *msg); /* ------------ tccgen.c ------------ */ ST_DATA Section *text_section, *data_section, *bss_section; /* predefined sections */ +ST_DATA Section *tdata_section, *tbss_section; /* thread-local storage sections */ ST_DATA Section *cur_text_section; /* current section where function code is generated */ #ifdef CONFIG_TCC_ASM ST_DATA Section *last_text_section; /* to handle .previous asm directive */