From patchwork Sun Jul 17 10:34:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 72167 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp175481qga; Sun, 17 Jul 2016 03:34:56 -0700 (PDT) X-Received: by 10.66.101.1 with SMTP id fc1mr46694391pab.84.1468751695825; Sun, 17 Jul 2016 03:34:55 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id o20si3437609pfi.154.2016.07.17.03.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jul 2016 03:34:55 -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 9250E1A1E1B; Sun, 17 Jul 2016 03:35:43 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 CB4BD1A1DFA for ; Sun, 17 Jul 2016 03:35:41 -0700 (PDT) Received: by mail-wm0-x234.google.com with SMTP id i5so81747395wmg.0 for ; Sun, 17 Jul 2016 03:34:53 -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=N22T0xXmv4AAqB5eruEGU8yrV8xxu9iTJHdJQRtj3oAIRsGIz0nL2oKRRBmb5WwCvy 0SQc8aLvZDg1sn0gxFRjC5tg2NV9j9JU/qm0KOzkcpFWvjQ3fuJmk6wmTImcFMh55r5l 7BRlZkaKzjiOIs6WEhN2zDhSuu/BvD509FUBA= 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=XzWPQY/TXanxoetIFB+k4TfYDvB+7jedZGyNS3yk0QQABISuRzC78dusdL4u4jJCIq 5IAtucvV9g326MWTYBz2Do4KENsnnp0dBz0qAsrzLSJYgbjNgLbxmZ+vdaukAJIway19 sLlsJcO+7V6B/cG/PzmahlhbplsjJb3oHagDSzHzGRc1+8788gdUMekqrBC7T7qt1Fou eEOgfPF0g2m+5csBGTIkfTwehqeo5xAirDhUCuEqcRg8NgxPlrZ7/z2OJY81N0f0BKDG aomZhXvdn+uGag3PkFPJaJw6D9Nx8R7tIOXjozZjrqZaiIwKmt2cqdhBaBrP4NB9/k4u f73A== X-Gm-Message-State: ALyK8tKDpu7buPcWKy2XegM8DtSqJNVy2WCoMPwOUP8UU3oYJItVnTBA+gPszbNzVW7BnpL4 X-Received: by 10.28.107.144 with SMTP id a16mr32094889wmi.75.1468751691994; Sun, 17 Jul 2016 03:34:51 -0700 (PDT) Received: from localhost.localdomain (ip16-2-212-87.adsl2.static.versatel.nl. [87.212.2.16]) by smtp.gmail.com with ESMTPSA id d64sm7075922wmc.22.2016.07.17.03.34.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Jul 2016 03:34:51 -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: Sun, 17 Jul 2016 12:34:38 +0200 Message-Id: <1468751686-28047-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468751686-28047-1-git-send-email-ard.biesheuvel@linaro.org> References: <1468751686-28047-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 1/9] 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 , ting.ye@intel.com, qin.long@intel.com 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)