From patchwork Wed Aug 5 12:41:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nosthoff X-Patchwork-Id: 1341220 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=heine.tech Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=heine.tech header.i=@heine.tech header.a=rsa-sha256 header.s=dkim header.b=VL5VeA7A; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BMB9C5mVWz9sPB for ; Wed, 5 Aug 2020 22:42:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 537B888175; Wed, 5 Aug 2020 12:42:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3VBwsaNF2zVz; Wed, 5 Aug 2020 12:42:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3FD3188158; Wed, 5 Aug 2020 12:42:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9076B1BF34E for ; Wed, 5 Aug 2020 12:42:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8C63F876E1 for ; Wed, 5 Aug 2020 12:42:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pSAFC2cxz+Pg for ; Wed, 5 Aug 2020 12:42:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.heine.tech (mail.heine.tech [195.201.24.99]) by whitealder.osuosl.org (Postfix) with ESMTPS id 487478765E for ; Wed, 5 Aug 2020 12:42:35 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 89A25181951; Wed, 5 Aug 2020 14:42:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heine.tech; s=dkim; t=1596631350; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=RpaRAbDd9xGjmCFgSXfzGFS+S+EexVvR/FwxsWhP81c=; b=VL5VeA7A31H51VLkRQGboyxJfYRMPixbyfv9zy3AI9RFkqfUunajbZIiGEjDmdDzNJXc9L qWyOdDR5DaFIU9xlJ1U4Y90bbQpVJ4qGI5+6CXtkoNYgCgKEoCp0iwUy09jQlGSHsrG5OX bvKEI6e9d6BwZ7VfMhX/ZXFrzpQt4ZM= From: Michael Nosthoff To: buildroot@buildroot.org Date: Wed, 5 Aug 2020 14:41:32 +0200 Message-Id: <20200805124132.559272-1-buildroot@heine.tech> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 Subject: [Buildroot] [PATCH] package/boost: fixup Optimization flag in boost build X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Nosthoff Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When building with Boost Build the CXXFLAGS are extended depending on the optimization level set. When not defined explicitly the optimization level depends on the . For release it's 'speed' and for debug it's set to 'off' These flags overwrite the -O flag passed in with TARGET_CXXFLAGS as it is appended when calling g++. This commit sets the Optimization flags generated by Boost Build to the value of TARGET_OPTIMIZATION no matter what level is used. Signed-off-by: Michael Nosthoff --- package/boost/boost.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/boost/boost.mk b/package/boost/boost.mk index ef638fc9df..1fcb264062 100644 --- a/package/boost/boost.mk +++ b/package/boost/boost.mk @@ -134,6 +134,11 @@ define BOOST_CONFIGURE_CMDS (cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS)) echo "using gcc : `$(TARGET_CC) -dumpversion` : $(TARGET_CXX) : \"$(BOOST_TARGET_CXXFLAGS)\" \"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam echo "" >> $(@D)/user-config.jam + echo "import modules ;" >> $(@D)/user-config.jam + echo "modules.poke gcc : flags gcc.compile OPTIONS off : $(TARGET_OPTIMIZATION) ;" >> $(@D)/user-config.jam + echo "modules.poke gcc : flags gcc.compile OPTIONS speed : $(TARGET_OPTIMIZATION) ;" >> $(@D)/user-config.jam + echo "modules.poke gcc : flags gcc.compile OPTIONS space : $(TARGET_OPTIMIZATION) ;" >> $(@D)/user-config.jam + echo "" >> $(@D)/user-config.jam endef define BOOST_BUILD_CMDS