2f7f1e7 BaseTools: Add the missing -pie link option in GCC tool chain

Authored and Committed by Liming Gao 6 years ago
    BaseTools: Add the missing -pie link option in GCC tool chain
    
    https://bugzilla.tianocore.org/show_bug.cgi?id=671
    GCC tool chain uses -fpie in CC_FLAGS. So, add -pie in DLINK_FLAGS.
    More discussion in
    https://lists.01.org/pipermail/edk2-devel/2017-August/013508.html
    
    3.13 Options for Linking
    ========================
    '-pie'
         Produce a position independent executable on targets that support
         it.  For predictable results, you must also specify the same set
         of options used for compilation ('-fpie', '-fPIE', or model
         suboptions) when you specify this linker option.
    
    3.18 Options for Code Generation Conventions
    ============================================
    '-fpie'
    '-fPIE'
         These options are similar to '-fpic' and '-fPIC', but generated
         position independent code can be only linked into executables.
         Usually these options are used when '-pie' GCC option is used
         during linking.
         '-fpie' and '-fPIE' both define the macros '__pie__' and
         '__PIE__'. The macros have the value 1 for '-fpie' and 2 for
         '-fPIE'.
    
    Contributed-under: TianoCore Contribution Agreement 1.1
    Signed-off-by: Liming Gao <liming.gao@intel.com>
    Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
    Tested-by: Laszlo Ersek <lersek@redhat.com>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>