From patchwork Tue Feb 28 18:45:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Fitzenreiter X-Patchwork-Id: 6644 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4PR5sP364Hz3wk1 for ; Tue, 28 Feb 2023 18:45:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4PR5sJ6pmMzHs; Tue, 28 Feb 2023 18:45:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4PR5sM1qt6z2yWN; Tue, 28 Feb 2023 18:45:27 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4PR5sK2ptxz2y1X for ; Tue, 28 Feb 2023 18:45:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4PR5sG0GCVz5y; Tue, 28 Feb 2023 18:45:21 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1677609922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0XkDIZuS+rG3Fhx2i4w8lbINOU1qc1cdoBf0e/h7xa4=; b=3sPI7PKEed7l9yk2eQ2/P0cFqNhn0USoDBnK1cM6TlhClinih07cV24V11DfEDSZYSDHVD QO8BR+1wu/9Pk4Cw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1677609922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0XkDIZuS+rG3Fhx2i4w8lbINOU1qc1cdoBf0e/h7xa4=; b=Zdcybhu8UD+5TbvEhJVRM/mKYSU5OI+mMxLc9Uw5TEIipoOWIWpY5XPvMS79v+tRpZdjtk fEIWFWoxhLVAcxaMnw2qhFoLGM7R6ZAW8Auu4liI+RuaVHk+VhAyYwja4pmPwQqtxAw8oI wCczQTPVbYZpt35aVHw5Y/90P/eYp12oglTZGGFEvpsZ1VfNtXewc6sumFNopTgyZp8XW2 451PNcFuIBCt8hdp49b0QhIXTcDCCf+nJHG0xeHc091eahgnLH6kQcEAx8ilFqzil+Qfbf 36LHz+zQ3pcD2RHWFsKzt5NFmQuOgDRE6ph9sigbF42QZPg8bT+3GCCmiMLHDQ== From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH] efivar: fix build for correct cpu Date: Tue, 28 Feb 2023 19:45:15 +0100 Message-Id: <20230228184515.14471-1-arne_f@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arne Fitzenreiter Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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 | 3 ++- .../efivar-38_remove_march=native.patch | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/patches/efivar-38_remove_march=native.patch diff --git a/lfs/efivar b/lfs/efivar index 70ed90170..ee278c50c 100644 --- a/lfs/efivar +++ b/lfs/efivar @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2023 IPFire Team # # # # 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 # @@ -73,6 +73,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 index 000000000..7c22576e6 --- /dev/null +++ b/src/patches/efivar-38_remove_march=native.patch @@ -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) \