-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
Trying to build for Raspberry pi4, with ARM based board. Error in the Makefile for the CFLAG option.
ubuntu@pi4Dragon:~/hackrf-spectrum-analyzer/src/hackrf-sweep$ make
# format the src # clang-format --style=file:../../../.clang-format -i hackrf_sweep.c
(cd lib/hackrf/ && git reset --hard v2024.02.1 && git apply < ../../src-c/0001-hackrf_sweep-to-library-conversion-v2024.02.1.patch)
HEAD is now at 18b485e3 Merge pull request #1419 from greatscottgadgets/release
Creating directories
gcc -DHACKRF_SWEEP_AS_LIBRARY -c -fPIC -fdata-sections -ffunction-sections -O2 -march=x86-64 -Ilib/hackrf/host/libhackrf/src -Ilib/libusb-1.0.21/include/libusb-1.0 lib/hackrf/host/libhackrf/src/hackrf.c -o obj/lib/hackrf/host/libhackrf/src/hackrf.c.o
cc1: error: unknown value ‘x86-64’ for ‘-march’
cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a armv8.7-a armv8.8-a armv8-r armv9-a armv9.1-a armv9.2-a armv9.3-a native
make: *** [Makefile:138: obj/lib/hackrf/host/libhackrf/src/hackrf.c.o] Error 1
Doing research it appears that I wanted to update the CFLAG for the proper setting, so I update the line to:
?= -march=armv8-a
Adding the ?= as "Lazy Set If Absent"... and it worked....
So, @pavsa not sure If I hack your makefile into a mess to make it for this Pi, or this is ok, with your understanding for the ARM 64 Pi 4.
Please update with your understanding.
Thank You!
Metadata
Metadata
Assignees
Labels
No labels