From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 583DB7803CC for ; Fri, 20 Oct 2023 20:27:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=fm9vXddbVFFkke+E+jDCVCuMCKIFdTs65g13Y3OisWU=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1697833633; v=1; b=V9wyZtgEZ8MRnm/nYM69G82mmImakUNJWrz9eUqdN09YoLha3tbNjZPAFR2SrPZgRvJf0AWC BKXVwJwmxK7Bb4e0iGCKBi0gy3AHnrlUoUcmrvIm3EXQs4C2PAMHctt3r7i2ED17YoNHKRKmH9e Y16XohIEv4MPRJjzsqyXhiHs= X-Received: by 127.0.0.2 with SMTP id z6MeYY7687511xM1pU5MNm0u; Fri, 20 Oct 2023 13:27:13 -0700 X-Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by mx.groups.io with SMTP id smtpd.web10.64924.1697833632234964377 for ; Fri, 20 Oct 2023 13:27:12 -0700 X-Received: by mail-vs1-f47.google.com with SMTP id ada2fe7eead31-45853ab5556so446115137.2 for ; Fri, 20 Oct 2023 13:27:12 -0700 (PDT) X-Gm-Message-State: IDJsmN6xDwV9ZLssq09d3QZ3x7686176AA= X-Google-Smtp-Source: AGHT+IGeAD9NRgxaKhWL9cXfvQrBJpT5hI6EiNralAgZmY+zyvpBh/GPiZfIteH8izGPLQfRXVDvpzH5KfngZgQRLYs= X-Received: by 2002:a67:e002:0:b0:457:cd98:490b with SMTP id c2-20020a67e002000000b00457cd98490bmr2854272vsl.0.1697833631080; Fri, 20 Oct 2023 13:27:11 -0700 (PDT) MIME-Version: 1.0 References: <20231020140406.2432-1-n.jayaprakash@intel.com> <20231020140406.2432-2-n.jayaprakash@intel.com> In-Reply-To: <20231020140406.2432-2-n.jayaprakash@intel.com> From: "Pedro Falcato" Date: Fri, 20 Oct 2023 21:26:59 +0100 Message-ID: Subject: Re: [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: Enhance StdLib for supporting Aarch64 and ARM To: devel@edk2.groups.io, n.jayaprakash@intel.com Cc: Rebecca Cran , Michael D Kinney , Tyler Erickson , Ard Biesheuvel , Leif Lindholm Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pedro.falcato@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=V9wyZtgE; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Fri, Oct 20, 2023 at 3:04=E2=80=AFPM Jayaprakash, N wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4570 > > 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 > Cc: Michael D Kinney > Cc: Jayaprakash N > Signed-off-by: Tyler Erickson AIUI, if this is Tyler's commit, you need a From: Tyler Erickson (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) =3D 8 for 64-bit systems, whereas in MSVC sizeof(long) =3D 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). --=20 Pedro -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-