[0/5] newlib: m68k-atari-dev fixes.

Message ID 1759129079498.7.894@webmail-backend-production-5df46479fc-qw6kr
State New
Headers

Commit Message

micael@hildenborg.com Sept. 29, 2025, 6:57 a.m. UTC
  Collection of bugfixes after feedback from community.

Should only affect the target: m68k-atari-dev.
Mikael Hildenborg (5):
m68k-atari-elf: fixed wrong number of seconds between 1900 and 1980.
m68k-atari-elf: changed stack and heap handling to mimic mintlib.
m68k-atari-elf: updated readme
m68k-atari-elf: proper setup of environment variables and program
arguments.
m68k-atari-elf: specs file declares environ as undefined.

libgloss/m68k/atari/README | 26 +--
libgloss/m68k/atari/atari-crt0.S | 55 +-----
libgloss/m68k/atari/atari-crti.S | 123 +++++++++----
libgloss/m68k/atari/atari-environ.c | 267 +++++++++++++++++++++++++++-
libgloss/m68k/atari/atari-gettod.c | 2 +-
libgloss/m68k/atari/atari-sbrk.c | 18 +-
libgloss/m68k/atari/atari-tos.specs | 2 +-
7 files changed, 389 insertions(+), 104 deletions(-)

--
2.43.0
  

Comments

micael@hildenborg.com Nov. 17, 2025, 9:10 a.m. UTC | #1
BUMP


Also, I wrote wrong below: The only target affected whould be "m68k-atari-elf".

/Mikael Hildenborg.

Den måndag 29 september 2025 kl. 08:57:59 +02:00, skrev <micael@hildenborg.com>:

> Collection of bugfixes after feedback from community.
> Should only affect the target: m68k-atari-dev.
> 
> Mikael Hildenborg (5):
> m68k-atari-elf: fixed wrong number of seconds between 1900 and 1980.
> m68k-atari-elf: changed stack and heap handling to mimic mintlib.
> m68k-atari-elf: updated readme
> m68k-atari-elf: proper setup of environment variables and program
> arguments.
> m68k-atari-elf: specs file declares environ as undefined.
> 
> libgloss/m68k/atari/README | 26 +--
> libgloss/m68k/atari/atari-crt0.S | 55 +-----
> libgloss/m68k/atari/atari-crti.S | 123 +++++++++----
> libgloss/m68k/atari/atari-environ.c | 267 +++++++++++++++++++++++++++-
> libgloss/m68k/atari/atari-gettod.c | 2 +-
> libgloss/m68k/atari/atari-sbrk.c | 18 +-
> libgloss/m68k/atari/atari-tos.specs | 2 +-
> 7 files changed, 389 insertions(+), 104 deletions(-)
> 
> --
> 2.43.0
> 
>
  
Jeff Johnston Nov. 17, 2025, 5:54 p.m. UTC | #2
Hi Micael,

Sorry for the delay.  There appears to be something wrong with your change
to the seconds from 1900-1980 value.  According to a simple web search, it
should be close to the original value (10 digits) while the new updated
value is only 9 digits.  Can you explain this?

-- Jeff J.



On Mon, Nov 17, 2025 at 4:15 AM <micael@hildenborg.com> wrote:

> BUMP
>
> Also, I wrote wrong below: The only target affected whould be
> "m68k-atari-elf".
>
> /Mikael Hildenborg.
>
>
> Den måndag 29 september 2025 kl. 08:57:59 +02:00, skrev <
> micael@hildenborg.com>:
>
> Collection of bugfixes after feedback from community.
> Should only affect the target: m68k-atari-dev.
>
> Mikael Hildenborg (5):
>   m68k-atari-elf: fixed wrong number of seconds between 1900 and 1980.
>   m68k-atari-elf: changed stack and heap handling to mimic mintlib.
>   m68k-atari-elf: updated readme
>   m68k-atari-elf: proper setup of environment variables and program
>     arguments.
>   m68k-atari-elf: specs file declares environ as undefined.
>
> libgloss/m68k/atari/README          |  26 +--
> libgloss/m68k/atari/atari-crt0.S    |  55 +-----
> libgloss/m68k/atari/atari-crti.S    | 123 +++++++++----
> libgloss/m68k/atari/atari-environ.c | 267 +++++++++++++++++++++++++++-
> libgloss/m68k/atari/atari-gettod.c  |   2 +-
> libgloss/m68k/atari/atari-sbrk.c    |  18 +-
> libgloss/m68k/atari/atari-tos.specs |   2 +-
> 7 files changed, 389 insertions(+), 104 deletions(-)
>
> --
> 2.43.0
>
>
>
  
micael@hildenborg.com Nov. 17, 2025, 8:50 p.m. UTC | #3
Hi Jeff,

