From aea3964abdeebb0e934bad8cceeb5741a0951070 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Thu, 11 Jul 2024 20:14:43 -0700 Subject: [PATCH] Set -march instead of -mcpu --- CMakeLists.txt | 2 +- Makefile | 2 +- scripts/env.sh | 4 ++-- src/bun.zig | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 907359ce32059..2d75ce8b822b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1128,7 +1128,7 @@ else() if(NOT WIN32 AND NOT APPLE AND ARCH STREQUAL "aarch64") # on arm64 linux, we set a minimum of armv8 - target_compile_options(${bun} PUBLIC -mcpu=cortex-a35 -mtune=ampere1) + target_compile_options(${bun} PUBLIC -march=cortex-a35 -mtune=ampere1) endif() endif() diff --git a/Makefile b/Makefile index aeab6edf6247b..66ef7013310a3 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ BREW_PREFIX_PATH = /opt/homebrew DEFAULT_MIN_MACOS_VERSION = 11.0 MARCH_NATIVE = -mtune=$(CPU_TARGET) ifeq ($(OS_NAME),linux) -MARCH_NATIVE = -mcpu=cortex-a35 -mtune=ampere1 +MARCH_NATIVE = -march=cortex-a53 -mtune=ampere1 endif else ARCH_NAME = x64 diff --git a/scripts/env.sh b/scripts/env.sh index 38e96509d55c3..f9d3c7b4d832b 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -31,8 +31,8 @@ export CFLAGS='-O3 -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidd export CXXFLAGS='-O3 -fno-exceptions -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer' if [[ $(uname -s) == 'Linux' && ($(uname -m) == 'aarch64' || $(uname -m) == 'arm64') ]]; then - export CFLAGS="$CFLAGS -mcpu=cortex-a35 -mtune=ampere1 " - export CXXFLAGS="$CXXFLAGS -mcpu=cortex-a35 -mtune=ampere1 " + export CFLAGS="$CFLAGS -march=cortex-a53 -mtune=ampere1 " + export CXXFLAGS="$CXXFLAGS -march=cortex-a53 -mtune=ampere1 " fi export CMAKE_FLAGS=( diff --git a/src/bun.zig b/src/bun.zig index 3eccb7ba8b6d9..14bb4cc27c25e 100644 --- a/src/bun.zig +++ b/src/bun.zig @@ -499,7 +499,7 @@ pub fn fastRandom() u64 { // and we only need to do it once per process var value = seed_value.load(.monotonic); while (value == 0) : (value = seed_value.load(.monotonic)) { - if (comptime Environment.isDebug) outer: { + if (comptime Environment.isDebug or Environment.is_canary) outer: { if (getenvZ("BUN_DEBUG_HASH_RANDOM_SEED")) |env| { value = std.fmt.parseInt(u64, env, 10) catch break :outer; seed_value.store(value, .monotonic);