Skip to content

Commit

Permalink
morello: Enable the Benchmark ABI for kernel builds.
Browse files Browse the repository at this point in the history
Add the GENERIC-MORELLO-PURECAP-BENCHMARK{-NODEBUG} configs.
  • Loading branch information
qwattash committed May 8, 2024
1 parent 976f21a commit 78edb47
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions sys/arm64/conf/GENERIC-MORELLO-PURECAP-BENCHMARK
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# GENERIC-MORELLO-BENCHMARKABI -- Generic kernel configuration file for CheriBSD/Morello benchmark ABI kernel
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (https://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#

include "GENERIC-MORELLO-PURECAP"

ident GENERIC-MORELLO-BENCHMARKABI

machine arm64 aarch64cb
4 changes: 4 additions & 0 deletions sys/arm64/conf/GENERIC-MORELLO-PURECAP-BENCHMARK-NODEBUG
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include "GENERIC-MORELLO-BENCHMARKABI"
include "../../conf/std.nodebug"

ident GENERIC-MORELLO-BENCHMARKABI-NODEBUG
5 changes: 5 additions & 0 deletions sys/conf/kern.mk
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ CFLAGS+= -Xclang -morello-vararg=new -Xclang -morello-bounded-memargs
.endif

.if ${MACHINE_ARCH:Maarch*c*}
.if ${MACHINE_ARCH:Maarch*cb}
CFLAGS+= -mabi=purecap-benchmark
.else
CFLAGS+= -mabi=purecap
.endif
.else
CFLAGS+= -mabi=aapcs
.endif
Expand Down Expand Up @@ -353,6 +357,7 @@ CCLDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W}
# Set target-specific linker emulation name.
LD_EMULATION_aarch64=aarch64elf
LD_EMULATION_aarch64c=aarch64elf
LD_EMULATION_aarch64cb=aarch64elf
LD_EMULATION_amd64=elf_x86_64_fbsd
LD_EMULATION_arm=armelf_fbsd
LD_EMULATION_armv6=armelf_fbsd
Expand Down

0 comments on commit 78edb47

Please sign in to comment.