The value is correct, but the name of the define is wrong.
SEC_1900_TO_1980 should be named SEC_1970_TO_1980.
And the same goes for SEC_1900_TO_MAX.

I can fix it and mail another patch.

Good catch by the way.


/Mikael.




Den måndag 17 november 2025 kl. 18:54:53 +01:00, skrev Jeff Johnston <jjohnstn@redhat.com>:

> Hi Micael,
> 
> Sorry for the delay. There appears to be something wrong with your change to the seconds from 1900-1980 value. According to a simple web search, it should be close to the original value (10 digits) while the new updated value is only 9 digits. Can you explain this?
> 
> -- Jeff J.
> 
> 
> 
> 
> On Mon, Nov 17, 2025 at 4:15 AM <<micael@hildenborg.com>> wrote:
> 
> > BUMP
> > 
> > Also, I wrote wrong below: The only target affected whould be "m68k-atari-elf".
> > 
> > /Mikael Hildenborg.
> > 
> > 
> > Den måndag 29 september 2025 kl. 08:57:59 +02:00, skrev <<micael@hildenborg.com>>:
> > 
> > > Collection of bugfixes after feedback from community.
> > > Should only affect the target: m68k-atari-dev.
> > > 
> > > Mikael Hildenborg (5):
> > > m68k-atari-elf: fixed wrong number of seconds between 1900 and 1980.
> > > m68k-atari-elf: changed stack and heap handling to mimic mintlib.
> > > m68k-atari-elf: updated readme
> > > m68k-atari-elf: proper setup of environment variables and program
> > > arguments.
> > > m68k-atari-elf: specs file declares environ as undefined.
> > > 
> > > libgloss/m68k/atari/README | 26 +--
> > > libgloss/m68k/atari/atari-crt0.S | 55 +-----
> > > libgloss/m68k/atari/atari-crti.S | 123 +++++++++----
> > > libgloss/m68k/atari/atari-environ.c | 267 +++++++++++++++++++++++++++-
> > > libgloss/m68k/atari/atari-gettod.c | 2 +-
> > > libgloss/m68k/atari/atari-sbrk.c | 18 +-
> > > libgloss/m68k/atari/atari-tos.specs | 2 +-
> > > 7 files changed, 389 insertions(+), 104 deletions(-)
> > > 
> > > --
> > > 2.43.0
> > > 
> > > 
> >
  
micael@hildenborg.com Dec. 3, 2025, 4 p.m. UTC | #4
Hi Jeff,

I fixed the issue with macro names and did a git rebase, so here are a new set of patches that replaces the ones I previously mailed.

And as previously mentioned, they will only affect the m68k-atari-elf target.

/Mikael.



Den måndag 17 november 2025 kl. 21:50:59 +01:00, skrev <micael@hildenborg.com>:

> Hi Jeff,
> 
> The value is correct, but the name of the define is wrong.
> SEC_1900_TO_1980 should be named SEC_1970_TO_1980.
> And the same goes for SEC_1900_TO_MAX.
> 
> I can fix it and mail another patch.
> 
> Good catch by the way.
> 
> /Mikael.
> 
> 
> 
> 
> 
> Den måndag 17 november 2025 kl. 18:54:53 +01:00, skrev Jeff Johnston <jjohnstn@redhat.com>:
> 
> > Hi Micael,
> > 
> > Sorry for the delay. There appears to be something wrong with your change to the seconds from 1900-1980 value. According to a simple web search, it should be close to the original value (10 digits) while the new updated value is only 9 digits. Can you explain this?
> > 
> > -- Jeff J.
> > 
> > 
> > 
> > 
> > On Mon, Nov 17, 2025 at 4:15 AM <<micael@hildenborg.com>> wrote:
> > 
> > > BUMP
> > > 
> > > Also, I wrote wrong below: The only target affected whould be "m68k-atari-elf".
> > > 
> > > /Mikael Hildenborg.
> > > 
> > > 
> > > Den måndag 29 september 2025 kl. 08:57:59 +02:00, skrev <<micael@hildenborg.com>>:
> > > 
> > > > Collection of bugfixes after feedback from community.
> > > > Should only affect the target: m68k-atari-dev.
> > > > 
> > > > Mikael Hildenborg (5):
> > > > m68k-atari-elf: fixed wrong number of seconds between 1900 and 1980.
> > > > m68k-atari-elf: changed stack and heap handling to mimic mintlib.
> > > > m68k-atari-elf: updated readme
> > > > m68k-atari-elf: proper setup of environment variables and program
> > > > arguments.
> > > > m68k-atari-elf: specs file declares environ as undefined.
> > > > 
> > > > libgloss/m68k/atari/README | 26 +--
> > > > libgloss/m68k/atari/atari-crt0.S | 55 +-----
> > > > libgloss/m68k/atari/atari-crti.S | 123 +++++++++----
> > > > libgloss/m68k/atari/atari-environ.c | 267 +++++++++++++++++++++++++++-
> > > > libgloss/m68k/atari/atari-gettod.c | 2 +-
> > > > libgloss/m68k/atari/atari-sbrk.c | 18 +-
> > > > libgloss/m68k/atari/atari-tos.specs | 2 +-
> > > > 7 files changed, 389 insertions(+), 104 deletions(-)
> > > > 
> > > > --
> > > > 2.43.0
> > > > 
> > > > 
> > > 
>
  
