[Buildroot] [PATCH 1/1] package/fio: remove native build to fix crashes

Jens Maus mail at jens-maus.de
Sun Sep 17 20:29:17 UTC 2023


Per default, the fio package uses the "-march=native" GCC option. This,
however can result in "illegal instructions" when fio is compiled in a
cross compile environment where the target machine will have a different
cpu feature set than the compilation environment. Thus we make sure fio
will not use that compiler option by adding --disable-native to
FIO_OPTS.

Signed-off-by: Jens Maus <mail at jens-maus.de>
---
 package/fio/fio.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/fio/fio.mk b/package/fio/fio.mk
index b1763d6c73..f6e7b036bb 100644
--- a/package/fio/fio.mk
+++ b/package/fio/fio.mk
@@ -9,7 +9,7 @@ FIO_SITE = http://brick.kernel.dk/snaps
 FIO_LICENSE = GPL-2.0
 FIO_LICENSE_FILES = COPYING MORAL-LICENSE
 
-FIO_OPTS = --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)"
+FIO_OPTS = --disable-native --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)"
 
 ifeq ($(BR2_PACKAGE_LIBAIO),y)
 FIO_DEPENDENCIES += libaio
-- 
2.34.1




More information about the buildroot mailing list