[edk2] edk2-devel at lists.01.org

wang xiaofeng winggundum82 at 163.com
Fri Dec 28 01:40:53 PST 2018


Just add more information, If I comment the OBJCOPY in  <Command.GCC> of Static-Library-File in build_rule , the error will disapper, but I am not sure whether any side effort to remove objcopy?


[Static-Library-File]
    <InputFile>
        *.lib


    <ExtraDependency>
        $(MAKE_FILE)


    <OutputFile>
        $(DEBUG_DIR)(+)$(MODULE_NAME).dll


    <Command.MSFT, Command.INTEL>
        "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
        "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)


    <Command.GCC>
        "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(DLINK2_FLAGS)
       # "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}






At 2018-12-28 17:26:16, "wang xiaofeng" <winggundum82 at 163.com> wrote:


HI Edk2 Basetool owners,

I meet an build error when updating our efi driver tree to UDK2018.  The issue exists only for AARCH64 build , X64 build is ok.

I do a simple test to build MdeModulePkg package in Window10  with gcc-linaro-7.3.1-2018.05-win32

 

The following is my simply script:

set GCC5_AARCH64_PREFIX=C:\soft\gcc-linaro-7.3.1\bin\aarch64-linux-gnu-

set WORKSPACE=C:\code\udk201811

set PATH=C:\p4\stg\uefi\gnutools\GNUMake-3.81_win32;%PATH%

call edksetup.bat

build -a AARCH64 -p MdeModulePkg\MdeModulePkg.dsc -t GCC5 -b DEBUG

 

 

   The tool will have error when tring to link dll, it says "echo" objcopy not needed *.dll

'"echo"' is not recognized as an internal or external command,

   Do anyone meet this issue before? Any advice to solve this issue?

  A strange thing is if I rerun the build script again , the first dll will pass , and the second dll will meet same error .

 

 

"C:\soft\gcc-linaro-7.3.1\bin\aarch64-linux-gnu-gcc" -o c:\code\udk201811\Build\MdeModule\DEBUG_GCC5\AARCH64\MdeModulePkg\Universal\Network\UefiPxeBcDxe\UefiPxeBcDxe\DEBUG\UefiPxe4BcDxe.dll -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u _ModuleEntryPoint -Wl,-e,_ModuleEntryPoint,-Map,c:\code\udk201811\Build\MdeModule\DEBUG_GCC5\AARCH64\MdeModulePkg\Universal\Network\UefiPxeBcDxe\UefiPxeBcDxe\DEBUG/UefiPxe4BcDxe.map -z common-page-size=0x20 -z common-page-size=0x1000 -flto -Os -Lc:\code\udk201811/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch -mcmodel=small -Wl,--start-group, at c:\code\udk201811\Build\MdeModule\DEBUG_GCC5\AARCH64\MdeModulePkg\Universal\Network\UefiPxeBcDxe\UefiPxeBcDxe\OUTPUT\static_library_files.lst,--end-group   -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiPxe4BcDxeStrings -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=small -D DISABLE_NEW_DEPRECATED_INTERFACES -Wl,--script=c:\code\udk201811\basetools/Scripts/GccBase.lds -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 -Wno-error

"echo" objcopy not needed for c:\code\udk201811\Build\MdeModule\DEBUG_GCC5\AARCH64\MdeModulePkg\Application\HelloWorld\HelloWorld\DEBUG\HelloWorld.dll

'"echo"' is not recognized as an internal or external command,

operable program or batch file.

make: *** [c:\code\udk201811\Build\MdeModule\DEBUG_GCC5\AARCH64\MdeModulePkg\Application\HelloWorld\HelloWorld\DEBUG\HelloWorld.dll] Error 1





 


More information about the edk2-devel mailing list