diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-08-06 17:51:45 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-08-06 17:51:45 +0000 |
commit | 2ed9e5272e6952e34d5c23242136e37b9f65c630 (patch) | |
tree | 07e882143d1fcb2ff08cb3045152f8878714e664 | |
parent | 12183e0fbcace8903ebcbec1ef38aa25f000764b (diff) | |
download | gcc-2ed9e5272e6952e34d5c23242136e37b9f65c630.zip gcc-2ed9e5272e6952e34d5c23242136e37b9f65c630.tar.gz gcc-2ed9e5272e6952e34d5c23242136e37b9f65c630.tar.bz2 |
symbian.h (CC1_SPEC): Avoid passing duplicate options to the compiler.
* config/arm/symbian.h (CC1_SPEC): Avoid passing duplicate options
to the compiler. Use -fshort-wchar by default.
* gcc.dg/symbian4.c: Expect a 2-byte wchar_t, not a 4-byte
wchar_t.
* gcc.dg/symbian5.c: Test -fno-short-wchar.
From-SVN: r85648
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/symbian.h | 14 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/symbian4.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/symbian5.c | 8 |
5 files changed, 33 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1318c7c..a55a3d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-08-06 Mark Mitchell <mark@codesourcery.com> + + * config/arm/symbian.h (CC1_SPEC): Avoid passing duplicate options + to the compiler. Use -fshort-wchar by default. + 2004-08-06 Pat Haugen <pthaugen@us.ibm.com> * params.def (PARAM_MIN_CROSSJUMP_INSNS): New. diff --git a/gcc/config/arm/symbian.h b/gcc/config/arm/symbian.h index 4ad4f46..c03b428 100644 --- a/gcc/config/arm/symbian.h +++ b/gcc/config/arm/symbian.h @@ -34,8 +34,18 @@ Make all symbols hidden by default. Symbian OS expects that all exported symbols will be explicitly marked with - "__declspec(dllexport)". */ -#define CC1_SPEC "-fno-builtin -fvisibility=hidden -fno-short-enums" + "__declspec(dllexport)". + + Enumeration types use 4 bytes, even if the enumerals are small, + unless explicitly overridden. + + The wchar_t type is a 2-byte type, unless explicitly + overridden. */ +#define CC1_SPEC \ + "%{!fbuiltin:%{!fno-builtin:-fno-builtin}} " \ + "%{!fvisibility=*:-fvisibility=hidden} " \ + "%{!fshort-enums:%{!fno-short-enums:-fno-short-enums}} " \ + "%{!fshort-wchar:%{!fno-short-wchar:-fshort-wchar}} " #define CC1PLUS_SPEC CC1_SPEC /* Symbian OS does not use crt0.o, unlike the generic unknown-elf diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f2d9a97..63ca7a7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-08-06 Mark Mitchell <mark@codesourcery.com> + + * gcc.dg/symbian4.c: Expect a 2-byte wchar_t, not a 4-byte + wchar_t. + * gcc.dg/symbian5.c: Test -fno-short-wchar. + 2004-08-06 Paul Brook <paul@codesourcery.com> * gfortran.dg/ret_array_1.f90: New test. diff --git a/gcc/testsuite/gcc.dg/symbian4.c b/gcc/testsuite/gcc.dg/symbian4.c index 20585a7..aede7f5 100644 --- a/gcc/testsuite/gcc.dg/symbian4.c +++ b/gcc/testsuite/gcc.dg/symbian4.c @@ -1,5 +1,5 @@ /* { dg-do compile { target arm*-*-symbianelf* } } */ -/* Check that wchar_t is a 4-byte type. */ +/* Check that wchar_t is a 2-byte type. */ extern int i[sizeof (L'a')]; -int i[4]; +int i[2]; diff --git a/gcc/testsuite/gcc.dg/symbian5.c b/gcc/testsuite/gcc.dg/symbian5.c new file mode 100644 index 0000000..0bde6b0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/symbian5.c @@ -0,0 +1,8 @@ +/* { dg-do compile { target arm*-*-symbianelf* } } */ +/* { dg-options "-fno-short-wchar" } */ +/* Check that wchar_t is a 4-byte type when -fno-short-wchar is + used. */ + +extern int i[sizeof (L'a')]; +int i[4]; + |