hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 8b10ef57d22a763cec2c0e7df8c68963622dcdba
parent 8c8348f4bbf7c7bad8c83e71f45d795215118d2b
Author: Lorenz (xha) <me@xha.li>
Date:   Tue, 26 Dec 2023 16:41:18 +0100

configs/*.mk: don't always assume cross-compilation

we patch this out in the openbsd port to make this build on arm64
and riscv64, i think it doesn't make sense to always assume
cross-compilation: you will still always need to set the variables

Signed-off-by: Lorenz (xha) <me@xha.li>

Diffstat:
Mconfigs/freebsd.mk | 13+++++++------
Mconfigs/linux.mk | 13+++++++------
Mconfigs/openbsd.mk | 16+++++++++-------
3 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/configs/freebsd.mk b/configs/freebsd.mk @@ -29,13 +29,14 @@ BINOUT = .bin HAREPATH = $(SRCDIR)/hare/stdlib:$(SRCDIR)/hare/third-party VERSION=$$(./scripts/version) -AARCH64_AS=aarch64-as -AARCH64_CC=aarch64-cc -AARCH64_LD=aarch64-ld +# For cross-compilation, modify the variables below +AARCH64_AS=as +AARCH64_CC=cc +AARCH64_LD=ld -RISCV64_AS=riscv64-as -RISCV64_CC=riscv64-cc -RISCV64_LD=riscv64-ld +RISCV64_AS=as +RISCV64_CC=cc +RISCV64_LD=ld X86_64_AS=as X86_64_CC=cc diff --git a/configs/linux.mk b/configs/linux.mk @@ -29,13 +29,14 @@ BINOUT = .bin HAREPATH = $(SRCDIR)/hare/stdlib:$(SRCDIR)/hare/third-party VERSION=$$(./scripts/version) -AARCH64_AS=aarch64-as -AARCH64_CC=aarch64-cc -AARCH64_LD=aarch64-ld +# For cross-compilation, modify the variables below +AARCH64_AS=as +AARCH64_CC=cc +AARCH64_LD=ld -RISCV64_AS=riscv64-as -RISCV64_CC=riscv64-cc -RISCV64_LD=riscv64-ld +RISCV64_AS=as +RISCV64_CC=cc +RISCV64_LD=ld X86_64_AS=as X86_64_CC=cc diff --git a/configs/openbsd.mk b/configs/openbsd.mk @@ -17,7 +17,8 @@ LDLINKFLAGS = -z nobtcfi # commands used by the build script HAREC = harec QBE = qbe -# OpenBSD: gas is in the binutils package. as from the base system is too old. +# gas is in the "binutils" package; as from the base system is too old. the "gas" +# package also works on all arches except riscv64. AS = gas LD = cc SCDOC = scdoc @@ -30,13 +31,14 @@ BINOUT = .bin HAREPATH = $(SRCDIR)/hare/stdlib:$(SRCDIR)/hare/third-party VERSION=$$(./scripts/version) -AARCH64_AS=aarch64-gas -AARCH64_CC=aarch64-cc -AARCH64_LD=aarch64-cc +# for cross-compilation, modify the variables below +AARCH64_AS=gas +AARCH64_CC=cc +AARCH64_LD=cc -RISCV64_AS=riscv64-gas -RISCV64_CC=riscv64-cc -RISCV64_LD=riscv64-cc +RISCV64_AS=gas +RISCV64_CC=cc +RISCV64_LD=cc X86_64_AS=gas X86_64_CC=cc