Patchwork [PR,48690] fix compilation for m68k-*-netbesdelf

login
register
mail settings
Submitter Andreas Tobler
Date April 22, 2011, 6:12 p.m.
Message ID <4DB1C513.9050102@fgznet.ch>
Download mbox | patch
Permalink /patch/92568/
State New
Headers show

Comments

Andreas Tobler - April 22, 2011, 6:12 p.m.
Hi all,

the attached patch fixes the build for m68k-netbsdelf1.6.1. Tested with 
a cross build for c,c++ and fortran.

The breakage is alive since r121736.
The patch does the same as m68k linux does.

Ok for trunk?

Thanks,
Andreas

2011-04-22  Andreas Tobler  <andreast@fgznet.ch>

	PR target/48690
	* config/m68k/netbsd-elf.h: Undef STRICT_ALIGNMENT.
Andreas Schwab - April 22, 2011, 7:05 p.m.
Andreas Tobler <andreast-list@fgznet.ch> writes:

> Index: config/m68k/netbsd-elf.h
> ===================================================================
> --- config/m68k/netbsd-elf.h	(revision 172861)
> +++ config/m68k/netbsd-elf.h	(working copy)
> @@ -97,7 +97,11 @@
>  #undef PTRDIFF_TYPE
>  #define PTRDIFF_TYPE "int"
>
> +/* for 68k machines this only needs to be TRUE for the 68000 */
>
> +#undef STRICT_ALIGNMENT
> +#define STRICT_ALIGNMENT 0

The 68010 still requires strict alignment.

Andreas.
Andreas Tobler - April 22, 2011, 7:35 p.m.
On 22.04.11 21:05, Andreas Schwab wrote:
> Andreas Tobler<andreast-list@fgznet.ch>  writes:
>
>> Index: config/m68k/netbsd-elf.h
>> ===================================================================
>> --- config/m68k/netbsd-elf.h	(revision 172861)
>> +++ config/m68k/netbsd-elf.h	(working copy)
>> @@ -97,7 +97,11 @@
>>   #undef PTRDIFF_TYPE
>>   #define PTRDIFF_TYPE "int"
>>
>> +/* for 68k machines this only needs to be TRUE for the 68000 */
>>
>> +#undef STRICT_ALIGNMENT
>> +#define STRICT_ALIGNMENT 0
>
> The 68010 still requires strict alignment.

I am not familiar with m68k. I just tried to fix the build issue from 48690.

How does linux/m68k handle this? Or was your comment only about the 
'comment'?

Andreas
Andreas Schwab - April 22, 2011, 7:46 p.m.
Andreas Tobler <andreast-list@fgznet.ch> writes:

> How does linux/m68k handle this?

It does not support the 68010.

Andreas.

Patch

Index: config/m68k/netbsd-elf.h
===================================================================
--- config/m68k/netbsd-elf.h	(revision 172861)
+++ config/m68k/netbsd-elf.h	(working copy)
@@ -97,7 +97,11 @@ 
  #undef PTRDIFF_TYPE
  #define PTRDIFF_TYPE "int"

+/* for 68k machines this only needs to be TRUE for the 68000 */

+#undef STRICT_ALIGNMENT
+#define STRICT_ALIGNMENT 0
+
  /* XXX
     Here is a bunch of stuff lifted from m68kelf.h.  We don't use that
     file directly, because it has a lot of baggage we don't want.  */