]> git.ipfire.org Git - people/ummeegge/ipfire-2.x.git/commitdiff
efivar: fix build for correct cpu
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 28 Feb 2023 18:45:15 +0000 (19:45 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 4 Mar 2023 14:02:05 +0000 (14:02 +0000)
the makefile add --march=native which optimize the code to the
cpu of the buildhost which can result in unsupported instructions on
other machines.

lfs/efivar
src/patches/efivar-38_remove_march=native.patch [new file with mode: 0644]

index 9c69c688f3ff94776547c0b1af066e41da69ec21..7bd26fad72cbfb011f9aa81de05886b2fd05c4cb 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2023  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -72,6 +72,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
 
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/efivar-37-compile-fixes-3.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/efivar-38_remove_march=native.patch
 
        # fix an issue in Makefile causing the package to be rebuilt during installation
        # obtained from https://linuxfromscratch.org/blfs/view/11.1/postlfs/efivar.html
diff --git a/src/patches/efivar-38_remove_march=native.patch b/src/patches/efivar-38_remove_march=native.patch
new file mode 100644 (file)
index 0000000..7c22576
--- /dev/null
@@ -0,0 +1,18 @@
+diff -Naur efivar-38.org/src/include/defaults.mk efivar-38/src/include/defaults.mk
+--- efivar-38.org/src/include/defaults.mk      2022-01-14 20:29:35.000000000 +0100
++++ efivar-38/src/include/defaults.mk  2023-02-23 19:38:12.493736490 +0100
+@@ -71,12 +71,8 @@
+                  -Wl,--version-script=$(MAP) \
+                  $(call family,SOFLAGS)
+-HOST_ARCH=$(shell uname -m)
+-ifneq ($(HOST_ARCH),ia64)
+-      HOST_MARCH=-march=native
+-else
+-      HOST_MARCH=
+-endif
++HOST_MARCH=
++
+ HOST_CPPFLAGS ?= $(CPPFLAGS)
+ override _HOST_CPPFLAGS := $(HOST_CPPFLAGS)
+ override HOST_CPPFLAGS = $(_HOST_CPPFLAGS) \