From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=96.73.9.1; helo=muon.bluestop.org; envelope-from=rebecca@bluestop.org; receiver=edk2-devel@lists.01.org Received: from muon.bluestop.org (muon.bluestop.org [96.73.9.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2F63E21959CB2 for ; Sat, 22 Dec 2018 14:19:13 -0800 (PST) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id 8A6383249E for ; Sat, 22 Dec 2018 15:20:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bluestop.org; s=mail; t=1545517205; bh=lej+ozPS/6eK/knQvLILE8cYdaFC189x9n6EDgxtol4=; h=Date:From:To:Subject:From; b=vJAAcm3Hz4kVY+94yaLIEA04yMT3vkVada46A1YclF6fHzEMKMB201EGQw6Sc2jGE 7k7KfNY4XYGADpmjJkb/FZREkWT+I1vhzZaeMBxilpqQjd+m2g0+8NhMMsclW+CQOI YulHrHcVa4feLJSLdLTDOloXWZwTWJy3BQL8gm6A= Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bWGuREhq_zzX for ; Sat, 22 Dec 2018 15:20:04 -0700 (MST) Received: from macbex.int.bluestop.org.mail (gw.bluestop.org [96.73.9.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA for ; Sat, 22 Dec 2018 15:20:04 -0700 (MST) Date: Sat, 22 Dec 2018 15:19:11 -0700 From: Rebecca Cran To: edk2-devel-01 Message-ID: MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Undefined symbols AsmCpuid, AsmReadCr0 etc. when building OvmfPkgX64 on FreeBSD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2018 22:19:13 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline While the RELEASE build of OvmfPkgX64 works fine, the DEBUG build is failin= g with undefined symbols AsmCpuid etc. when building on my FreeBSD 13-CURRE= NT system. I=E2=80=99m trying to build git revision=C2=A0559a07d84e5af3db09ae91844e4c= b924b8f60668 (from=C2=A0Thu Dec 13 16:48:44 2018 -0700). I=E2=80=99m building with gcc 7.4, running the command: build -p OvmfPkg/OvmfPkgX64.dsc -t GCC5 -b DEBUG -a X64 The last few lines of output are: "gcc" -o /home/bcran/workspace/edk2/Build/OvmfX64/DEBUG_GCC5/X64/IntelFram= eworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe/DEBUG/Ps2KeyboardDxe.d= ll -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=3D0x40 -Wl,--entry= ,_ModuleEntryPoint -u _ModuleEntryPoint -Wl,-Map,/home/bcran/workspace/edk2= /Build/OvmfX64/DEBUG_GCC5/X64/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDx= e/Ps2keyboardDxe/DEBUG/Ps2KeyboardDxe.map,--whole-archive -Wl,-melf_x86_64,= --oformat=3Delf64-x86-64,-pie -flto -Os -Wl,--start-group,@/home/bcran/work= space/edk2/Build/OvmfX64/DEBUG_GCC5/X64/IntelFrameworkModulePkg/Bus/Isa/Ps2= KeyboardDxe/Ps2keyboardDxe/OUTPUT/static_library_files.lst,--end-group -g -= fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bou= nds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DST= RING_ARRAY_NAME=3DPs2KeyboardDxeStrings -m64 -fno-stack-protector "-DEFIAPI= = =3D__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-= address -mcmodel=3Dsmall -fpie -fno-asynchronous-unwind-tables -Wno-address= -flto -DUSING_LTO -Os -mno-mmx -mno-sse -D DISABLE_NEW_DEPRECATED_INTERFAC= ES -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x228 -Wl,--script=3D/home/bcran/wor= kspace/edk2/BaseTools/Scripts/GccBase.lds -Wno-error Building ... /home/bcran/workspace/edk2/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.= inf [X64] make: Nothing to be done for 'tbuild'. Building ... /home/bcran/workspace/edk2/MdeModulePkg/Library/FrameBufferBl= tLib/FrameBufferBltLib.inf [X64] Building ... /home/bcran/workspace/edk2/MdeModulePkg/Universal/MemoryTest/= NullMemoryTestDxe/NullMemoryTestDxe.inf [X64] make: Nothing to be done for 'tbuild'. make: Nothing to be done for 'tbuild'. make: Nothing to be done for 'tbuild'. Building ... /home/bcran/workspace/edk2/MdeModulePkg/Library/CustomizedDis= playLib/CustomizedDisplayLib.inf [X64] /tmp//ccVNNewx.ltrans0.ltrans.o: In function `GetMemEncryptionAddressMask'= : Building ... /home/bcran/workspace/edk2/MdeModulePkg/Universal/HiiDatabase= Dxe/HiiDatabaseDxe.inf [X64] /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/Virtua= lMemory.c:57: undefined reference to `AsmCpuid' /tmp//ccVNNewx.ltrans0.ltrans.o: In function `WriteBackInvalidateDataCache= Range': /home/bcran/workspace/edk2/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache= .c:141: undefined reference to `AsmCpuid' /home/bcran/workspace/edk2/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache= .c:143: undefined reference to `AsmWbinvd' /home/bcran/workspace/edk2/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache= .c:160: undefined reference to `AsmFlushCacheLine' make: Nothing to be done for 'tbuild'. /tmp//ccVNNewx.ltrans0.ltrans.o: In function `IsReadOnlyPageWriteProtected= ': make: Nothing to be done for 'tbuild'. /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/Virtua= lMemory.c:521: undefined reference to `AsmReadCr0' /tmp//ccVNNewx.ltrans0.ltrans.o: In function `DisableReadOnlyPageWriteProt= ect': /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/Virtua= lMemory.c:534: undefined reference to `AsmReadCr0' Building ... /home/bcran/workspace/edk2/MdeModulePkg/Bus/Pci/NvmExpressDxe= /NvmExpressDxe.inf [X64] /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/Virtua= lMemory.c:534: undefined reference to `AsmWriteCr0' /tmp//ccVNNewx.ltrans0.ltrans.o: In function `SetMemoryEncDec': /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/Virtua= lMemory.c:655: undefined reference to `AsmReadCr3' /tmp//ccVNNewx.ltrans0.ltrans.o: In function `EnableReadOnlyPageWriteProte= ct': /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/Virtua= lMemory.c:545: undefined reference to `AsmReadCr0' /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/Virtua= lMemory.c:545: undefined reference to `AsmWriteCr0' /tmp//ccVNNewx.ltrans0.ltrans.o: In function `InternalMemEncryptSevIsEnabl= ed': /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/MemEncrypt= SevLibInternal.c:52: undefined reference to `AsmCpuid' /home/bcran/workspace/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/MemEncrypt= SevLibInternal.c:57: undefined reference to `AsmCpuid' /tmp//ccVNNewx.ltrans0.ltrans.o: In function `AsmReadMsr32': /home/bcran/workspace/edk2/MdePkg/Library/BaseLib/X86Msr.c:39: undefined r= eference to `AsmReadMsr64' collect2: error: ld returned 1 exit status make: *** [GNUmakefile:397: /home/bcran/workspace/edk2/Build/OvmfX64/DEBUG= _GCC5/X64/OvmfPkg/AmdSevDxe/AmdSevDxe/DEBUG/AmdSevDxe.dll] Error 1 =E2=80=94=C2=A0 Rebecca >>From Achin.Gupta@arm.com Sun Dec 23 04:36:34 2018 Return-Path: X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity