guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 01/07: Makefile: RISCV support and optional vars


From: Ludovic Courtès
Subject: [Guile-commits] 01/07: Makefile: RISCV support and optional vars
Date: Tue, 31 Jan 2023 10:13:06 -0500 (EST)

civodul pushed a commit to branch wip-lightening-riscv
in repository guile.

commit d596255dbe558145c535740db62f1b84d95df4a4
Author: Ekaitz Zarraga <ekaitz@elenq.tech>
AuthorDate: Thu May 13 17:52:28 2021 +0200

    Makefile: RISCV support and optional vars
    
    Optional variables are needed because the structure of the makefile
    is prepared to run on Guix but Guix doesn't support RISCV yet, so it's
    better to set them as optional and let the user decide how do they want
    to compile this thing.
---
 tests/Makefile | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 769b43423..5c44bceae 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,5 +1,5 @@
-TESTS=$(sort $(basename $(wildcard *.c)))
-TARGETS ?= native ia32 aarch64 armv7
+TESTS ?= $(sort $(basename $(wildcard *.c)))
+TARGETS ?= native ia32 aarch64 armv7 riscv
 
 # Suitable values of cross-compiler variables for Debian:
 #
@@ -17,10 +17,11 @@ TARGETS ?= native ia32 aarch64 armv7
 #     gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6:arm64
 #
 CC = gcc
-CC_IA32=guix environment --pure -s i686-linux --ad-hoc gcc-toolchain -- gcc
-CC_AARCH64=guix environment --pure -s aarch64-linux --ad-hoc gcc-toolchain -- 
gcc
-CC_ARMv7=guix environment --pure -s armhf-linux --ad-hoc gcc-toolchain -- gcc
-CFLAGS = -Wall -O0 -g
+CC_IA32 ?= guix environment --pure -s i686-linux --ad-hoc gcc-toolchain -- gcc
+CC_AARCH64 ?= guix environment --pure -s aarch64-linux --ad-hoc gcc-toolchain 
-- gcc
+CC_ARMv7 ?= guix environment --pure -s armhf-linux --ad-hoc gcc-toolchain -- 
gcc
+CC_RISCV ?= guix environment --pure -s riscv64-linux --ad-hoc gcc-toolchain -- 
gcc
+CFLAGS ?= -Wall -O0 -g
 
 all: $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
 
@@ -54,6 +55,10 @@ test-armv7-%: CC = $(CC_ARMv7)
 test-armv7-%: %.c lightening-armv7.o test.h
        $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening-armv7.o $<
 
+test-riscv-%: CC = $(CC_RISCV)
+test-riscv-%: %.c lightening-riscv.o test.h
+       $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening-riscv.o $<
+
 .PRECIOUS: $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
 .PRECIOUS: $(foreach TARGET,$(TARGETS),lightening-$(TARGET).o)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]