From Joel Sherrill:
Gcc on the head fails to compile arm-rtems4.7 at the following point
when Ada is enabled.
../../xgcc -B../../ -c -g -O2 -W -Wall -gnatpg s-auxdec.adb -o
s-auxdec.ads:286:13: alignment for "Aligned_Word" must be at least 4
The code is:
type Aligned_Word is record
Value : Short_Integer;
for Aligned_Word'Alignment use
Integer'Min (2, Standard'Maximum_Alignment);
I (Laurent) think Standard'Maximum_Alignment comes from ada/targtyps.c
return BIGGEST_ALIGNMENT / BITS_PER_UNIT;
Joel confirmed that changing "Min (2" to "Min (4" enable this file to be compiled, however my reading of the source would imply that BIGGEST_ALIGNMENT is at least 32 on arm, so something else must be at play here, any idea?
> Joel confirmed that changing "Min (2" to "Min (4" enable this file to be
> compiled, however my reading of the source would imply that BIGGEST_ALIGNMENT
> is at least 32 on arm, so something else must be at play here, any idea?
Excerpt from config/arm/arm.h:
/* Setting STRUCTURE_SIZE_BOUNDARY to 32 produces more efficient code, but the
value set in previous versions of this toolchain was 8, which produces more
compact structures. The command line option -mstructure_size_boundary=<n>
can be used to change this value. For compatibility with the ARM SDK
however the value should be left at 32. ARM SDT Reference Manual (ARM DUI
0020D) page 2-20 says "Structures are aligned on word boundaries".
The AAPCS specifies a value of 8. */
#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
extern int arm_structure_size_boundary;
/* This is the value used to initialize arm_structure_size_boundary. If a
particular arm target wants to change the default value it should change
the definition of this macro, not STRUCTURE_SIZE_BOUNDARY. See netbsd.h
for an example of this. */
#define DEFAULT_STRUCTURE_SIZE_BOUNDARY 32
Subject: Bug 24857
Date: Thu Nov 17 11:13:18 2005
New Revision: 107116
2005-11-17 Laurent GUERBY <email@example.com>
* s-auxdec-empty.ads, s-auxdec-empty.adb: New files.
Subject: Bug 24857
Date: Fri Nov 18 11:44:20 2005
New Revision: 107175
2005-11-18 Laurent GUERBY <firstname.lastname@example.org>
* Makefile.in: Use s-auxdec-empty for RTEMS.
arm-rtems4.7 now builds. The empty version is used for all RTEMS target.