This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sh-elf doesn't support objc?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]