[From nobody Tue Nov 24 12:03:08 2026
Received: (at submit) by bugs.debian.org; 19 Apr 2025 07:23:03 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
 (2021-04-09) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-14.8 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,FOURLA,HAS_PACKAGE,RCVD_IN_DNSWL_MED,
 SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no
 version=3.4.6-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 23; hammy, 150; neutral, 66; spammy,
 0. spammytokens: hammytokens:0.000-+--armhf, 0.000-+--reinholdtsen,
 0.000-+--Reinholdtsen, 0.000-+--H*RU:vuizook.err.no,
 0.000-+--H*r:vuizook.err.no
Return-path: &lt;pere@hungry.com&gt;
Received: from vuizook.err.no ([2a02:20c8:2640::2]:49438)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.94.2) (envelope-from &lt;pere@hungry.com&gt;) id 1u62XX-00AE3w-38
 for submit@bugs.debian.org; Sat, 19 Apr 2025 07:23:03 +0000
Received: from [2a02:fe1:180:7c00:3cca:aff:fe28:58e0]
 (helo=hjemme.reinholdtsen.name)
 by vuizook.err.no with smtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96)
 (envelope-from &lt;pere@hungry.com&gt;) id 1u62XL-00BBPl-1X;
 Sat, 19 Apr 2025 07:22:54 +0000
Received: (nullmailer pid 786724 invoked by uid 10001);
 Sat, 19 Apr 2025 07:22:49 -0000
From: Petter Reinholdtsen &lt;pere@hungry.com&gt;
To: submit@bugs.debian.org
Subject: llc: Fail to build with -march=bpf on armhf (error: unknown directive)
Date: Sat, 19 Apr 2025 09:22:49 +0200
Message-ID: &lt;sa64iykty2e.fsf@hjemme.reinholdtsen.name&gt;
MIME-Version: 1.0
Content-Type: text/plain
Delivered-To: submit@bugs.debian.org

Package: llvm-19
Version: 1:19.1.7-3
Affects: src:opensnitch

When trying to build opensnitch on armhf, the ebpf modules fail to build
with the following error:

make[2]: Entering directory '/home/pere/opensnitch-1.6.8/ebpf_prog'
clang -I. -I/usr/src/linux-headers-6.12.22-armmp//arch/arm/include/generated/ -I/usr/src/linux-headers-6.12.22-armmp//include -include /lib/modules/6.12.22-armmp/source/include/linux/kconfig.h -I/lib/modules/6.12.22-armmp/source/include -I/lib/modules/6.12.22-armmp/source/include/uapi -I/lib/modules/6.12.22-armmp/source/include/generated/uapi -I/lib/modules/6.12.22-armmp/source/arch/arm/include -I/lib/modules/6.12.22-armmp/source/arch/arm/include/generated -I/lib/modules/6.12.22-armmp/source/arch/arm/include/uapi -I/lib/modules/6.12.22-armmp/source/arch/arm/include/generated/uapi -I/lib/modules/6.12.22-armmp/source/tools/testing/selftests/bpf/ -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign -D__TARGET_ARCH_arm -Wno-compare-distinct-pointer-types &quot;-D__LINUX_ARM_ARCH__=7&quot; -Wno-gnu-variable-sized-type-not-at-end -Wno-address-of-packed-member -Wno-tautological-compare -Wno-unknown-warning-option -g -O2 -emit-llvm -c opensnitch.c -o opensnitch.o.partial
llc -march=bpf -mcpu=generic -filetype=obj -o opensnitch.o opensnitch.o.partial
&lt;inline asm&gt;:1:1: error: unknown directive
.syntax unified
^

The problem is the -march=bpf option on the command line.  Without it,
the code build, but is not a eBPF module. :(

Because of this, I had to exclude armhf from building the ebpf modules
in debian/rules.  To test for yourself, update d/rules and add armhf to
the list of architectures with EBPF enabled.

The same code build with llvm-19 on arm64 and amd64.

-- 
Happy hacking
Petter Reinholdtsen
]