From 65db9a4a02c30d8dd5ca89b6fe3e4524cd4c29a5 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 20 Nov 2018 11:04:07 +0100 Subject: Fixed MPPA runtimes not compiling --- .gitignore | 5 +++++ runtime/Makefile | 4 +--- runtime/mppa_k1c/Makefile | 9 +++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index eeec81f8..c0cd712f 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,8 @@ /doc/html/ # MacOS metadata .DS_Store +runtime/mppa_k1c/i64_sdiv.s +runtime/mppa_k1c/i64_smod.s +runtime/mppa_k1c/i64_udiv.s +runtime/mppa_k1c/i64_udivmod.s +runtime/mppa_k1c/i64_umod.s diff --git a/runtime/Makefile b/runtime/Makefile index 0d130ca2..30c1fc83 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -24,6 +24,7 @@ else ifeq ($(ARCH),powerpc64) OBJS=i64_dtou.o i64_stof.o i64_utod.o i64_utof.o vararg.o else ifeq ($(ARCH),mppa_k1c) OBJS=i64_umod.o i64_udiv.o i64_udivmod.o i64_sdiv.o i64_smod.o +DOMAKE:=$(shell (cd mppa_k1c && make)) else OBJS=i64_dtos.o i64_dtou.o i64_sar.o i64_sdiv.o i64_shl.o \ i64_shr.o i64_smod.o i64_stod.o i64_stof.o \ @@ -42,9 +43,6 @@ VPATH=$(ARCH) ifeq ($(strip $(HAS_RUNTIME_LIB)),true) all: $(LIB) -ifeq ($(ARCH),mppa_k1c) - (cd mppa_k1c && make) -endif else all: endif diff --git a/runtime/mppa_k1c/Makefile b/runtime/mppa_k1c/Makefile index d15928b8..e10c5086 100644 --- a/runtime/mppa_k1c/Makefile +++ b/runtime/mppa_k1c/Makefile @@ -1,9 +1,14 @@ +CCOMP ?= ccomp +CFLAGS ?= -O2 -D__K1_TINYK1__ + CFILES=$(wildcard *.c) SFILES=$(subst .c,.s,$(CFILES)) +CCOMPPATH=$(shell which $(CCOMP)) + all: $(SFILES) .SECONDARY: -%.S: %.c - ccomp -O2 -S $< -o $@ +%.s: %.c $(CCOMPPATH) + $(CCOMP) $(CFLAGS) -S $< -o $@ sed -i -e 's/i64_/__compcert_i64_/g' $@ -- cgit