Skip to content

Commit c74bbd6

Browse files
committed
Add arch arm64 compiler options
1 parent e427a09 commit c74bbd6

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

lib/Makefile

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@ FF_KNI=1
2424
#FF_IPFW=1
2525

2626
ifeq ($(FF_DPDK),)
27-
FF_DPDK=${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
27+
ifeq (${MACHINE_CPUARCH},aarch64)
28+
FF_DPDK=${TOPDIR}/dpdk/build
29+
else
30+
#FF_DPDK=${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
31+
endif
2832
endif
2933

3034
ifdef RTE_SDK
31-
FF_DPDK=${RTE_SDK}/x86_64-native-linuxapp-gcc
35+
ifeq (${MACHINE_CPUARCH},aarch64)
36+
FF_DPDK=${RTE_SDK}/build
37+
else
38+
#FF_DPDK=${RTE_SDK}/x86_64-native-linuxapp-gcc
39+
endif
3240
endif
3341

3442
DPDK_CFLAGS= -Wall -Werror -include ${FF_DPDK}/include/rte_config.h
@@ -92,6 +100,13 @@ endif
92100

93101
endif
94102

103+
#
104+
# fix the MACHINE_CPUARCH to match the FreeBSD directory name
105+
#
106+
ifeq (${MACHINE_CPUARCH},aarch64)
107+
MACHINE_CPUARCH=arm64
108+
endif
109+
95110

96111
#
97112
# Distilled from FreeBSD src/sys/conf/Makefile.i386
@@ -262,15 +277,27 @@ KERN_MHEADERS+= \
262277
KERN_MSRCS+= \
263278
linker_if.m
264279

265-
280+
ifeq (${MACHINE_CPUARCH},arm64)
266281
LIBKERN_SRCS+= \
267282
bcd.c \
268283
crc32.c \
269284
inet_ntoa.c \
270285
jenkins_hash.c \
271286
strlcpy.c \
272287
strnlen.c \
273-
zlib.c
288+
zlib.c \
289+
fls.c \
290+
flsl.c
291+
else
292+
LIBKERN_SRCS+= \
293+
bcd.c \
294+
crc32.c \
295+
inet_ntoa.c \
296+
jenkins_hash.c \
297+
strlcpy.c \
298+
strnlen.c \
299+
zlib.c
300+
endif
274301

275302

276303
MACHINE_SRCS+= \

mk/kern.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ CFLAGS+=
101101
INLINE_LIMIT?= 8000
102102
endif
103103

104+
ifeq (${MACHINE_CPUARCH},arm64)
105+
INLINE_LIMIT?= 15000
106+
endif
107+
104108
#
105109
# GCC SSP support
106110
#

0 commit comments

Comments
 (0)