diff options
| author | grischka <grischka> | 2017-05-07 12:41:29 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2017-05-07 12:41:29 +0200 |
| commit | 44abffe33a10ee2bdc0d66f87ffa5e178182d6e6 (patch) | |
| tree | 4276ddd64a57f66a51525bec6c91255e8af40903 /lib/Makefile | |
| parent | 94ac9f2b4952fbd77bfdf39e753fcbca3e472883 (diff) | |
| download | tinycc-44abffe33a10ee2bdc0d66f87ffa5e178182d6e6.tar.gz tinycc-44abffe33a10ee2bdc0d66f87ffa5e178182d6e6.tar.bz2 | |
more minor fixes
* tccgen: re-allow long double constants for x87 cross
sizeof (long double) may be 12 or 16 depending on host platform
(i386/x86_64 on unix/windows).
Except that it's 8 if the host is on windows and not gcc
was used to compile tcc.
* win64: fix builtin_va_start after VT_REF removal
See also a8b83ce43a95fa519dacfe7690a3a0098af7909c
* tcctest.c: remove outdated limitation for ll-bitfield test
It always worked, there is no reason why it should not work
in future.
* libtcc1.c: exclude long double conversion on ARM
* Makefile: remove CFLAGS from link recipes
* lib/Makefile: use target DEFINES as passed from main Makefile
* lib/armflush.c lib/va_list.c: factor out from libtcc1.c
* arm-gen.c: disable "depreciated" warnings for now
Diffstat (limited to 'lib/Makefile')
| -rw-r--r-- | lib/Makefile | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/lib/Makefile b/lib/Makefile index 00ab7dc..fe517e9 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -17,61 +17,54 @@ XFLAGS-win = -B$(TOPSRC)/win32 -I$(TOPSRC)/include XFLAGS = $(XFLAGS$(XCFG)) XCFG = $(or $(findstring -win,$T),-unx) -ifeq ($(X),) - BCHECK_O = bcheck.o - ifeq "$T" "arm" - XCC = $(CC) - XAR = $(AR) - XFLAGS = $(CFLAGS) -fPIC - endif -endif +# using gcc ("make armlib-usegcc=no" to use tcc) +armlib-usegcc ?= no -ifdef CONFIG_OSX - XFLAGS += -D_ANSI_SOURCE +ifeq "$($(X)$(T)lib-usegcc)" "yes" + XCC = $(CC) + XAR = $(AR) + XFLAGS = $(CFLAGS) -fPIC endif +# only for native compiler +$(X)BCHECK_O = bcheck.o + ifeq ($(CONFIG_musl),yes) BCHECK_O = endif +ifdef CONFIG_OSX + XFLAGS += -D_ANSI_SOURCE +endif + I386_O = libtcc1.o alloca86.o alloca86-bt.o X86_64_O = libtcc1.o alloca86_64.o alloca86_64-bt.o -ARM_O = libtcc1.o armeabi.o alloca-arm.o +ARM_O = libtcc1.o armeabi.o alloca-arm.o armflush.o ARM64_O = lib-arm64.o WIN_O = crt1.o crt1w.o wincrt1.o wincrt1w.o dllcrt1.o dllmain.o OBJ-i386 = $(I386_O) $(BCHECK_O) -TGT-i386 = -DTCC_TARGET_I386 - -OBJ-x86_64 = $(X86_64_O) $(BCHECK_O) -TGT-x86_64 = -DTCC_TARGET_X86_64 - -OBJ-x86_64-osx = $(X86_64_O) -TGT-x86_64-osx = -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO - -OBJ-arm = $(ARM_O) -TGT-arm = -DTCC_TARGET_ARM - -OBJ-arm64 = $(ARM64_O) -TGT-arm64 = -DTCC_TARGET_ARM64 - +OBJ-x86_64 = $(X86_64_O) va_list.o $(BCHECK_O) +OBJ-x86_64-osx = $(X86_64_O) va_list.o OBJ-i386-win32 = $(I386_O) chkstk.o bcheck.o $(WIN_O) -TGT-i386-win32 = -DTCC_TARGET_I386 -DTCC_TARGET_PE - OBJ-x86_64-win32 = $(X86_64_O) chkstk.o bcheck.o $(WIN_O) -TGT-x86_64-win32 = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE - +OBJ-arm64 = $(ARM64_O) +OBJ-arm = $(ARM_O) +OBJ-arm-fpa = $(ARM_O) +OBJ-arm-fpa-ld = $(ARM_O) +OBJ-arm-vfp = $(ARM_O) +OBJ-arm-eabi = $(ARM_O) +OBJ-arm-eabihf = $(ARM_O) OBJ-arm-wince = $(ARM_O) $(WIN_O) -TGT-arm-wince = -DTCC_TARGET_ARM -DTCC_TARGET_PE $(BIN) : $(patsubst %.o,$(X)%.o,$(OBJ-$T)) $(XAR) rcs $@ $^ $(X)%.o : %.c - $(XCC) -c $< -o $@ $(TGT-$T) $(XFLAGS) + $(XCC) -c $< -o $@ $(DEFINES) $(XFLAGS) $(X)%.o : %.S - $(XCC) -c $< -o $@ $(TGT-$T) $(XFLAGS) + $(XCC) -c $< -o $@ $(DEFINES) $(XFLAGS) $(X)crt1w.o : crt1.c $(X)wincrt1w.o : wincrt1.c |
