This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sh-elf doesn't support objc?
- To: John Wehle <john at feith dot com>
- Subject: Re: sh-elf doesn't support objc?
- From: Ovidiu Predescu <ovidiu at cup dot hp dot com>
- Date: Wed, 03 Jan 2001 00:52:31 -0800
- Cc: gcc at gcc dot gnu dot org
On Wed, 3 Jan 2001 01:00:55 -0500 (EST), John Wehle <john@feith.com> wrote:
> I'm trying to build a sh-elf cross compiler so I can use the simulator
> as another target for checking changes to the compiler. I take it objc
> isn't supported by this target given:
>
> ../../../../../../src/GNU/gcc-current/libobjc/sendmsg.c:38:31: missing binary operator before '
> :'
> make[1]: *** [sendmsg.lo] Error 1
> make[1]: Leaving directory `/usr/local/target/sh-elf/GNU/gcc-current/sh-elf/libobjc'
> make: *** [all-target-libobjc] Error 2
>
> occurs during the build, sendmsg.m contains:
>
> /* this is how we hack STRUCT_VALUE to be 1 or 0 */
> #define gen_rtx(args...) 1
> #define gen_rtx_MEM(args...) 1
> #define rtx int
>
> #if !defined(STRUCT_VALUE) || STRUCT_VALUE == 0
> #define INVISIBLE_STRUCT_RETURN 1
> #else
> #define INVISIBLE_STRUCT_RETURN 0
> #endif
>
> and sh.h contains:
>
> /* The Hitachi calling convention doesn't quite fit into this scheme since
> the address is passed like an invisible argument, but one that is always
> passed in memory. */
>
> #define STRUCT_VALUE \
> (TARGET_HITACHI ? 0 : gen_rtx_REG (Pmode, STRUCT_VALUE_REGNUM))
>
> or am I just doing something wrong?
You provide a very good hint, it looks like you need the following line in
sendmsg.m:
#define gen_rtx_REG(args...) 1
I've checked-in the change in the repository. Please let me know if it works for you.
Regards,
Ovidiu