History

configure chmod 755 etc.

lib/tcov.c: - can't be cross-compiled (needs stdio.h) - can be included in libtcc1.a Reason why bt-xxx.o/bcheck.o are linked separatly is because we don't want then to linked into exe's and dlls at the same time.

grischka committed 5 years ago

Commit 557b4a11 parent 25628cf10 files · +21 −15Browse files

Unified · Split

10 files
  1. Makefile +2 −3
  2. c67-gen.c +2 −0
  3. configure +0 −0
  4. lib/Makefile +1 −1
  5. lib/bcheck.c +4 −0
  6. lib/bt-exe.c +0 −5
  7. tccelf.c +0 −2
  8. tccgen.c +6 −0
  9. tccpe.c +1 −3
  10. tests/tests2/96_nodata_wanted.c +5 −1
Makefile+2−3
@@ -334,12 +334,11 @@ IR = $(IM) mkdir -p $2 && cp -r $1/. $2 · 333 unmodified lines
334IM = $(info -> $2 : $1)@334IM = $(info -> $2 : $1)@
335 335
336B_O = bcheck.o bt-exe.o bt-log.o bt-dll.o336B_O = bcheck.o bt-exe.o bt-log.o bt-dll.o
337T_O = tcov.o
338 337
339# install progs & libs338# install progs & libs
340install-unx:339install-unx:
341 $(call IBw,$(PROGS) $(PROGS_CROSS),"$(bindir)")340 $(call IBw,$(PROGS) $(PROGS_CROSS),"$(bindir)")
342 $(call IFw,$(LIBTCC1) $(B_O) $(T_O) $(LIBTCC1_U),"$(tccdir)")341 $(call IFw,$(LIBTCC1) $(B_O) $(LIBTCC1_U),"$(tccdir)")
343 $(call IF,$(TOPSRC)/include/*.h $(TOPSRC)/tcclib.h,"$(tccdir)/include")342 $(call IF,$(TOPSRC)/include/*.h $(TOPSRC)/tcclib.h,"$(tccdir)/include")
344 $(call $(if $(findstring .so,$(LIBTCC)),IBw,IFw),$(LIBTCC),"$(libdir)")343 $(call $(if $(findstring .so,$(LIBTCC)),IBw,IFw),$(LIBTCC),"$(libdir)")
345 $(call IF,$(TOPSRC)/libtcc.h,"$(includedir)")344 $(call IF,$(TOPSRC)/libtcc.h,"$(includedir)")
@@ -364,7 +363,7 @@ uninstall-unx: · 18 unmodified lines
364install-win:363install-win:
365 $(call IBw,$(PROGS) $(PROGS_CROSS) $(subst libtcc.a,,$(LIBTCC)),"$(bindir)")364 $(call IBw,$(PROGS) $(PROGS_CROSS) $(subst libtcc.a,,$(LIBTCC)),"$(bindir)")
366 $(call IF,$(TOPSRC)/win32/lib/*.def,"$(tccdir)/lib")365 $(call IF,$(TOPSRC)/win32/lib/*.def,"$(tccdir)/lib")
367 $(call IFw,libtcc1.a $(B_O) $(T_O) $(LIBTCC1_W),"$(tccdir)/lib")366 $(call IFw,libtcc1.a $(B_O) $(LIBTCC1_W),"$(tccdir)/lib")
368 $(call IF,$(TOPSRC)/include/*.h $(TOPSRC)/tcclib.h,"$(tccdir)/include")367 $(call IF,$(TOPSRC)/include/*.h $(TOPSRC)/tcclib.h,"$(tccdir)/include")
369 $(call IR,$(TOPSRC)/win32/include,"$(tccdir)/include")368 $(call IR,$(TOPSRC)/win32/include,"$(tccdir)/include")
370 $(call IR,$(TOPSRC)/win32/examples,"$(tccdir)/examples")369 $(call IR,$(TOPSRC)/win32/examples,"$(tccdir)/examples")
c67-gen.c+2−0
@@ -108,6 +108,8 @@ enum { · 107 unmodified lines
108/* maximum alignment (for aligned attribute support) */108/* maximum alignment (for aligned attribute support) */
109#define MAX_ALIGN 8109#define MAX_ALIGN 8
110 110
111#undef CONFIG_TCC_BCHECK
112
111/******************************************************/113/******************************************************/
112#else /* ! TARGET_DEFS_ONLY */114#else /* ! TARGET_DEFS_ONLY */
113/******************************************************/115/******************************************************/
configure+0−0

File mode changed from 100644 to 100755.

lib/Makefile+1−1
@@ -38,6 +38,7 @@ endif · 37 unmodified lines
38$(X)BT_O = bt-exe.o bt-log.o38$(X)BT_O = bt-exe.o bt-log.o
39$(X)B_O = $(BCHECK_O) bt-exe.o bt-log.o bt-dll.o39$(X)B_O = $(BCHECK_O) bt-exe.o bt-log.o bt-dll.o
40endif40endif
41$(X)BT_O += tcov.o
41 42
42DSO_O = dsohandle.o43DSO_O = dsohandle.o
43 44
@@ -64,7 +65,6 @@ OBJ-arm-wince = $(ARM_O) $(WIN_O) · 20 unmodified lines
64OBJ-riscv64 = $(RISCV64_O) $(BCHECK_O) $(DSO_O)65OBJ-riscv64 = $(RISCV64_O) $(BCHECK_O) $(DSO_O)
65 66
66OBJ-extra = $(filter $(B_O),$(OBJ-$T))67OBJ-extra = $(filter $(B_O),$(OBJ-$T))
67OBJ-extra += tcov.o
68OBJ-libtcc1 = $(addprefix $(X),$(filter-out $(OBJ-extra),$(OBJ-$T)))68OBJ-libtcc1 = $(addprefix $(X),$(filter-out $(OBJ-extra),$(OBJ-$T)))
69 69
70ALL = $(addprefix $(TOP)/,$(X)libtcc1.a $(OBJ-extra))70ALL = $(addprefix $(TOP)/,$(X)libtcc1.a $(OBJ-extra))
lib/bcheck.c+4−0
@@ -1367,6 +1367,10 @@ int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) · 1366 unmodified lines
1367 1367
1368 dprintf (stderr, "%s, %s() %d %p %p\n", __FILE__, __FUNCTION__,1368 dprintf (stderr, "%s, %s() %d %p %p\n", __FILE__, __FUNCTION__,
1369 signum, act, oldact);1369 signum, act, oldact);
1370
1371 if (sigaction_redir == NULL)
1372 __bound_init(0,-1);
1373
1370 if (act) {1374 if (act) {
1371 nact = *act;1375 nact = *act;
1372 if (nact.sa_flags & SA_SIGINFO)1376 if (nact.sa_flags & SA_SIGINFO)
lib/bt-exe.c+0−5
@@ -18,11 +18,6 @@ void __bt_init(rt_context *p, int num_callers) · 17 unmodified lines
18 __attribute__((weak)) void __bound_init(void*, int);18 __attribute__((weak)) void __bound_init(void*, int);
19 struct rt_context *rc = &g_rtctxt;19 struct rt_context *rc = &g_rtctxt;
20 //fprintf(stderr, "__bt_init %d %p %p\n", num_callers, p->stab_sym, p->bounds_start), fflush(stderr);20 //fprintf(stderr, "__bt_init %d %p %p\n", num_callers, p->stab_sym, p->bounds_start), fflush(stderr);
21#ifdef __APPLE__
22 /* call __bound_init here due to redirection of sigaction */
23 if (__bound_init && p->bounds_start)
24 __bound_init(p->bounds_start, 0);
25#endif
26 if (num_callers) {21 if (num_callers) {
27 memcpy(rc, p, offsetof(rt_context, next));22 memcpy(rc, p, offsetof(rt_context, next));
28 rc->num_callers = num_callers - 1;23 rc->num_callers = num_callers - 1;
tccelf.c+0−2
@@ -1479,8 +1479,6 @@ ST_FUNC void tcc_add_runtime(TCCState *s1) · 1478 unmodified lines
1479 if (!s1->nostdlib) {1479 if (!s1->nostdlib) {
1480 if (s1->option_pthread)1480 if (s1->option_pthread)
1481 tcc_add_library_err(s1, "pthread");1481 tcc_add_library_err(s1, "pthread");
1482 if (s1->test_coverage)
1483 tcc_add_support(s1, "tcov.o");
1484 tcc_add_library_err(s1, "c");1482 tcc_add_library_err(s1, "c");
1485#ifdef TCC_LIBGCC1483#ifdef TCC_LIBGCC
1486 if (!s1->static_link) {1484 if (!s1->static_link) {
tccgen.c+6−0
@@ -2949,6 +2949,12 @@ static void gen_opic(int op) · 2948 unmodified lines
2949 2949
2950#if defined TCC_TARGET_X86_64 || defined TCC_TARGET_I3862950#if defined TCC_TARGET_X86_64 || defined TCC_TARGET_I386
2951# define gen_negf gen_opf2951# define gen_negf gen_opf
2952#elif defined TCC_TARGET_ARM
2953void gen_negf(int op)
2954{
2955 /* arm will detect 0-x and replace by vneg */
2956 vpushi(0), vswap(), gen_op('-');
2957}
2952#else2958#else
2953/* XXX: implement in gen_opf() for other backends too */2959/* XXX: implement in gen_opf() for other backends too */
2954void gen_negf(int op)2960void gen_negf(int op)
tccpe.c+1−3
@@ -1915,10 +1915,8 @@ static void pe_add_runtime(TCCState *s1, struct pe_info *pe) · 1914 unmodified lines
1915 tcc_add_btstub(s1);1915 tcc_add_btstub(s1);
1916 }1916 }
1917#endif1917#endif
1918 if (s1->test_coverage) {1918 if (s1->test_coverage)
1919 tcc_add_support(s1, "tcov.o");
1920 tcc_add_tcov(s1);1919 tcc_add_tcov(s1);
1921 }
1922 1920
1923 /* grab the startup code from libtcc1.a */1921 /* grab the startup code from libtcc1.a */
1924#ifdef TCC_IS_NATIVE1922#ifdef TCC_IS_NATIVE
tests/tests2/96_nodata_wanted.c+5−1
@@ -58,7 +58,11 @@ ts1:; · 57 unmodified lines
58 void *p = (void*)&main;58 void *p = (void*)&main;
59 char cc[] = "static string";59 char cc[] = "static string";
60 double d = 8.0;60 double d = 8.0;
61 struct __attribute__((packed)) {61 struct
62#ifndef __arm__
63 __attribute__((packed))
64#endif
65 {
62 unsigned x : 12;66 unsigned x : 12;
63 unsigned char y : 7;67 unsigned char y : 7;
64 unsigned z : 28, a: 4, b: 5;68 unsigned z : 28, a: 4, b: 5;

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