summaryrefslogtreecommitdiff
path: root/extra/locale
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2011-03-24 11:37:25 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-03-14 22:47:08 +0100
commit20221281b3d67880439cd1d16c151f4528d034fb (patch)
treead88cf11135638ef585eb489e0c63924b6855dac /extra/locale
parente3436cc40d8ebf4303d0ba5bb24f21edf41fd1e8 (diff)
extra/locale: Mark __codeset_8_bit_t as packed for Meta
gen_ldc writes offsets into the __locale_mmap_t structure. This relies on the host system having the same struct offsets as the target. On Meta, the structs are always aligned to a multiple of 4 bytes, and for these targets it is required for the struct to be packed so that it is more likely to match the host system (typically x86 which does not align structs). Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'extra/locale')
-rw-r--r--extra/locale/gen_wc8bit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extra/locale/gen_wc8bit.c b/extra/locale/gen_wc8bit.c
index a861caac4..e16b283a2 100644
--- a/extra/locale/gen_wc8bit.c
+++ b/extra/locale/gen_wc8bit.c
@@ -182,7 +182,11 @@ int main(int argc, char **argv)
printf("\tunsigned char idx8c2wc[%d];\n", C2WC_IDX_LEN);
printf("\tunsigned char idx8wc2c[%d];\n", II_LEN);
#endif
+#ifndef __metag__
printf("} __codeset_8_bit_t;\n\n");
+#else
+ printf("} __attribute__((__packed__)) __codeset_8_bit_t;\n\n");
+#endif /* __metag__ */
printf("#ifdef WANT_DATA\n\n");
printf("static const __codeset_8_bit_t codeset_8_bit[%d] = {\n", argc-1);