public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2 1/1] BaseTools/tools_def.template: Update -march parameter for RISC-V
@ 2023-02-22  2:37 Sunil V L
  2023-02-22  2:39 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: Sunil V L @ 2023-02-22  2:37 UTC (permalink / raw)
  To: devel
  Cc: Bob Feng, Liming Gao, Yuwei Chen, Andrei Warkentin,
	Heinrich Schuchardt, Gerd Hoffmann

Replace rv64imafdc with rv64gc so that it works for gcc 12.

"g" means imafd in gcc < 12 and imafd_zifencei_zicsr in gcc >= 12.
So, replacing rv64imafdc with rv64gc will work for both gcc <12
and gcc >=12.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Andrei Warkentin <andrei.warkentin@intel.com>
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
---
Changes since V1:
	1) Updated commit message
	2) Added Tested-by tag from Gerd

 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index f77e936c0453..471eb67c0c83 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1965,7 +1965,7 @@ DEFINE GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE    = -Wno-tautological-compare -W
 
 DEFINE GCC5_RISCV_OPENSBI_TYPES                   = -DOPENSBI_EXTERNAL_SBI_TYPES=OpensbiTypes.h
 
-DEFINE GCC5_RISCV64_ARCH                   = rv64imafdc
+DEFINE GCC5_RISCV64_ARCH                   = rv64gc
 DEFINE GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
 DEFINE GCC5_RISCV64_CC_FLAGS               = DEF(GCC5_RISCV_ALL_CC_FLAGS) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-asynchronous-unwind-tables -Wno-unused-but-set-variable -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax
 DEFINE GCC5_RISCV64_DLINK_FLAGS            = DEF(GCC5_RISCV_ALL_DLINK_FLAGS) -Wl,-melf64lriscv,--oformat=elf64-littleriscv,--no-relax
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V2 1/1] BaseTools/tools_def.template: Update -march parameter for RISC-V
  2023-02-22  2:37 [PATCH V2 1/1] BaseTools/tools_def.template: Update -march parameter for RISC-V Sunil V L
@ 2023-02-22  2:39 ` Heinrich Schuchardt
  2023-02-23  3:12   ` 回复: " gaoliming
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2023-02-22  2:39 UTC (permalink / raw)
  To: Sunil V L, devel
  Cc: Bob Feng, Liming Gao, Yuwei Chen, Andrei Warkentin, Gerd Hoffmann



On 2/22/23 03:37, Sunil V L wrote:
> Replace rv64imafdc with rv64gc so that it works for gcc 12.
> 
> "g" means imafd in gcc < 12 and imafd_zifencei_zicsr in gcc >= 12.
> So, replacing rv64imafdc with rv64gc will work for both gcc <12
> and gcc >=12.
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Andrei Warkentin <andrei.warkentin@intel.com>
> Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
> Tested-by: Gerd Hoffmann <kraxel@redhat.com>

Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

> ---
> Changes since V1:
> 	1) Updated commit message
> 	2) Added Tested-by tag from Gerd
> 
>   BaseTools/Conf/tools_def.template | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index f77e936c0453..471eb67c0c83 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1965,7 +1965,7 @@ DEFINE GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE    = -Wno-tautological-compare -W
>   
>   DEFINE GCC5_RISCV_OPENSBI_TYPES                   = -DOPENSBI_EXTERNAL_SBI_TYPES=OpensbiTypes.h
>   
> -DEFINE GCC5_RISCV64_ARCH                   = rv64imafdc
> +DEFINE GCC5_RISCV64_ARCH                   = rv64gc
>   DEFINE GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
>   DEFINE GCC5_RISCV64_CC_FLAGS               = DEF(GCC5_RISCV_ALL_CC_FLAGS) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-asynchronous-unwind-tables -Wno-unused-but-set-variable -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax
>   DEFINE GCC5_RISCV64_DLINK_FLAGS            = DEF(GCC5_RISCV_ALL_DLINK_FLAGS) -Wl,-melf64lriscv,--oformat=elf64-littleriscv,--no-relax

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 回复: [PATCH V2 1/1] BaseTools/tools_def.template: Update -march parameter for RISC-V
  2023-02-22  2:39 ` Heinrich Schuchardt
@ 2023-02-23  3:12   ` gaoliming
  0 siblings, 0 replies; 3+ messages in thread
From: gaoliming @ 2023-02-23  3:12 UTC (permalink / raw)
  To: 'Heinrich Schuchardt', 'Sunil V L', devel
  Cc: 'Bob Feng', 'Yuwei Chen',
	'Andrei Warkentin', 'Gerd Hoffmann'

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> 发送时间: 2023年2月22日 10:39
> 收件人: Sunil V L <sunilvl@ventanamicro.com>; devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>; Andrei
> Warkentin <andrei.warkentin@intel.com>; Gerd Hoffmann
> <kraxel@redhat.com>
> 主题: Re: [PATCH V2 1/1] BaseTools/tools_def.template: Update -march
> parameter for RISC-V
> 
> 
> 
> On 2/22/23 03:37, Sunil V L wrote:
> > Replace rv64imafdc with rv64gc so that it works for gcc 12.
> >
> > "g" means imafd in gcc < 12 and imafd_zifencei_zicsr in gcc >= 12.
> > So, replacing rv64imafdc with rv64gc will work for both gcc <12
> > and gcc >=12.
> >
> > Cc: Bob Feng <bob.c.feng@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > Cc: Andrei Warkentin <andrei.warkentin@intel.com>
> > Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
> > Tested-by: Gerd Hoffmann <kraxel@redhat.com>
> 
> Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> 
> > ---
> > Changes since V1:
> > 	1) Updated commit message
> > 	2) Added Tested-by tag from Gerd
> >
> >   BaseTools/Conf/tools_def.template | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/BaseTools/Conf/tools_def.template
> b/BaseTools/Conf/tools_def.template
> > index f77e936c0453..471eb67c0c83 100755
> > --- a/BaseTools/Conf/tools_def.template
> > +++ b/BaseTools/Conf/tools_def.template
> > @@ -1965,7 +1965,7 @@ DEFINE
> GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE    =
> -Wno-tautological-compare -W
> >
> >   DEFINE GCC5_RISCV_OPENSBI_TYPES                   =
> -DOPENSBI_EXTERNAL_SBI_TYPES=OpensbiTypes.h
> >
> > -DEFINE GCC5_RISCV64_ARCH                   = rv64imafdc
> > +DEFINE GCC5_RISCV64_ARCH                   = rv64gc
> >   DEFINE GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS =
> DEF(GCC5_RISCV_ALL_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u
> ReferenceAcpiTable
> >   DEFINE GCC5_RISCV64_CC_FLAGS               =
> DEF(GCC5_RISCV_ALL_CC_FLAGS)
> DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE)
> DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH)
> -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address
> -fno-asynchronous-unwind-tables -Wno-unused-but-set-variable
> -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax
> >   DEFINE GCC5_RISCV64_DLINK_FLAGS            =
> DEF(GCC5_RISCV_ALL_DLINK_FLAGS)
> -Wl,-melf64lriscv,--oformat=elf64-littleriscv,--no-relax



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-23  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-22  2:37 [PATCH V2 1/1] BaseTools/tools_def.template: Update -march parameter for RISC-V Sunil V L
2023-02-22  2:39 ` Heinrich Schuchardt
2023-02-23  3:12   ` 回复: " gaoliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox