From patchwork Fri Jul 15 22:16:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 72147 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21000qga; Fri, 15 Jul 2016 15:16:58 -0700 (PDT) X-Received: by 10.66.180.80 with SMTP id dm16mr33486967pac.47.1468621018767; Fri, 15 Jul 2016 15:16:58 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id x190si2716857pfd.105.2016.07.15.15.16.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2016 15:16:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 820E41A1F2F; Fri, 15 Jul 2016 15:17:44 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4DEEC1A1F29 for ; Fri, 15 Jul 2016 15:17:43 -0700 (PDT) Received: by mail-wm0-x230.google.com with SMTP id q128so2748669wma.1 for ; Fri, 15 Jul 2016 15:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZxZCyiEingPvPSDhpx7LvwXhGv3grlKPURXbJKb0mSg=; b=kLoV5KBeHZNeDBtvxkCNIaQZESWAt+ucHlVv2TpI5QxGGZToWMr9yS6SRiGhEcC9jh uSSpC7zs8bbLedWDUaZ9v+dn95/sVHr55JXItlTlcRrz2cUkup096FFXuW4kv9rb9eSD uZe+MGyVVuLI7nXUJZPR/fyumDYRxDK/eC1yE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZxZCyiEingPvPSDhpx7LvwXhGv3grlKPURXbJKb0mSg=; b=YnkyTxKu1LbyR/70ettBFJ4niWi0IgSq43lbqfMmfsPfy1X3QgzKRrWun003boZmty fiLhKd6OyqtgLya0NIK8BPPLxqrm/e0UOCRvKyqXjlkOg2uFgrizM6LiNZ3qXqNxYSt/ orv136ffg/MXxREkhmbzRtvbjf1U3EvxQTnpg1GTo1Cz1dnR+dLB5KtWv3L6Peb48gDp KE+mpB21jTdn8fNlyI7rWNEuTtNE++Tc8GWBJAeZM1sDQODMB//J0wN+W37PHXG8RSmG vwUbrUKoGl3QOGUVmCeIVOpUO4HAtx+YPeE6o4ppCTi28yWO45qWyy2s8WkD1ez2Fd8S 6AzQ== X-Gm-Message-State: ALyK8tK/iXuT3MRTYD/8jK5zIZXSTo6uMlQF4UExSjTxiqQuZvRIbLAu6pnYuSpaH0ZaBTj2 X-Received: by 10.194.117.72 with SMTP id kc8mr2566991wjb.30.1468621014596; Fri, 15 Jul 2016 15:16:54 -0700 (PDT) Received: from localhost.localdomain ([188.203.148.129]) by smtp.gmail.com with ESMTPSA id kr1sm2736108wjc.46.2016.07.15.15.16.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 15:16:53 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com, afish@apple.com, liming.gao@intel.com, steven.shi@intel.com, yonghong.zhu@intel.com, michael.d.kinney@intel.com, jordan.l.justen@intel.com Date: Sat, 16 Jul 2016 00:16:07 +0200 Message-Id: <1468620971-5960-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468620971-5960-1-git-send-email-ard.biesheuvel@linaro.org> References: <1468620971-5960-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 1/5] MdePkg: avoid __builtin_unreachable() on GCC v4.4 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: bruce@cran.org.uk, pbonzini@redhat.com, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" GCC v4.4 does not implement __builtin_unreachable(), so avoid using it when building with this version or earlier. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Tested-by: Laszlo Ersek --- MdePkg/Include/Base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 858385828d93..7dbf9386b6b4 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -89,10 +89,11 @@ VERIFY_SIZE_OF (CHAR16, 2); // warnings. // #ifndef UNREACHABLE - #ifdef __GNUC__ + #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) /// /// Signal compilers and analyzers that this call is not reachable. It is /// up to the compiler to remove any code past that point. + /// Not implemented by GCC 4.4 or earlier. /// #define UNREACHABLE() __builtin_unreachable () #elif defined (__has_feature)