Jeff Johnston Dec. 11, 2025, 9:25 p.m. UTC | #5
Thanks Mikael,

Patches pushed to main.

-- Jeff J.

On Wed, Dec 3, 2025 at 11:00 AM <micael@hildenborg.com> wrote:

> Hi Jeff,
>
> I fixed the issue with macro names and did a git rebase, so here are a new
> set of patches that replaces the ones I previously mailed.
> And as previously mentioned, they will only affect the m68k-atari-elf
> target.
>
> /Mikael.
>
>
>
>
> Den måndag 17 november 2025 kl. 21:50:59 +01:00, skrev <
> micael@hildenborg.com>:
>
> Hi Jeff,
>
> The value is correct, but the name of the define is wrong.
> SEC_1900_TO_1980 should be named SEC_1970_TO_1980.
> And the same goes for SEC_1900_TO_MAX.
>
> I can fix it and mail another patch.
>
> Good catch by the way.
>
> /Mikael.
>
>
>
>
>
> Den måndag 17 november 2025 kl. 18:54:53 +01:00, skrev Jeff Johnston <
> jjohnstn@redhat.com>:
>
> Hi Micael,
>
> Sorry for the delay.  There appears to be something wrong with your change
> to the seconds from 1900-1980 value.  According to a simple web search, it
> should be close to the original value (10 digits) while the new updated
> value is only 9 digits.  Can you explain this?
>
> -- Jeff J.
>
>
>
> On Mon, Nov 17, 2025 at 4:15 AM <micael@hildenborg.com> wrote:
>
> BUMP
>
> Also, I wrote wrong below: The only target affected whould be
> "m68k-atari-elf".
>
> /Mikael Hildenborg.
>
>
> Den måndag 29 september 2025 kl. 08:57:59 +02:00, skrev <
> micael@hildenborg.com>:
>
> Collection of bugfixes after feedback from community.
> Should only affect the target: m68k-atari-dev.
>
> Mikael Hildenborg (5):
>   m68k-atari-elf: fixed wrong number of seconds between 1900 and 1980.
>   m68k-atari-elf: changed stack and heap handling to mimic mintlib.
>   m68k-atari-elf: updated readme
>   m68k-atari-elf: proper setup of environment variables and program
>     arguments.
>   m68k-atari-elf: specs file declares environ as undefined.
>
> libgloss/m68k/atari/README          |  26 +--
> libgloss/m68k/atari/atari-crt0.S    |  55 +-----
> libgloss/m68k/atari/atari-crti.S    | 123 +++++++++----
> libgloss/m68k/atari/atari-environ.c | 267 +++++++++++++++++++++++++++-
> libgloss/m68k/atari/atari-gettod.c  |   2 +-
> libgloss/m68k/atari/atari-sbrk.c    |  18 +-
> libgloss/m68k/atari/atari-tos.specs |   2 +-
> 7 files changed, 389 insertions(+), 104 deletions(-)
>
> --
> 2.43.0
>
>
>
>
>
  

Patch

From c71bddf39a040492dcfdb27c386227c816b63da4 Mon Sep 17 00:00:00 2001
From: Mikael Hildenborg <micael@hildenborg.com>
Date: Fri, 26 Sep 2025 08:47:21 +0200
Subject: [PATCH 5/5] m68k-atari-elf: specs file declares environ as undefined.

---
 libgloss/m68k/atari/atari-tos.specs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgloss/m68k/atari/atari-tos.specs b/libgloss/m68k/atari/atari-tos.specs
index 00781c4fc..02037132c 100644
--- a/libgloss/m68k/atari/atari-tos.specs
+++ b/libgloss/m68k/atari/atari-tos.specs
@@ -4,7 +4,7 @@ 
 # Atari gcc specs
 
 *link:
-+ --emit-relocs --no-warn-rwx-segments -static --no-warn-execstack --undefined=__errno -T atari-tos.ld
++ --emit-relocs --no-warn-rwx-segments -static --no-warn-execstack --undefined=environ --undefined=__errno -T atari-tos.ld
 
 *lib:
 + -latari-tos
-- 
2.43.0