From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 16 Jan 2025 17:09:57 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tYSRR-000etF-0L for lore@lore.pengutronix.de; Thu, 16 Jan 2025 17:09:57 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tYSRR-00021I-Ao; Thu, 16 Jan 2025 17:09:57 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tYSR2-0001iO-Bf; Thu, 16 Jan 2025 17:09:32 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tYSR2-000HTF-0Y; Thu, 16 Jan 2025 17:09:32 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tYSR2-001n3T-0P; Thu, 16 Jan 2025 17:09:32 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Thu, 16 Jan 2025 17:09:32 +0100 Message-Id: <20250116160932.426888-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217084318.2038729-1-ada@thorsis.com> References: <20241217084318.2038729-1-ada@thorsis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] libgmp: Override CFLAGS X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Alexander Dahl Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as d70a3245d185a3a1bb4620f0be5191b89affb4e3. Michael [sent from post-receive hook] On Thu, 16 Jan 2025 17:09:32 +0100, Alexander Dahl wrote: > Mainline libgmp autoconfs tries to be smart and uses > > -O2 -pedantic -fomit-frame-pointer -march=armv4 -mfloat-abi=softfp > > which leads to `nft list ruleset` crashing, when nft uses some printf > function of libgmp. > > The -march=armv4 -mfloat-abi=softfp seems to create arm assembler code > with illegal instructions. Don't know if these -march and -mfloat-abi > options make sense at all when cross-compiling anyways? > > The new options allow for debugging and nft does not crash anymore. > > Link: https://lore.ptxdist.org/ptxdist/20241210-pesticide-garnet-ef57e562fa17@thorsis.com/T/#u > Signed-off-by: Alexander Dahl > Message-Id: <20241217084318.2038729-1-ada@thorsis.com> > Signed-off-by: Michael Olbrich > > diff --git a/rules/libgmp.make b/rules/libgmp.make > index 3ed6faaa33de..bf6b88d7c84f 100644 > --- a/rules/libgmp.make > +++ b/rules/libgmp.make > @@ -37,6 +37,11 @@ LIBGMP_LICENSE_FILES := \ > # autoconf > # > LIBGMP_CONF_TOOL := autoconf > +# libgmp autoconf guesses target arch and sets CFLAGS to options leading > +# to crashes on at least armv5te, so override those CFLAGS with working > +# ones, replacing the wrong ones set by libgmp in the first place > +LIBGMP_CONF_ENV := \ > + CFLAGS='-O2 -pedantic -g' > LIBGMP_CONF_OPT := \ > $(CROSS_AUTOCONF_USR) \ > --disable-assert \