public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v3] OvmfPkg/QemuBootOrderLib: Fix NOOPT build failure
@ 2017-02-09  2:08 Dandan Bi
  2017-02-09  8:56 ` Laszlo Ersek
  0 siblings, 1 reply; 2+ messages in thread
From: Dandan Bi @ 2017-02-09  2:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jordan Justen, Laszlo Ersek, Liming Gao

This patch is to fix the IA32/NOOPT/VS Toolchain build failure.
The VS2015 failure log as below:
QemuBootOrderLib.lib(ExtraRootBusMap.obj) : 
error LNK2001: unresolved external symbol __allmul
s:\..\Build\OvmfIa32\NOOPT_VS2015\IA32\MdeModulePkg\
Universal\BdsDxe\BdsDxe\DEBUG\BdsDxe.dll : 
fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 
'"C:\Program Files\Microsoft Visual Studio 14.0\Vc\bin\link.exe"' : 
return code '0x460'
Stop.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>

Notes:
  V3: Add VS compiler error message in commit log.

---
 OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c b/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c
index ec42214..70ba161 100644
--- a/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c
+++ b/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c
@@ -306,8 +306,8 @@ MapRootBusPosToBusNr (
     return EFI_INVALID_PARAMETER;
   }
   if (RootBusPos > ExtraRootBusMap->Count) {
     return EFI_NOT_FOUND;
   }
-  *RootBusNr = ExtraRootBusMap->BusNumbers[RootBusPos - 1];
+  *RootBusNr = ExtraRootBusMap->BusNumbers[(UINTN)RootBusPos - 1];
   return EFI_SUCCESS;
 }
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] OvmfPkg/QemuBootOrderLib: Fix NOOPT build failure
  2017-02-09  2:08 [PATCH v3] OvmfPkg/QemuBootOrderLib: Fix NOOPT build failure Dandan Bi
@ 2017-02-09  8:56 ` Laszlo Ersek
  0 siblings, 0 replies; 2+ messages in thread
From: Laszlo Ersek @ 2017-02-09  8:56 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Jordan Justen, Liming Gao

On 02/09/17 03:08, Dandan Bi wrote:
> This patch is to fix the IA32/NOOPT/VS Toolchain build failure.
> The VS2015 failure log as below:
> QemuBootOrderLib.lib(ExtraRootBusMap.obj) : 
> error LNK2001: unresolved external symbol __allmul
> s:\..\Build\OvmfIa32\NOOPT_VS2015\IA32\MdeModulePkg\
> Universal\BdsDxe\BdsDxe\DEBUG\BdsDxe.dll : 
> fatal error LNK1120: 1 unresolved externals
> NMAKE : fatal error U1077: 
> '"C:\Program Files\Microsoft Visual Studio 14.0\Vc\bin\link.exe"' : 
> return code '0x460'
> Stop.

Ah! So after all, it is the 64-bit multiplication implicit to the
subscripting by a UINT64! That's something I'll have to keep in mind.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo

> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> 
> Notes:
>   V3: Add VS compiler error message in commit log.
> 
> ---
>  OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c b/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c
> index ec42214..70ba161 100644
> --- a/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c
> +++ b/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c
> @@ -306,8 +306,8 @@ MapRootBusPosToBusNr (
>      return EFI_INVALID_PARAMETER;
>    }
>    if (RootBusPos > ExtraRootBusMap->Count) {
>      return EFI_NOT_FOUND;
>    }
> -  *RootBusNr = ExtraRootBusMap->BusNumbers[RootBusPos - 1];
> +  *RootBusNr = ExtraRootBusMap->BusNumbers[(UINTN)RootBusPos - 1];
>    return EFI_SUCCESS;
>  }
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-09  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09  2:08 [PATCH v3] OvmfPkg/QemuBootOrderLib: Fix NOOPT build failure Dandan Bi
2017-02-09  8:56 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox