From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Ard Biesheuvel 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: [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: , X-List-Received-Date: Thu, 11 Aug 2016 18:21:45 -0000 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(+) 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 -- 2.7.4