From patchwork Thu Aug 11 18:20:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 73812 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp242130qga; Thu, 11 Aug 2016 11:21:47 -0700 (PDT) X-Received: by 10.98.30.133 with SMTP id e127mr19779042pfe.104.1470939707562; Thu, 11 Aug 2016 11:21:47 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id o90si4273430pfa.214.2016.08.11.11.21.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Aug 2016 11:21:47 -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 1953E1A1E05; Thu, 11 Aug 2016 11:21:47 -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 5D07B1A1DEB for ; Thu, 11 Aug 2016 11:21:45 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id f65so7330270wmi.0 for ; Thu, 11 Aug 2016 11:21:45 -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=FUElyl6V/C9+NlqBSDJyENGOx+2lO5fACc8pJ2im3Go=; b=TUG5W2csVfzMAf8/Br3Ej8gXh4iWzXqghWZQcugMprZaHRG5PVo+OMwWRmXxIPFUn0 8HyFc2eeIcDcsyszcp4H6zu0PqmLdYIJPWF4JNDiFHWhq23//xoE+Ikdkv8b1JgrfxlU ljqpmyeieBQa5kzRt0hTlX1POvzEes4xED/8k= 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=FUElyl6V/C9+NlqBSDJyENGOx+2lO5fACc8pJ2im3Go=; b=SzO6oaOnYChqtfGmnjfN4ZpOhO6sr6UcIWfZ/D79CyV4EqYaDSfwkryD0+TMJzH52E AKWxkqJWxLkFrbUDyBRnwW6X/9I0sMFHqpQVB2/MgX5vNubbSvAc8ws7xOM4ASF1egKC 3pBpZO+4wsbybFfUQmtk8sZwFg2FbWy5l3cl2IdKUF3tn8JnQ4lDLi0b3pikzj5miL2w JqSNBpxmUZufAtKS87SvdXdjg1JmjJYA870kPrhJJzMNVWbkdnPQgt6TeaX/MKjPGirm R0Ioh5s6yJGaQ0Amcze3MLoipcJwlWqReFRDgffLzEBCx2JGYkWBcO3e1SkmWyt/Lvvf RlCA== X-Gm-Message-State: AEkoousw76kYb8tkG3mk4IpNuIW48sbW1sBhmsr0UUL2SO/UyvZAiGR3Tpi+XppmyTI+32TB X-Received: by 10.194.98.139 with SMTP id ei11mr11015806wjb.19.1470939703746; Thu, 11 Aug 2016 11:21:43 -0700 (PDT) Received: from localhost.localdomain (46.red-81-37-107.dynamicip.rima-tde.net. [81.37.107.46]) by smtp.gmail.com with ESMTPSA id b203sm948382wmh.20.2016.08.11.11.21.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Aug 2016 11:21:43 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, eugene@hp.com, liming.gao@intel.com Date: Thu, 11 Aug 2016 20:20:32 +0200 Message-Id: <1470939632-32198-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470939632-32198-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470939632-32198-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 3/3] MdePkg RVCT: add definition of UNREACHABLE X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The RVCT compiler in --gnu mode appears to simply strip of the __builtin prefix when it encounters calls to __builtin_xxx() functions, and so the __builtin_unreachable() we emit for GCC results in linker errors regarding undefined references against 'unreachable()'. So define UNREACHABLE() to a NOP instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdePkg/Include/Arm/ProcessorBind.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 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/Arm/ProcessorBind.h b/MdePkg/Include/Arm/ProcessorBind.h index c2482c2f50f0..5ee7465c05a3 100644 --- a/MdePkg/Include/Arm/ProcessorBind.h +++ b/MdePkg/Include/Arm/ProcessorBind.h @@ -28,6 +28,13 @@ #pragma pack() #endif +// +// RVCT does not support the __builtin_unreachable() macro +// +#ifdef __ARMCC_VERSION +#define UNREACHABLE() +#endif + #if _MSC_EXTENSIONS // // use Microsoft* C complier dependent integer width types