public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Shi, Steven" <steven.shi@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "sigmaepsilon92@gmail.com" <sigmaepsilon92@gmail.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
	"afish@apple.com" <afish@apple.com>
Subject: Re: [PATCH 3/3] BaseTools GCC: add the compiler flags to the linker command line
Date: Wed, 17 Aug 2016 12:24:58 +0000	[thread overview]
Message-ID: <06C8AB66E78EE34A949939824ABE2B310338D68E@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <CAKv+Gu-FTywO00czH+Djm5VYkZT2t2KKhPLipcsFkZHcumZuGQ@mail.gmail.com>

>

> Could you try putting -O2 in the DLINK2_FLAGS for Clang 38? (i.e., so

> that the last -O option the linker sees is not -Oz)

>

Ard,

Add -O2 or -O3 in DLINK2_FLAGS works as below, thank your suggestion!



"/home/jshi19/clang38/bin/clang" -o /home/jshi19/edk2-fork/Build/OvmfX64/RELEASE_CLANG38/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40 -Wl,--entry,_ModuleEntryPoint -u _ModuleEntryPoint -Wl,-Map,/home/jshi19/edk2-fork/Build/OvmfX64/RELEASE_CLANG38/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.map -flto -Wl,-Oz -Wl,-melf_x86_64 -Wl,--oformat=elf64-x86-64 -Wl,-pie -mcmodel=small -Wl,--start-group,@/home/jshi19/edk2-fork/Build/OvmfX64/RELEASE_CLANG38/X64/MdeModulePkg/Core/Dxe/DxeMain/OUTPUT/static_library_files.lst,--end-group -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=DxeCoreStrings -Wno-empty-body -fno-stack-protector -fno-builtin -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-parentheses-equality -Wno-unknown-pragmas -Wno-tautological-constant-out-of-range-compare -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-tautological-compare -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie -Oz -flto -target x86_64-pc-linux-gnu -DMDEPKG_NDEBUG -mno-mmx -mno-sse -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 -Wl,--script=/home/jshi19/edk2-fork/BaseTools/Scripts/GccBase.lds -Wno-error -O3 -v

clang version 3.8.0 (tags/RELEASE_380/final)

Target: x86_64-pc-linux-gnu

Thread model: posix

InstalledDir: /home/jshi19/clang38/bin

Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7

Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.4

Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9

Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3

Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0

Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0

Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0

Candidate multilib: .;@m64

Candidate multilib: 32;@m32

Candidate multilib: x32;@mx32

Selected multilib: .;@m64

"/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /home/jshi19/edk2-fork/Build/OvmfX64/RELEASE_CLANG38/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll -u _ModuleEntryPoint -L/usr/lib/gcc/x86_64-linux-gnu/5.4.0 -L/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../.. -L/home/jshi19/clang38/bin/../lib -L/lib -L/usr/lib -plugin /home/jshi19/clang38/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64 -plugin-opt=O3 -n -q --gc-sections -z common-page-size=0x40 --entry _ModuleEntryPoint -Map /home/jshi19/edk2-fork/Build/OvmfX64/RELEASE_CLANG38/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.map -Oz -melf_x86_64 --oformat=elf64-x86-64 -pie --start-group @/home/jshi19/edk2-fork/Build/OvmfX64/RELEASE_CLANG38/X64/MdeModulePkg/Core/Dxe/DxeMain/OUTPUT/static_library_files.lst --end-group --defsym=PECOFF_HEADER_SIZE=0x228 --script=/home/jshi19/edk2-fork/BaseTools/Scripts/GccBase.lds



Steven Shi

Intel\SSG\STO\UEFI Firmware



Tel: +86 021-61166522

iNet: 821-6522



  reply	other threads:[~2016-08-17 12:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 14:39 [PATCH 0/3] BaseTools GCC: pass CC flags to linker Ard Biesheuvel
2016-08-02 14:39 ` [PATCH 1/3] BaseTools GCC: move -c compiler flag to build rules Ard Biesheuvel
2016-08-02 15:01   ` Leif Lindholm
2016-08-02 15:02     ` Ard Biesheuvel
2016-08-02 15:09       ` Ard Biesheuvel
2016-08-02 14:39 ` [PATCH 2/3] BaseTools GCC5: disable warnings-as-errors for now Ard Biesheuvel
2016-08-02 14:39 ` [PATCH 3/3] BaseTools GCC: add the compiler flags to the linker command line Ard Biesheuvel
2016-08-17 11:38   ` Shi, Steven
2016-08-17 11:42     ` Ard Biesheuvel
2016-08-17 12:24       ` Shi, Steven [this message]
2016-08-17 13:06         ` Ard Biesheuvel
2016-08-02 14:50 ` [PATCH 0/3] BaseTools GCC: pass CC flags to linker Gao, Liming
2016-08-02 14:51   ` Ard Biesheuvel
2016-08-03  8:22     ` Ard Biesheuvel
2016-08-03  8:58       ` Gao, Liming
2016-08-03  9:23         ` Ard Biesheuvel
2016-08-03 13:20           ` Gao, Liming
2016-08-03 15:50             ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06C8AB66E78EE34A949939824ABE2B310338D68E@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox