public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] misc fixes from crosstool-ng
@ 2023-05-28  3:05 Chris Packham
  2023-05-28  3:05 ` [PATCH 1/2] m68k: disallow unaligned access for m68010 and m68020 Chris Packham
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Packham @ 2023-05-28  3:05 UTC (permalink / raw)
  To: newlib; +Cc: Chris Packham

Crosstool-ng has been carrying these two patches for sometime. I'm not sure if
anyone actually tried to submit them upstream so I'm doing so now.

I can't speak with any authority on the m68k patch it appears to be at least
consistent with commit cf9d06b14 ("2010-02-08  Josef Wolf  <jw@raven.inka.de>").

The config patch seems to be consistent with other similar files so might just
be a longstanding bug no-one has noticed.

Chris Packham (2):
  m68k: disallow unaligned access for m68010 and m68020
  config/mt-d30v: Append flags

 config/mt-d30v                    | 4 ++--
 newlib/libc/machine/m68k/memcpy.S | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] m68k: disallow unaligned access for m68010 and m68020
  2023-05-28  3:05 [PATCH 0/2] misc fixes from crosstool-ng Chris Packham
@ 2023-05-28  3:05 ` Chris Packham
  2023-05-28  3:05 ` [PATCH 2/2] config/mt-d30v: Append flags Chris Packham
  2023-05-30 17:56 ` [PATCH 0/2] misc fixes from crosstool-ng Jeff Johnston
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Packham @ 2023-05-28  3:05 UTC (permalink / raw)
  To: newlib; +Cc: Remy Bohmer, Yann E. MORIN, Austin Morton, Chris Packham

From: Remy Bohmer <linux@bohmer.net>

Disable at least  m68010 and m68020. These processors certainly do not
like unaligned accesses.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Austin Morton <austinpmorton@gmail.com>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
 newlib/libc/machine/m68k/memcpy.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/machine/m68k/memcpy.S b/newlib/libc/machine/m68k/memcpy.S
index 2bb6de16c..464da95ef 100644
--- a/newlib/libc/machine/m68k/memcpy.S
+++ b/newlib/libc/machine/m68k/memcpy.S
@@ -15,7 +15,7 @@
 
 #include "m68kasm.h"
 
-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__)
+#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__)
 # define MISALIGNED_OK 1
 #else
 # define MISALIGNED_OK 0
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] config/mt-d30v: Append flags
  2023-05-28  3:05 [PATCH 0/2] misc fixes from crosstool-ng Chris Packham
  2023-05-28  3:05 ` [PATCH 1/2] m68k: disallow unaligned access for m68010 and m68020 Chris Packham
@ 2023-05-28  3:05 ` Chris Packham
  2023-05-30 17:56 ` [PATCH 0/2] misc fixes from crosstool-ng Jeff Johnston
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Packham @ 2023-05-28  3:05 UTC (permalink / raw)
  To: newlib; +Cc: Chris Packham

Append to CFLAGS_FOR_TARGET/CXXFLAGS_FOR_TARGET rather than replacing
them.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
 config/mt-d30v | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/mt-d30v b/config/mt-d30v
index d34b774b3..f5081aef5 100644
--- a/config/mt-d30v
+++ b/config/mt-d30v
@@ -1,4 +1,4 @@
 # Build libraries optimizing for space, not speed.
 # Turn off warnings about symbols named the same as registers
- CFLAGS_FOR_TARGET = -g -Os -Wa,-C
- CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C
+ CFLAGS_FOR_TARGET += -g -Os -Wa,-C
+ CXXFLAGS_FOR_TARGET += -g -Os -Wa,-C
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] misc fixes from crosstool-ng
  2023-05-28  3:05 [PATCH 0/2] misc fixes from crosstool-ng Chris Packham
  2023-05-28  3:05 ` [PATCH 1/2] m68k: disallow unaligned access for m68010 and m68020 Chris Packham
  2023-05-28  3:05 ` [PATCH 2/2] config/mt-d30v: Append flags Chris Packham
@ 2023-05-30 17:56 ` Jeff Johnston
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Johnston @ 2023-05-30 17:56 UTC (permalink / raw)
  To: Chris Packham; +Cc: newlib

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]

Patches applied to master.

Thanks,

-- Jeff J.

On Sat, May 27, 2023 at 11:06 PM Chris Packham <judge.packham@gmail.com>
wrote:

> Crosstool-ng has been carrying these two patches for sometime. I'm not
> sure if
> anyone actually tried to submit them upstream so I'm doing so now.
>
> I can't speak with any authority on the m68k patch it appears to be at
> least
> consistent with commit cf9d06b14 ("2010-02-08  Josef Wolf  <
> jw@raven.inka.de>").
>
> The config patch seems to be consistent with other similar files so might
> just
> be a longstanding bug no-one has noticed.
>
> Chris Packham (2):
>   m68k: disallow unaligned access for m68010 and m68020
>   config/mt-d30v: Append flags
>
>  config/mt-d30v                    | 4 ++--
>  newlib/libc/machine/m68k/memcpy.S | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> --
> 2.40.1
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-30 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-28  3:05 [PATCH 0/2] misc fixes from crosstool-ng Chris Packham
2023-05-28  3:05 ` [PATCH 1/2] m68k: disallow unaligned access for m68010 and m68020 Chris Packham
2023-05-28  3:05 ` [PATCH 2/2] config/mt-d30v: Append flags Chris Packham
2023-05-30 17:56 ` [PATCH 0/2] misc fixes from crosstool-ng Jeff Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).