From: "Pedro Falcato" <pedro.falcato@gmail.com>
To: devel@edk2.groups.io, n.jayaprakash@intel.com
Cc: Rebecca Cran <rebecca@bsdio.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Tyler Erickson <tyler.erickson@seagate.com>,
Ard Biesheuvel <ardb@kernel.org>,
Leif Lindholm <llindhol@qti.qualcomm.com>
Subject: Re: [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: Enhance StdLib for supporting Aarch64 and ARM
Date: Fri, 20 Oct 2023 21:26:59 +0100 [thread overview]
Message-ID: <CAKbZUD2Aze9cNyKfKXtVXBdR+1mvZOjY=VTMzFVF3eACfK1s=w@mail.gmail.com> (raw)
In-Reply-To: <20231020140406.2432-2-n.jayaprakash@intel.com>
On Fri, Oct 20, 2023 at 3:04 PM Jayaprakash, N <n.jayaprakash@intel.com> wrote:
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4570
>
> This commit is for processing the below PR on edk2-libc repo
> https://github.com/tianocore/edk2-libc/pull/3
> These are the changes introduced to StdLib to build
> an application for the UEFI shell.
> Added format macros for int types to Aarch64, ARM, and Ia32.
> Also modified the X64 macros so that everything would build
> when they are used.
> Added some macros that can be used for compatibility that define when
> socklen_t has been defined.
> Added getopt_long parser from OpenBSD to provide long and
> short option parsing capability with getopt.
This patch is unreviewable. You'd think (from the subject) that it's
an ARM centric change, but it ends up being a whole squashed up
sequence of unrelated changes.
Please separate this into one commit per change.
>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Jayaprakash N <n.jayaprakash@intel.com>
> Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
AIUI, if this is Tyler's commit, you need a From: Tyler Erickson
<tyler.erickson@seagate.com> (since this is his commit?). Also
probably your own Signed-off-by, I'm not sure.
Lastly, you can't just take NetBSD's headers like this for one simple
reason: UNIX systems have used LP64 for ages, Windows systems use
LLP64. What does this mean?
UNIX (and thus, code compiled using gcc or clang
linux/netbsd/whatever) has sizeof(long) = 8 for 64-bit systems,
whereas in MSVC sizeof(long) = 4.
So macros like:
> #define PRIdPTR "ld" /* intptr_t */
> #define PRIuPTR "lu" /* uintptr_t */
etc, are not correct on MSVC.
Tip: since it's pretty safe, you can probably have two headers: 32-bit
architectures (ILP32, should not change between MSVC and GCC/clang)
and 64-bit architectures (LP64 on GCC/clang, LLP64 on MSVC). The same
goes for the other type-related headers (I have *no* idea if those are
correct).
--
Pedro
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109871): https://edk2.groups.io/g/devel/message/109871
Mute This Topic: https://groups.io/mt/102081650/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-10-20 20:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 14:04 [edk2-devel] [edk2-libc Patch 0/1] edk2-libc - Enhancements to StdLibc Jayaprakash, N
2023-10-20 14:04 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: Enhance StdLib for supporting Aarch64 and ARM Jayaprakash, N
2023-10-20 19:54 ` Michael D Kinney
2023-10-23 12:19 ` Leif Lindholm
2023-10-20 20:26 ` Pedro Falcato [this message]
2023-10-22 16:15 ` Jayaprakash, N
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='CAKbZUD2Aze9cNyKfKXtVXBdR+1mvZOjY=VTMzFVF3eACfK1s=w@mail.gmail.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