stdatomics: tidy & cleanup

- remove any error messages that were just for debugging the
  templates really
- don't use c99 in tcc (array designators etc.)
- remove memory model type (cannot be an own type really)
  and move memory model defines from built-in to stdatomics.h
- apply normal casts to non-pointer atomic_function arguments
- tidy the library support
- add some tests for errors/warnings

Also:
- Makefile: move GIT_HASH stuff from CFLAGS to DEFINES and into
  main section (away from what is included by tests for example)
- tccelf.c/tccgen.c: avoid some warnings with newer GCC
This commit is contained in:
grischka
2021-03-30 09:26:26 +02:00
parent 4bb3b3cec7
commit 48df89e10e
19 changed files with 334 additions and 294 deletions

View File

@@ -24,13 +24,6 @@ CFLAGS += -I$(TOP)
CFLAGS += $(CPPFLAGS)
VPATH = $(TOPSRC)
TCC_GIT_HASH=$(shell git rev-parse > /dev/null 2>&1 && git rev-parse --short HEAD || echo no)
ifneq ($(TCC_GIT_HASH),no)
MODIFIED = $(shell git diff | grep --quiet +++ && echo "modified ")
CFLAGS += -DTCC_GIT_HASH="\"$(MODIFIED)$(TCC_GIT_HASH)\""
endif
ifdef CONFIG_WIN32
CFG = -win
ifneq ($(CONFIG_static),yes)
@@ -229,6 +222,12 @@ $(TCC_FILES) : DEFINES += -DONE_SOURCE=0
$(X)tccpp.o : $(TCCDEFS_H)
endif
TCC_GIT_HASH=$(shell git rev-parse > /dev/null 2>&1 && git rev-parse --short HEAD || echo no)
ifneq ($(TCC_GIT_HASH),no)
MODIFIED = $(shell git diff | grep --quiet +++ && echo "modified ")
$(X)tcc.o : DEFINES += += -DTCC_GIT_HASH="\"$(MODIFIED)$(TCC_GIT_HASH)\""
endif
ifeq ($(CONFIG_debug),yes)
CFLAGS += -g
LDFLAGS += -g