From patchwork Tue Aug 7 15:32:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Kundr=C3=A1t?= X-Patchwork-Id: 954567 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=none dis=none) header.from=cesnet.cz Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=cesnet.cz header.i=@cesnet.cz header.b="DmvnqYOh"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41lJY25rK5z9rvt for ; Wed, 8 Aug 2018 01:37:10 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8719382066; Tue, 7 Aug 2018 15:37:08 +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 hN6FpR+cU8WK; Tue, 7 Aug 2018 15:37:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6D9EB820C3; Tue, 7 Aug 2018 15:37:07 +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 078BE1C1316 for ; Tue, 7 Aug 2018 15:37:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 043B584754 for ; Tue, 7 Aug 2018 15:37:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Non-encoded 8-bit data (char C3 hex): Cc: S\303\251bastien Szyman[...] Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kgjf-DbhftYj for ; Tue, 7 Aug 2018 15:37:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by whitealder.osuosl.org (Postfix) with ESMTPS id 10FF584763 for ; Tue, 7 Aug 2018 15:37:03 +0000 (UTC) Received: from localhost (unknown [IPv6:2001:718:1:2c:7d03:949b:de91:81b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 64006400063; Tue, 7 Aug 2018 17:37:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1533656220; bh=xwVbm+yEEVIrfHH751KZ/ttd+l47S8R5gYtSYnAL7pU=; h=Resent-Date:Resent-From:Resent-To:Resent-Cc:From:Date:Subject:To: Cc; b=DmvnqYOh2fmI6U9ZwR8J46MtAxEMOsh5mAqI4rtC01Pky+GhB9gy4s6MeAHeJBUHQ 0NOeOsq9sCVpWs1u7AK3EYt7QFdleJNvJBprohY6vQyJA9vxLSqNuDdVd9sqAiGCNP 9SLibLygas40hpcYiebEvcIqNxds9XfpFOoHtZck= Resent-Date: Tue, 07 Aug 2018 17:37:00 +0200 Resent-Message-ID: Resent-From: =?iso-8859-1?q?Jan_Kundr=E1t?= Resent-To: Resent-Cc: =?iso-8859-1?q?S=E9bastien_Szymanski?= Message-Id: <48287dd12fcef0440cc49ff86343867d6cb8429e.1533656185.git.jan.kundrat@cesnet.cz> From: =?utf-8?q?Jan_Kundr=C3=A1t?= Date: Tue, 7 Aug 2018 17:32:51 +0200 MIME-Version: 1.0 To: buildroot@busybox.net Subject: [Buildroot] [PATCH] mmc-utils: Rely on our own _FORTIFY_SOURCE X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Upstream always forced _FORTIFY_SOURCE=2. At first, I tried changing their flags to undefine that macro first, but that did not work well. This patch ensures that the package always respects our toolchain settings, even in cases where we are not fortifying the build. This fixes a build failure where the mmc-utils package failed to build with, e.g., BR2_FORTIFY_SOURCE_1: :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] :0:0: note: this is the location of the previous definition Signed-off-by: Jan Kundrát --- ...on-the-build-env-for-_FORTIFY_SOURCE.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/mmc-utils/0001-Rely-on-the-build-env-for-_FORTIFY_SOURCE.patch diff --git a/package/mmc-utils/0001-Rely-on-the-build-env-for-_FORTIFY_SOURCE.patch b/package/mmc-utils/0001-Rely-on-the-build-env-for-_FORTIFY_SOURCE.patch new file mode 100644 index 0000000000..b099efa6c4 --- /dev/null +++ b/package/mmc-utils/0001-Rely-on-the-build-env-for-_FORTIFY_SOURCE.patch @@ -0,0 +1,27 @@ +From 0c893e6f272351572548264bf423208a7b76bb16 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= +Date: Tue, 7 Aug 2018 17:29:35 +0200 +Subject: [PATCH] Rely on the build env for _FORTIFY_SOURCE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jan Kundrát +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index aa27ff2..a3890b2 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,5 @@ + CC ?= gcc +-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 ++AM_CFLAGS = -D_FILE_OFFSET_BITS=64 + CFLAGS ?= -g -O2 + objects = \ + mmc.o \ +-- +2.17.1 +