From d13c559934d74c688b28a6ff468fcb059da3c2af Mon Sep 17 00:00:00 2001 From: Roman Venediktov Date: Thu, 4 Jul 2024 10:49:15 +0200 Subject: [PATCH] Remove redundant -arch flags --- regression/Makefile | 9 +-------- runtime/Makefile | 3 ++- stdlib/regression/Makefile | 9 +-------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/regression/Makefile b/regression/Makefile index 7226f0c16..9bba4665e 100644 --- a/regression/Makefile +++ b/regression/Makefile @@ -3,13 +3,6 @@ TESTS=$(sort $(filter-out test111, $(basename $(wildcard test*.lama)))) LAMAC=../src/lamac -UNAME_S := $(shell uname -s) - -ifeq ($(UNAME_S),Linux) -else ifeq ($(UNAME_S),Darwin) - ARCH = -arch x86_64 -endif - .PHONY: check $(TESTS) @@ -19,7 +12,7 @@ $(TESTS): %: %.lama @echo "regression/$@" @cat $@.input | LAMA=../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log @cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log - @LAMA=../runtime $(LAMAC) $< && cat $@.input | $(ARCH) ./$@ > $@.log && diff $@.log orig/$@.log + @LAMA=../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log ctest111: @echo "regression/test111" diff --git a/runtime/Makefile b/runtime/Makefile index 4a947e263..55768a6be 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -1,11 +1,12 @@ UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) + CC=gcc else ifeq ($(UNAME_S),Darwin) + CC=clang ARCH = -arch x86_64 endif -CC=clang DISABLE_WARNINGS=-Wno-shift-negative-value COMMON_FLAGS=$(DISABLE_WARNINGS) -g -fstack-protector-all $(ARCH) --std=c11 PROD_FLAGS=$(COMMON_FLAGS) -DLAMA_ENV diff --git a/stdlib/regression/Makefile b/stdlib/regression/Makefile index 3368d4b64..edc80acab 100644 --- a/stdlib/regression/Makefile +++ b/stdlib/regression/Makefile @@ -2,20 +2,13 @@ TESTS=$(sort $(filter-out test02 test30, $(basename $(wildcard test*.lama)))) LAMAC=../../src/lamac -UNAME_S := $(shell uname -s) - -ifeq ($(UNAME_S),Linux) -else ifeq ($(UNAME_S),Darwin) - ARCH = -arch x86_64 -endif - .PHONY: check $(TESTS) check: $(TESTS) $(TESTS): %: %.lama @echo "stdlib/regression/$@" - @LAMA=../../runtime $(LAMAC) -I .. -ds -dp $< && $(ARCH) ./$@ > $@.log && diff $@.log orig/$@.log + @LAMA=../../runtime $(LAMAC) -I .. -ds -dp $< && ./$@ > $@.log && diff $@.log orig/$@.log clean: $(RM) test*.log *.s *~ $(TESTS) *.i