This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [AArch64] nosys.specs and printf
Here is a patch to correct libnosys configuration for aarch64.
Linker warning still be emitted as agreed.
Alex
On Fri, Sep 22, 2017 at 11:05 AM, Tamar Christina
<Tamar.Christina@arm.com> wrote:
>
>
>> -----Original Message-----
>> From: Alexander Fedotov [mailto:alfedotov@gmail.com]
>> Sent: 20 September 2017 16:24
>> To: Jon Beniston
>> Cc: Tamar Christina; newlib@sourceware.org; nd
>> Subject: Re: [AArch64] nosys.specs and printf
>>
>> >>That's not doing anything other than setting errno to ENOSYS to indicate
>> it's not available.
>> Yes the same as ARM.
>>
>> So to sum up. We have several points:
>> 1. ARM port doesn't warn user about missing _write(). While this function is
>> present in final ELF and does nothing.
>> 2. AArch64 warns "warning: _write() is not implemented and will always fail"
>> while _write() it is present in ELF.
>
> Both of these are probably correct, while I consider the ARM behaviour to be the incorrect one
> It may be so for historical reasons. I'm not really sure.
>
>> 3. libnosys has inconsistent configuration against rdimon. It is impossible to
>> switch between rdimon.specs and nosys.specs.
>
> I don't quite get what you mean with this, but I assume you mean that using nosys.specs with AArch64
> Results in link errors if you use I/O. Again this is because we don't support nosys for AArch64.
>
> That said, a patch to have libnosys compile (with warnings) for AArch64 would be fine.
>
> Tamar.
>>
>> Thoughts ?
>>
>> Alex
>>
>> On Wed, Sep 20, 2017 at 5:08 PM, Jon Beniston <jon@beniston.com> wrote:
>> >> Well at least _write is here:
>> >
>> > That's not doing anything other than setting errno to ENOSYS to indicate it's
>> not available.
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> AF
--
Best regards,
AF
From 53a46d49cedd80386ad527891b8324cafaeaea2f Mon Sep 17 00:00:00 2001
From: Alexander Fedotov <alfedotov@gmail.com>
Date: Fri, 29 Sep 2017 22:10:47 +0300
Subject: [PATCH] adjust libnosys config for aarch64 to avoid linker error when
switching from rdimon.specs to nosys.specs
---
libgloss/libnosys/configure | 2 ++
libgloss/libnosys/configure.in | 2 ++
2 files changed, 4 insertions(+)
diff --git a/libgloss/libnosys/configure b/libgloss/libnosys/configure
index fbe7db7..046dca5 100755
--- a/libgloss/libnosys/configure
+++ b/libgloss/libnosys/configure
@@ -2009,6 +2009,8 @@ case "${target}" in
;;
a29k-amd-udi)
;;
+ aarch64*-*-*)
+ ;;
arc-*-*)
;;
arm*-*-*)
diff --git a/libgloss/libnosys/configure.in b/libgloss/libnosys/configure.in
index 1d4846b..d3d8c89 100644
--- a/libgloss/libnosys/configure.in
+++ b/libgloss/libnosys/configure.in
@@ -43,6 +43,8 @@ case "${target}" in
;;
a29k-amd-udi)
;;
+ aarch64*-*-*)
+ ;;
arc-*-*)
;;
arm*-*-*)
--
2.7.4