I just wanted to compile SerenityOS on a whim, but got stopped immediately by my CXXFLAGS="-march=native"
. But the error is weird:
[53/3993] Building CXX object Kernel/CMakeFiles/kernel_heap.dir/Heap/SlabAllocator.cpp.o
FAILED: Kernel/CMakeFiles/kernel_heap.dir/Heap/SlabAllocator.cpp.o
/home/ich/devel/serenity/Toolchain/Local/i686//bin/i686-pc-serenity-g++ -DENABLE_COMPILETIME_FORMAT_CHECK -DKERNEL -DSANITIZE_PTRS -D__serenity__ -I/home/ich/devel/serenity/Userland/Librarie
s -I/home/ich/devel/serenity/. -I/home/ich/devel/serenity/Build/i686 -I/home/ich/devel/serenity/Userland/Libraries/LibC -I/home/ich/devel/serenity/Userland/Libraries/LibCrypt -I/home/ich/dev
el/serenity/Userland/Libraries/LibM -I/home/ich/devel/serenity/Userland/Libraries/LibPthread -I/home/ich/devel/serenity/Userland/Libraries/LibSystem -I/home/ich/devel/serenity/Userland/Servi
ces -I/home/ich/devel/serenity/Userland -I/home/ich/devel/serenity/Build/i686/Userland/Services -I/home/ich/devel/serenity/Build/i686/Userland/Libraries -I/home/ich/devel/serenity/Build/i686
/Userland -I/home/ich/devel/serenity/Toolchain/Local/i686/i686-pc-serenity/include/c++/11.2.0 -I/home/ich/devel/serenity/Toolchain/Local/i686/i686-pc-serenity/include/c++/11.2.0/i686-pc-sere
nity -march=native -pipe -frecord-gcc-switches -pie -fpic -Wno-unknown-warning-option -Wvla -Wnull-dereference -fno-rtti -ffreestanding -fbuiltin -mno-80387 -mno-mmx -mno-sse -mno-sse2 -fno-
asynchronous-unwind-tables -fstack-protector-strong -fno-exceptions -nodefaultlibs -nostdlib -nostdinc -nostdinc++ -fzero-call-used-regs=used-gpr -faligned-new=4 -static-pie -fsanitize=undef
ined -Wno-literal-suffix -Wformat=2 -fdiagnostics-color=always -Werror -Wall -Wextra -Wno-address-of-packed-member -Wcast-align -Wcast-qual -Wno-deprecated-copy -Wduplicated-cond -Wdouble-pr
omotion -Wno-expansion-to-defined -Wimplicit-fallthrough -Wlogical-op -Wmisleading-indentation -Wmissing-declarations -Wno-nonnull-compare -Wnon-virtual-dtor -Wno-unknown-warning-option -Wun
def -Wunused -Wwrite-strings -Wno-maybe-uninitialized -ffile-prefix-map=/home/ich/devel/serenity=. -fno-exceptions -fstack-protector-strong -g1 -fstack-clash-protection -Os -std=c++20 -MD -M
T Kernel/CMakeFiles/kernel_heap.dir/Heap/SlabAllocator.cpp.o -MF Kernel/CMakeFiles/kernel_heap.dir/Heap/SlabAllocator.cpp.o.d -o Kernel/CMakeFiles/kernel_heap.dir/Heap/SlabAllocator.cpp.o -c
/home/ich/devel/serenity/Kernel/Heap/SlabAllocator.cpp
cc1plus: error: bad value ('native') for '-march=' switch
cc1plus: note: valid arguments to '-march=' switch are: i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3
pentium3m pentium-m pentium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake
icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm geode k6 k6-2 k6-3 athl
on athlon-tbird athlon-4 athlon-xp athlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64
athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2 native
So it claims that -march=native
should be supported but fails. Where is that compiler binary even coming from and why doesn't it want -march=native
?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too