From patchwork Thu Nov 21 04:19:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2343 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 089436136C for ; Thu, 21 Nov 2019 05:19:27 +0100 (CET) Received: from pendragon.mediatek.inc (unknown [124.219.31.93]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 69CFD97D for ; Thu, 21 Nov 2019 05:19:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1574309966; bh=hBOSNQUW7pzwMaYstQQM/a0gKQ2pSrY2tgCpDPaJCDg=; h=From:To:Subject:Date:From; b=quXVCDMq964xNMpx74Hi5Zv2auq3uzgYUIR7nor6TW4otlJL7pdGpHgct4lqVRW7S aEu0W7e8JEtKqKAeqQ+lvMLFtxeR2DG0NfBkSwZL3+Vc7FnBtlt0Ayk9klzJ/VuhBU hevRTK0psaVKlAcDd+fo9bwFPTKrgena+fsmQsWM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 21 Nov 2019 06:19:13 +0200 Message-Id: <20191121041913.16202-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] meson: Really define _FORTIFY_SOURCE for optimised builds X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2019 04:19:27 -0000 Commit 965c5bf7fbf5 ("meson: Define _FORTIFY_SOURCE for optimised builds") tried to define _FORTIFY_SOURCE for optimised builds with clang, but updated the common_arguments after it was used. This resulted in the _FORTIFY_SOURCE option not being applied. Fix it. Fixes: 965c5bf7fbf5 ("meson: Define _FORTIFY_SOURCE for optimised builds") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 72ad7c8b493b..0a222ba96dcb 100644 --- a/meson.build +++ b/meson.build @@ -35,8 +35,8 @@ common_arguments = [ '-include', 'config.h', ] -c_arguments = common_arguments -cpp_arguments = common_arguments +c_arguments = [] +cpp_arguments = [] if cc.get_id() == 'clang' # Turn _FORTIFY_SOURCE by default on optimised builds (as it requires -O1 @@ -56,6 +56,9 @@ if cc.get_id() == 'clang' endif endif +c_arguments += common_arguments +cpp_arguments += common_arguments + add_project_arguments(c_arguments, language : 'c') add_project_arguments(cpp_arguments, language : 'cpp') add_project_link_arguments(cpp_arguments, language : 'cpp')