From 7d3c7595d25e99ab3bf9b28f922fcac1647f864f Mon Sep 17 00:00:00 2001 From: Charlie Jenkins Date: Fri, 17 Jan 2025 16:35:53 -0800 Subject: [PATCH 1/2] Allow CC to be overriden in Makefile To support changing compilers which is particularly useful for cross compilation, use the defined CC if it exists. Signed-off-by: Charlie Jenkins --- UnixBench/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnixBench/Makefile b/UnixBench/Makefile index 4874d1f..439c53c 100644 --- a/UnixBench/Makefile +++ b/UnixBench/Makefile @@ -55,7 +55,7 @@ GL_LIBS = -lGL -lXext -lX11 # COMPILER CONFIGURATION: Set "CC" to the name of the compiler to use # to build the binary benchmarks. You should also set "$cCompiler" in the # Run script to the name of the compiler you want to test. -CC=gcc +CC?=gcc # OPTIMISATION SETTINGS: # Use gcc option if defined UB_GCC_OPTIONS via "Environment variable" or "Command-line arguments". From 57b14649b579f2a31ebedae9bd3894a721251903 Mon Sep 17 00:00:00 2001 From: Charlie Jenkins Date: Fri, 24 Jan 2025 14:11:46 -0800 Subject: [PATCH 2/2] Allow ARCH to be overriden in Makefile To support changing compilers which is particularly useful for cross compilation, use the defined ARCH if it exists. Signed-off-by: Charlie Jenkins --- UnixBench/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnixBench/Makefile b/UnixBench/Makefile index 439c53c..50d8139 100644 --- a/UnixBench/Makefile +++ b/UnixBench/Makefile @@ -89,7 +89,7 @@ else ## OS detection. Comment out if gmake syntax not supported by other 'make'. OSNAME:=$(shell uname -s) - ARCH := $(shell uname -m) + ARCH ?= $(shell uname -m) ifeq ($(OSNAME),Linux) # Not all CPU architectures support "-march" or "-march=native". # - Supported : x86, x86_64, ARM, AARCH64, riscv64, etc..