* [edk2-libc Patch 0/1] Changes to StdLib to facilitate gcc 32 bit builds
@ 2022-06-17 8:41 Jayaprakash, N
2022-06-17 8:41 ` [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds Jayaprakash, N
0 siblings, 1 reply; 4+ messages in thread
From: Jayaprakash, N @ 2022-06-17 8:41 UTC (permalink / raw)
To: devel
This patch contains the changes required for StdLib to facilitate the
gcc 32 bit builds.
Jayaprakash Nevara (1):
edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds
StdLib/LibC/CRT/Gcc.c | 7 +++++++
StdLib/LibC/LibC.inf | 7 +++----
2 files changed, 10 insertions(+), 4 deletions(-)
--
2.33.0.windows.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds
2022-06-17 8:41 [edk2-libc Patch 0/1] Changes to StdLib to facilitate gcc 32 bit builds Jayaprakash, N
@ 2022-06-17 8:41 ` Jayaprakash, N
2022-06-28 5:01 ` [edk2-devel] " Michael D Kinney
0 siblings, 1 reply; 4+ messages in thread
From: Jayaprakash, N @ 2022-06-17 8:41 UTC (permalink / raw)
To: devel; +Cc: Michael D Kinney, Rebecca Cran, Jayaprakash N
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3779
This comit fixes the Python interpreter build issues with GCC 32 bit
compiler tool chain. The changes are needed in StdLibC as given below
* Add __divmoddi4 to Gcc.c produced by newer GCC compilers
* Add -fno-lto to IA32 GCC builds of LibC.inf to support use of
GCC intrinsics from Gcc.c.
* Moved Main/Ia32/ftol2.obj in LibC.inf from binaries section to
Sources.IA32 required only for MSFT IA32 compiler tool chain
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Rebecca Cran <rebecca@nuviainc.com>
Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com>
---
StdLib/LibC/CRT/Gcc.c | 7 +++++++
StdLib/LibC/LibC.inf | 7 +++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/StdLib/LibC/CRT/Gcc.c b/StdLib/LibC/CRT/Gcc.c
index cbf4ec2..bc1a4b2 100644
--- a/StdLib/LibC/CRT/Gcc.c
+++ b/StdLib/LibC/CRT/Gcc.c
@@ -193,3 +193,10 @@ unsigned long long __umodti3(unsigned long long Dividend, unsigned long long Div
return (unsigned long long) Remainder;
}
+
+INT64 __divmoddi4 (INT64 num, INT64 den, INT64 *rem_p)
+{
+ DEBUG((DEBUG_INFO, "%a:\n", __func__));
+ return DivS64x64Remainder (num, den, rem_p);
+}
+
diff --git a/StdLib/LibC/LibC.inf b/StdLib/LibC/LibC.inf
index 5bb2053..4771204 100644
--- a/StdLib/LibC/LibC.inf
+++ b/StdLib/LibC/LibC.inf
@@ -46,7 +46,8 @@
Main/Ia32/fpu_rmode.S | GCC
Main/Ia32/isinfl.c
Main/Ia32/isnanl.c
-
+ Main/Ia32/ftol2.obj | MSFT
+
# Compiler helper (C RunTime) functions
CRT/Ia32/llmul.c | MSFT # __allmul
CRT/Ia32/llshl.c | MSFT # __allshl
@@ -88,9 +89,6 @@
[Sources.AARCH64]
Main/Arm/flt_rounds.c
-[Binaries.IA32]
- LIB|Main/Ia32/ftol2.obj|*|MSFT
-
[Packages]
StdLib/StdLib.dec
StdLibPrivateInternalFiles/DoNotUse.dec
@@ -116,4 +114,5 @@
#
[BuildOptions]
MSFT:*_*_IA32_CC_FLAGS = /GL-
+ GCC:*_*_IA32_CC_FLAGS = -fno-lto
GCC:*_*_ARM_CC_FLAGS = -fno-lto
--
2.33.0.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds
2022-06-17 8:41 ` [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds Jayaprakash, N
@ 2022-06-28 5:01 ` Michael D Kinney
2022-06-28 5:03 ` Michael D Kinney
0 siblings, 1 reply; 4+ messages in thread
From: Michael D Kinney @ 2022-06-28 5:01 UTC (permalink / raw)
To: devel@edk2.groups.io, Jayaprakash, N, Kinney, Michael D; +Cc: Rebecca Cran
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N
> Sent: Friday, June 17, 2022 1:42 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Rebecca Cran <rebecca@nuviainc.com>; Jayaprakash, N <n.jayaprakash@intel.com>
> Subject: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3779
>
> This comit fixes the Python interpreter build issues with GCC 32 bit
> compiler tool chain. The changes are needed in StdLibC as given below
>
> * Add __divmoddi4 to Gcc.c produced by newer GCC compilers
> * Add -fno-lto to IA32 GCC builds of LibC.inf to support use of
> GCC intrinsics from Gcc.c.
> * Moved Main/Ia32/ftol2.obj in LibC.inf from binaries section to
> Sources.IA32 required only for MSFT IA32 compiler tool chain
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Rebecca Cran <rebecca@nuviainc.com>
> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com>
> ---
> StdLib/LibC/CRT/Gcc.c | 7 +++++++
> StdLib/LibC/LibC.inf | 7 +++----
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/StdLib/LibC/CRT/Gcc.c b/StdLib/LibC/CRT/Gcc.c
> index cbf4ec2..bc1a4b2 100644
> --- a/StdLib/LibC/CRT/Gcc.c
> +++ b/StdLib/LibC/CRT/Gcc.c
> @@ -193,3 +193,10 @@ unsigned long long __umodti3(unsigned long long Dividend, unsigned long long Div
>
> return (unsigned long long) Remainder;
> }
> +
> +INT64 __divmoddi4 (INT64 num, INT64 den, INT64 *rem_p)
> +{
> + DEBUG((DEBUG_INFO, "%a:\n", __func__));
> + return DivS64x64Remainder (num, den, rem_p);
> +}
> +
> diff --git a/StdLib/LibC/LibC.inf b/StdLib/LibC/LibC.inf
> index 5bb2053..4771204 100644
> --- a/StdLib/LibC/LibC.inf
> +++ b/StdLib/LibC/LibC.inf
> @@ -46,7 +46,8 @@
> Main/Ia32/fpu_rmode.S | GCC
> Main/Ia32/isinfl.c
> Main/Ia32/isnanl.c
> -
> + Main/Ia32/ftol2.obj | MSFT
> +
> # Compiler helper (C RunTime) functions
> CRT/Ia32/llmul.c | MSFT # __allmul
> CRT/Ia32/llshl.c | MSFT # __allshl
> @@ -88,9 +89,6 @@
> [Sources.AARCH64]
> Main/Arm/flt_rounds.c
>
> -[Binaries.IA32]
> - LIB|Main/Ia32/ftol2.obj|*|MSFT
> -
> [Packages]
> StdLib/StdLib.dec
> StdLibPrivateInternalFiles/DoNotUse.dec
> @@ -116,4 +114,5 @@
> #
> [BuildOptions]
> MSFT:*_*_IA32_CC_FLAGS = /GL-
> + GCC:*_*_IA32_CC_FLAGS = -fno-lto
> GCC:*_*_ARM_CC_FLAGS = -fno-lto
> --
> 2.33.0.windows.1
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds
2022-06-28 5:01 ` [edk2-devel] " Michael D Kinney
@ 2022-06-28 5:03 ` Michael D Kinney
0 siblings, 0 replies; 4+ messages in thread
From: Michael D Kinney @ 2022-06-28 5:03 UTC (permalink / raw)
To: devel@edk2.groups.io, Jayaprakash, N, Kinney, Michael D; +Cc: Rebecca Cran
pushed 02a77dd71c22c7c5b74e30b30a5e5b97f330f8f7
Mike
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Monday, June 27, 2022 10:01 PM
> To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Rebecca Cran <rebecca@nuviainc.com>
> Subject: RE: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds
>
> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
>
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N
> > Sent: Friday, June 17, 2022 1:42 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Rebecca Cran <rebecca@nuviainc.com>; Jayaprakash, N
> <n.jayaprakash@intel.com>
> > Subject: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3779
> >
> > This comit fixes the Python interpreter build issues with GCC 32 bit
> > compiler tool chain. The changes are needed in StdLibC as given below
> >
> > * Add __divmoddi4 to Gcc.c produced by newer GCC compilers
> > * Add -fno-lto to IA32 GCC builds of LibC.inf to support use of
> > GCC intrinsics from Gcc.c.
> > * Moved Main/Ia32/ftol2.obj in LibC.inf from binaries section to
> > Sources.IA32 required only for MSFT IA32 compiler tool chain
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Rebecca Cran <rebecca@nuviainc.com>
> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com>
> > ---
> > StdLib/LibC/CRT/Gcc.c | 7 +++++++
> > StdLib/LibC/LibC.inf | 7 +++----
> > 2 files changed, 10 insertions(+), 4 deletions(-)
> >
> > diff --git a/StdLib/LibC/CRT/Gcc.c b/StdLib/LibC/CRT/Gcc.c
> > index cbf4ec2..bc1a4b2 100644
> > --- a/StdLib/LibC/CRT/Gcc.c
> > +++ b/StdLib/LibC/CRT/Gcc.c
> > @@ -193,3 +193,10 @@ unsigned long long __umodti3(unsigned long long Dividend, unsigned long long Div
> >
> > return (unsigned long long) Remainder;
> > }
> > +
> > +INT64 __divmoddi4 (INT64 num, INT64 den, INT64 *rem_p)
> > +{
> > + DEBUG((DEBUG_INFO, "%a:\n", __func__));
> > + return DivS64x64Remainder (num, den, rem_p);
> > +}
> > +
> > diff --git a/StdLib/LibC/LibC.inf b/StdLib/LibC/LibC.inf
> > index 5bb2053..4771204 100644
> > --- a/StdLib/LibC/LibC.inf
> > +++ b/StdLib/LibC/LibC.inf
> > @@ -46,7 +46,8 @@
> > Main/Ia32/fpu_rmode.S | GCC
> > Main/Ia32/isinfl.c
> > Main/Ia32/isnanl.c
> > -
> > + Main/Ia32/ftol2.obj | MSFT
> > +
> > # Compiler helper (C RunTime) functions
> > CRT/Ia32/llmul.c | MSFT # __allmul
> > CRT/Ia32/llshl.c | MSFT # __allshl
> > @@ -88,9 +89,6 @@
> > [Sources.AARCH64]
> > Main/Arm/flt_rounds.c
> >
> > -[Binaries.IA32]
> > - LIB|Main/Ia32/ftol2.obj|*|MSFT
> > -
> > [Packages]
> > StdLib/StdLib.dec
> > StdLibPrivateInternalFiles/DoNotUse.dec
> > @@ -116,4 +114,5 @@
> > #
> > [BuildOptions]
> > MSFT:*_*_IA32_CC_FLAGS = /GL-
> > + GCC:*_*_IA32_CC_FLAGS = -fno-lto
> > GCC:*_*_ARM_CC_FLAGS = -fno-lto
> > --
> > 2.33.0.windows.1
> >
> >
> >
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-28 5:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17 8:41 [edk2-libc Patch 0/1] Changes to StdLib to facilitate gcc 32 bit builds Jayaprakash, N
2022-06-17 8:41 ` [edk2-libc Patch 1/1] edk2-libc/StdLib : Changes to Std LibC to facilitate 32 bit GCC builds Jayaprakash, N
2022-06-28 5:01 ` [edk2-devel] " Michael D Kinney
2022-06-28 5:03 ` Michael D Kinney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox