From patchwork Thu Sep 7 16:12:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Burgess X-Patchwork-Id: 18978 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CF516C0F1B for ; Thu, 7 Sep 2023 16:21:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 45227628EC; Thu, 7 Sep 2023 18:21:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694103683; bh=TnaDc4CcDOsunXGKpvmbUM/W5kZf+xmPdWiSaOuUk78=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=CGS3UQzD/Jx0qw+uOs4kQlBNCjLWpMBEugKuXz2U2cExkmF7nOfyKEbB7xYd+38L6 n5G0sT/qsEwjai2I8kcc6feq6XqO0abIyFtB5rvf89fo/PxGqu4tIAF+koW7k0jbt+ XnGf3Vj/0PRIMlv+ru4hzgLch8zsrZ5EW2bTEN15FF+sXYvQmou1a+/5HNkoGe/Tfz gcXE5envRrASz3I2qiJ7n0aeeKVsIAFHY8Blg0WldSxR3dRtv1aiiPaRksRnNGg48Q OCkeZL1HuWpQs6tqaNzWncSqhAVqGy9OXtJVqOh6y+qXSHwM+NkvBmZlTqI8Pq9h8F 1AF2jXVOU5TsA== Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B2546627DF for ; Thu, 7 Sep 2023 18:13:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="Rv5xBnTo"; dkim-atps=neutral Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-58cbf62bae8so12738267b3.3 for ; Thu, 07 Sep 2023 09:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1694103195; x=1694707995; darn=lists.libcamera.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=1Ap1qRpiF3VPmfIEnUdkfD275HjbYDD84stF1Ks5T+0=; b=Rv5xBnToulvmAxjcLASg+JHkyRswCSLqZo9GnXmMzVQpBrD5JoeUPclmOvltxf+HdF PR7rg/V4RcbMhKToqFlRC5sIu5xEPe6aP2W7TrID3IViEKdg/fbplWmBsR+6O+sfdn8k aCfv26WXqEpbduz8KDJaIMDixkmlY+k16DzlZ6Z2L20hnuChlkDVVKtHktbYGwwgzTy2 nZTBo0QkLNgP9jHANLyQaqqCFOLgX+6c6BaYT4Mg7sWFiSSgTpmL7gqkrAsxxXDWDjSH jLNQauWF9HP5BCzBq8y06fcSBkXe2R0WoqTEPU7B7+b5vZ21oSElTvA9J4zYBdkDYYmW 9sWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694103195; x=1694707995; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1Ap1qRpiF3VPmfIEnUdkfD275HjbYDD84stF1Ks5T+0=; b=GSOTqc774aT/b/vpMIr09IsjL5hq7zRohl1HZ1IYyB8QpisCH1ECtj9QoYBWOD6q4W Bmp1ykIUbz7uRKIaa+MpT7FwOj6b+n69rWNFr85/2h+E2T0VpuIaXdSc5l9xvuPyOV1S ZWAGVc9HtYziKFzdl91zgZ9eHGRJRorq9NmTW27h7eWCdQO9Z5zmC2yVGXY2S9MNYQn2 VW5MTu4J60oq+mkvkm2vcZ37Xy82bQbNPkxTt+sDQNBpEYTrZJfqiAetCBDsgDGg4ii9 iW872ztgDExkECUw/ckkjOMNkbPYFLOylJ47rL4H3PsgDAxayIbdPob+mKGvuIrsm4CR qckA== X-Gm-Message-State: AOJu0Yys918DzS1uLvFVjNvDDjuyo3+XA3Lm5ADJbGP9JYdNXQ6JuGhM CoNrJOGCramaXqQM6RVTpo5sd8T2dRcQiRYxlrfPRhFf3rZ0m7QtM9Ane60yq8cLxkBff2Pti8E eNwUy4VAPtbnbZwmhP4huSKdwEra8ImqpVLyRBbo7StgLH+tXTKfY0jyBWwHd77sURRrR++1Nbg == X-Google-Smtp-Source: AGHT+IH1b32n+SWUVnDReMFiXVZWrDMClshlfFIRz7+rSVJoKKX7npKa4aYAInjqVsn+M4e95wCPK4Su X-Received: from gbivco.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:22d5]) (user=gbiv job=sendgmr) by 2002:a05:6902:1781:b0:d80:896:f16c with SMTP id ca1-20020a056902178100b00d800896f16cmr27524ybb.9.1694103195421; Thu, 07 Sep 2023 09:13:15 -0700 (PDT) Date: Thu, 7 Sep 2023 10:12:59 -0600 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.283.g2d96d420d3-goog Message-ID: <20230907161259.2942654-1-gbiv@google.com> To: libcamera-devel@lists.libcamera.org X-Mailman-Approved-At: Thu, 07 Sep 2023 18:21:22 +0200 Subject: [libcamera-devel] [PATCH] meson: Don't set _FORTIFY_SOURCE for ChromeOS 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-Patchwork-Original-From: George Burgess IV via libcamera-devel From: George Burgess Reply-To: George Burgess IV Cc: George Burgess IV Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" ChromeOS is moving to a platform default of `_FORTIFY_SOURCE=3`, and this definition conflicts with that: ``` :4:9: error: '_FORTIFY_SOURCE' macro redefined [-Werror,-Wmacro-redefined] ``` Rather than adding logic to keep up with their local configuration, it seems best to leave setting _FORTIFY_SOURCE on ChromeOS up to ChromeOS. Signed-off-by: George Burgess IV Reviewed-by: Jacopo Mondi --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 7959b538..109923ac 100644 --- a/meson.build +++ b/meson.build @@ -101,7 +101,8 @@ if cc.get_id() == 'clang' # Turn _FORTIFY_SOURCE by default on optimised builds (as it requires -O1 # or higher). This is needed on clang only as gcc enables it by default. - if get_option('optimization') != '0' + # CrOS sets their preferred FORTIFY level in platform-level CFLAGS. + if get_option('optimization') != '0' and get_option('android_platform') != 'cros' common_arguments += [ '-D_FORTIFY_SOURCE=2', ]