From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] Overriding of linker in ed2 build system To: Andrew Fish ,devel@edk2.groups.io From: "Prabin CA" X-Originating-Location: Texas, US (217.140.110.7) X-Originating-Platform: Windows Chrome 86 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 28 Oct 2020 02:35:46 -0700 References: <78AA7491-0AAF-4452-8B49-C1E2DD7D2274@apple.com> In-Reply-To: <78AA7491-0AAF-4452-8B49-C1E2DD7D2274@apple.com> Message-ID: <13533.1603877746934967920@groups.io> Content-Type: multipart/alternative; boundary="VT1k9Fp3VEw9Cnbk801W" --VT1k9Fp3VEw9Cnbk801W Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Andrew, I had edited tools_def.txt file with following changes=C2=A0 (shown diff b= elow) ################## # CLANG38 AARCH64 definitions ################## -DEFINE CLANG38_AARCH64_TARGET=C2=A0 =C2=A0 =3D -target aarch64-linux-gnu +DEFINE CLANG38_AARCH64_TARGET=C2=A0 =C2=A0 =3D -target aarch64-poky-linux DEFINE CLANG38_AARCH64_CC_FLAGS=C2=A0 =3D DEF(GCC_AARCH64_CC_FLAGS) DEF(CL= ANG38_AARCH64_TARGET) -mcmodel=3Dsmall DEF(CLANG38_WARNING_OVERRIDES) DEFINE CLANG38_AARCH64_DLINK_FLAGS=C2=A0 =3D DEF(CLANG38_AARCH64_TARGET) D= EF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000 @@ -2767,7 +2767,7 @@ DEFINE CLANG38_AARCH64_DLINK_FLAGS=C2=A0 =3D DEF(CLA= NG38_AARCH64_TARGET) DEF(GCC_AARCH6 *_CLANG38_AARCH64_ASLCC_FLAGS=C2=A0 =C2=A0 =3D DEF(GCC_ASLCC_FLAGS) -fno-l= to *_CLANG38_AARCH64_ASLDLINK_FLAGS =3D DEF(CLANG38_AARCH64_TARGET) DEF(GCC_A= ARCH64_ASLDLINK_FLAGS) *_CLANG38_AARCH64_ASM_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D DEF(GCC_ASM_FLAGS) DEF= (CLANG38_AARCH64_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunused-argume= nts -*_CLANG38_AARCH64_DLINK_FLAGS=C2=A0 =C2=A0 =3D DEF(CLANG38_AARCH64_TARGET= ) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000 +*_CLANG38_AARCH64_DLINK_FLAGS=C2=A0 =C2=A0 =3D DEF(CLANG38_AARCH64_TARGET= ) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000 -fuse-ld=3Dlld *_CLANG38_AARCH64_DLINK_XIPFLAGS =3D -z common-page-size=3D0x20 *_CLANG38_AARCH64_DLINK2_FLAGS=C2=A0 =C2=A0=3D DEF(GCC_DLINK2_FLAGS_COMMON= ) -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x228 *_CLANG38_AARCH64_PLATFORM_FLAGS =3D Please validate the changes first, now its picking LD from aarch64-poky-li= nux-ld, But the changes made to DLINK_FLAGS to take LD (-fuse-ld=3Dlld) fro= m clang is not making any effects. Can you suggest if anything I had missed= or done in wrong. Thanks --VT1k9Fp3VEw9Cnbk801W Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Hi Andrew,

I had edited tools_def.txt file with following changes  (shown dif= f below)

##################

 # CLANG38 AARCH64 definitions

 ##################

-DEFINE CLANG38_AARCH64_TARGET    =3D -target aarch64-linux-g= nu

+DEFINE CLANG38_AARCH64_TARGET    =3D -target aarch64-poky-li= nux

 DEFINE CLANG38_AARCH64_CC_FLAGS  =3D DEF(GCC_AARCH64_CC_FLAG= S) DEF(CLANG38_AARCH64_TARGET) -mcmodel=3Dsmall DEF(CLANG38_WARNING_OVERRID= ES)

 DEFINE CLANG38_AARCH64_DLINK_FLAGS  =3D DEF(CLANG38_AARCH64_= TARGET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000

 

@@ -2767,7 +2767,7 @@ DEFINE CLANG38_AARCH64_DLINK_FLAGS  =3D DEF(= CLANG38_AARCH64_TARGET) DEF(GCC_AARCH6

 *_CLANG38_AARCH64_ASLCC_FLAGS    =3D DEF(GCC_ASLCC_FLAG= S) -fno-lto

 *_CLANG38_AARCH64_ASLDLINK_FLAGS =3D DEF(CLANG38_AARCH64_TARGET) = DEF(GCC_AARCH64_ASLDLINK_FLAGS)

 *_CLANG38_AARCH64_ASM_FLAGS      =3D DEF(GCC_ASM_F= LAGS) DEF(CLANG38_AARCH64_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunus= ed-arguments

-*_CLANG38_AARCH64_DLINK_FLAGS    =3D DEF(CLANG38_AARCH64_TAR= GET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000

+*_CLANG38_AARCH64_DLINK_FLAGS    =3D DEF(CLANG38_AARCH64_TAR= GET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=3D0x1000 -fuse-ld=3Dl= ld

 *_CLANG38_AARCH64_DLINK_XIPFLAGS =3D -z common-page-size=3D0x20

 *_CLANG38_AARCH64_DLINK2_FLAGS   =3D DEF(GCC_DLINK2_FLA= GS_COMMON) -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x228

 

 *_CLANG38_AARCH64_PLATFORM_FLAGS =3D

Please validate the changes first, now its picking LD from aarch64-po= ky-linux-ld, But the changes made to DLINK_FLAGS to take LD (-fuse-ld=3Dlld= ) from clang is not making any effects. Can you suggest if anything I had m= issed or done in wrong.

Thanks 
--VT1k9Fp3VEw9Cnbk801W--