History

Import changesets (part 4) 428,457,460,467: defines for openbsd etc.

grischka committed 18 years ago

Commit 6c96c411 parent f4665775 files · +40 −16Browse files

Unified · Split

5 files
  1. Changelog +6 −1
  2. Makefile +4 −1
  3. bcheck.c +4 −3
  4. configure +16 −7
  5. tcc.c +10 −4
Changelog+6−1
@@ -1,6 +1,11 @@
1version 0.9.24:1version 0.9.24:
2 2
3- Import 409,410: ARM EABI by Daniel Gl�ckner3- Import changesets (part 4) 428,457,460,467: defines for openbsd etc.
4
5- Use _WIN32 for a windows hosted tcc and define it for the PE target,
6 otherwise define __unix / __linux (Detlef Riekenberg)
7
8- Import changesets (part 3) 409,410: ARM EABI by Daniel Gl�ckner
4 9
5- Some in-between fixes:10- Some in-between fixes:
6 TCC -E no longer hangs with macro calls involving newlines.11 TCC -E no longer hangs with macro calls involving newlines.
Makefile+4−1
@@ -5,7 +5,10 @@ include config.mak · 4 unmodified lines
5 5
6CFLAGS+=-g -Wall6CFLAGS+=-g -Wall
7ifndef CONFIG_WIN327ifndef CONFIG_WIN32
8LIBS=-ldl8LIBS=-lm
9ifndef CONFIG_NOLDL
10LIBS+=-ldl
11endif
9BCHECK_O=bcheck.o12BCHECK_O=bcheck.o
10endif13endif
11CFLAGS_P=$(CFLAGS) -pg -static -DCONFIG_TCC_STATIC14CFLAGS_P=$(CFLAGS) -pg -static -DCONFIG_TCC_STATIC
bcheck.c+4−3
@@ -21,7 +21,7 @@ · 20 unmodified lines
21#include <stdio.h>21#include <stdio.h>
22#include <stdarg.h>22#include <stdarg.h>
23#include <string.h>23#include <string.h>
24#ifndef __FreeBSD__24#if !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__)
25#include <malloc.h>25#include <malloc.h>
26#endif26#endif
27 27
@@ -36,8 +36,9 @@ · 8 unmodified lines
36 36
37#define HAVE_MEMALIGN37#define HAVE_MEMALIGN
38 38
39#if defined(__FreeBSD__) || defined(__dietlibc__)39#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__dietlibc__) \
40#warning Bound checking not fully supported on FreeBSD40 || defined(__UCLIBC__) || defined(__OpenBSD__)
41#warning Bound checking not fully supported in this environment.
41#undef CONFIG_TCC_MALLOC_HOOKS42#undef CONFIG_TCC_MALLOC_HOOKS
42#undef HAVE_MEMALIGN43#undef HAVE_MEMALIGN
43#endif44#endif
configure+16−7
@@ -68,6 +68,12 @@ case $targetos in · 67 unmodified lines
68MINGW32*)68MINGW32*)
69mingw32="yes"69mingw32="yes"
70;;70;;
71DragonFly)
72noldl="yes"
73;;
74OpenBSD)
75noldl="yes"
76;;
71*) ;;77*) ;;
72esac78esac
73 79
@@ -142,15 +148,15 @@ if test -z "$cross_prefix" ; then · 68 unmodified lines
142cat > $TMPC << EOF148cat > $TMPC << EOF
143#include <inttypes.h>149#include <inttypes.h>
144int main(int argc, char ** argv){150int main(int argc, char ** argv){
145 volatile uint32_t i=0x01234567;151 volatile uint32_t i=0x01234567;
146 return (*((uint8_t*)(&i))) == 0x67;152 return (*((uint8_t*)(&i))) == 0x67;
147}153}
148EOF154EOF
149 155
150if $cc -o $TMPE $TMPC 2>/dev/null ; then156if $cc -o $TMPE $TMPC 2>/dev/null ; then
151$TMPE && bigendian="yes"157 $TMPE && bigendian="yes"
152else158else
153echo big/little test failed159 echo big/little test failed
154fi160fi
155 161
156else162else
@@ -302,6 +308,9 @@ else · 145 unmodified lines
302 echo "Unsupported CPU"308 echo "Unsupported CPU"
303 exit 1309 exit 1
304fi310fi
311if test "$noldl" = "yes" ; then
312 echo "CONFIG_NOLDL=yes" >> config.mak
313fi
305if test "$mingw32" = "yes" ; then314if test "$mingw32" = "yes" ; then
306 echo "CONFIG_WIN32=yes" >> config.mak315 echo "CONFIG_WIN32=yes" >> config.mak
307 echo "#define CONFIG_WIN32 1" >> $TMPH316 echo "#define CONFIG_WIN32 1" >> $TMPH
@@ -327,7 +336,7 @@ if test "$source_path_used" = "yes" ; then · 19 unmodified lines
327 DIRS="tests"336 DIRS="tests"
328 FILES="Makefile tests/Makefile"337 FILES="Makefile tests/Makefile"
329 for dir in $DIRS ; do338 for dir in $DIRS ; do
330 mkdir -p $dir339 mkdir -p $dir
331 done340 done
332 for f in $FILES ; do341 for f in $FILES ; do
333 ln -sf $source_path/$f $f342 ln -sf $source_path/$f $f
@@ -337,9 +346,9 @@ echo "SRC_PATH=$source_path" >> config.mak · 3 unmodified lines
337 346
338diff $TMPH config.h >/dev/null 2>&1347diff $TMPH config.h >/dev/null 2>&1
339if test $? -ne 0 ; then348if test $? -ne 0 ; then
340 mv -f $TMPH config.h349 mv -f $TMPH config.h
341else350else
342 echo "config.h is unchanged"351 echo "config.h is unchanged"
343fi352fi
344 353
345rm -f $TMPO $TMPC $TMPE $TMPS $TMPH354rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
tcc.c+10−4
@@ -738,7 +738,8 @@ int __stdcall VirtualProtect(void*,unsigned long,unsigned long,unsigned long*); · 737 unmodified lines
738 #define strtof (float)strtod738 #define strtof (float)strtod
739 #define strtoll (long long)strtol739 #define strtoll (long long)strtol
740#endif740#endif
741#elif defined(TCC_UCLIBC) || defined(__FreeBSD__)741#elif defined(TCC_UCLIBC) || defined(__FreeBSD__) || defined(__DragonFly__) \
742 || defined(__OpenBSD__)
742/* currently incorrect */743/* currently incorrect */
743long double strtold(const char *nptr, char **endptr)744long double strtold(const char *nptr, char **endptr)
744{745{
@@ -10013,9 +10014,15 @@ TCCState *tcc_new(void) · 9268 unmodified lines
10013 tcc_define_symbol(s, "arm", NULL);10014 tcc_define_symbol(s, "arm", NULL);
10014 tcc_define_symbol(s, "__APCS_32__", NULL);10015 tcc_define_symbol(s, "__APCS_32__", NULL);
10015#endif10016#endif
10016#if defined(linux)10017#ifdef TCC_TARGET_PE
10018 tcc_define_symbol(s, "_WIN32", NULL);
10019#else
10020 tcc_define_symbol(s, "__unix__", NULL);
10021 tcc_define_symbol(s, "__unix", NULL);
10022#if defined(__linux)
10017 tcc_define_symbol(s, "__linux__", NULL);10023 tcc_define_symbol(s, "__linux__", NULL);
10018 tcc_define_symbol(s, "linux", NULL);10024 tcc_define_symbol(s, "__linux", NULL);
10025#endif
10019#endif10026#endif
10020 /* tiny C specific defines */10027 /* tiny C specific defines */
10021 tcc_define_symbol(s, "__TINYC__", NULL);10028 tcc_define_symbol(s, "__TINYC__", NULL);
@@ -10025,7 +10032,6 @@ TCCState *tcc_new(void) · 3 unmodified lines
10025 tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int");10032 tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int");
10026#ifdef TCC_TARGET_PE10033#ifdef TCC_TARGET_PE
10027 tcc_define_symbol(s, "__WCHAR_TYPE__", "unsigned short");10034 tcc_define_symbol(s, "__WCHAR_TYPE__", "unsigned short");
10028 tcc_define_symbol(s, "_WIN32", NULL);
10029#else10035#else
10030 tcc_define_symbol(s, "__WCHAR_TYPE__", "int");10036 tcc_define_symbol(s, "__WCHAR_TYPE__", "int");
10031#endif10037#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t