From patchwork Thu Jul 14 13:16:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 72007 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp74656qga; Thu, 14 Jul 2016 06:16:18 -0700 (PDT) X-Received: by 10.98.36.134 with SMTP id k6mr12378719pfk.116.1468502178875; Thu, 14 Jul 2016 06:16:18 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id b6si3027866pal.57.2016.07.14.06.16.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 06:16:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; 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 198.145.21.10 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 4F0BC1A1F26; Thu, 14 Jul 2016 06:17:03 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 ED54D1A1F1B for ; Thu, 14 Jul 2016 06:17:01 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id o80so112861700wme.1 for ; Thu, 14 Jul 2016 06:16:15 -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=wtuHsdR9QwjvPC/4QnvMr/ArQ5+uzfZlN3h8qQHEjBQ=; b=Gjgrv3ccnU1Iy8pgl9ehIJNlgFMuVABKtwwaMdSZfKRlMFmEOKBWHEtdag/ma3GRfv GpNlsYql7K3b9Jxs+jNMxq3XRfkEmy7MtKTs3pOwl+Ft6Lo8lKNubK9kaEH5YYeQ96U5 S22c9VCJsrfDvZY4W6DXLzRws0zR4V0GzzECg= 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=wtuHsdR9QwjvPC/4QnvMr/ArQ5+uzfZlN3h8qQHEjBQ=; b=CZOAnEuutSN9DOMmxNxDwLHgW4rsYXTIRino8Yns4tiyT52hFA0R/u5C1SxwN6UK/e k+AIQdPUc81UkGOm3elE2YzlevdRUe+aMaPqPvuOJmKR9byEgbfUTAZRK+JHw7Iifs6R tlJoBe9Xpm/sF1fTW+6xN6qcnEXvrin8LTSZTluGKaVZ6VOWfevaL8+Me4lVQjDwkzMz sEosk/ISR6RPUvNUbLgDUkhl4TT4v7z788F5XE+5iF5t4MUrS3zP05C/dTA0XvcTFQ1f UMcyuXpuDvM7nR3fIGEFXJMLHJMOa6wWEgBmnWU8iQyMphhBwwkJiXpO4okOM+u6d5tM 5G5A== X-Gm-Message-State: ALyK8tJI22RmY4i02uQk6uanjvGn8EJwYT0wPdM6rI2VIUyBIyrLlBYSFUzan5Wd12jfyWQd X-Received: by 10.28.182.136 with SMTP id g130mr15519620wmf.21.1468502173583; Thu, 14 Jul 2016 06:16:13 -0700 (PDT) Received: from localhost.localdomain ([188.203.148.129]) by smtp.gmail.com with ESMTPSA id q69sm43232902wmd.4.2016.07.14.06.16.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Jul 2016 06:16:13 -0700 (PDT) From: Ard Biesheuvel To: steven.shi@intel.com, yonghong.zhu@intel.com, liming.gao@intel.com, michael.d.kinney@intel.com, jordan.l.justen@intel.com, lersek@redhat.com, afish@apple.com, edk2-devel@lists.01.org Date: Thu, 14 Jul 2016 15:16:05 +0200 Message-Id: <1468502169-15248-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468502169-15248-1-git-send-email-ard.biesheuvel@linaro.org> References: <1468502169-15248-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 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: 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 --- MdePkg/Include/Base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 _______________________________________________ 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)