vboot_reference: fix unittest when building with clang.

When linking vboot_api_kernel4_tests, there are two VbBootNormal()
available, the gcc chooses the one in vboot_api_kernel4_tests.c and
the test passes, the clang chooses the one in vboot_api_kernel.c and
make the unittest fail. This CL makes the one in vboot_api_kernel.c
a weak symbol so that clang can choose the one in
vboot_api_kernel4_tests.c

BUG=chromium:498469
BRANCH=none
TEST=CC=x86_64-cros-linux-gnu-clang  FEATURES='test'
     emerge-amd64-generic vboot_reference

Change-Id: Ibcb78ee055fc9485dbc2bcc1d1cf98144a1a3b64
Reviewed-on: https://chromium-review.googlesource.com/276504
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
This commit is contained in:
Yunlian Jiang
2015-06-09 16:21:56 -07:00
committed by ChromeOS Commit Bot
parent d7f0f93fa8
commit 637ff03502
3 changed files with 8 additions and 2 deletions

View File

@@ -238,7 +238,8 @@ int VbUserConfirms(VbCommonParams *cparams, uint32_t confirm_flags)
return -1;
}
VbError_t VbBootNormal(VbCommonParams *cparams, LoadKernelParams *p)
VbError_t test_mockable
VbBootNormal(VbCommonParams *cparams, LoadKernelParams *p)
{
/* Boot from fixed disk only */
VBDEBUG(("Entering %s()\n", __func__));