From: kaz K. <kk...@rr...> - 2001-03-06 22:52:53
|
Hi, leg...@ya... wrote: > hey , > in the gcc ,the file gcc/config/sh/sh.h have > > #define TARGET_DEFAULT (SH3_BIT|SH2_BIT|LITTLE_ENDIAN_BIT) > > i don't think it 's suitable . because when i use the gcc to compile the > program for sh2 ( -m2 ) . in the code , it produce the instruction > "shad" , it is a instruction for sh3 . > so i change it to > > #define TARGET_DEFAULT (0) > > just as it is in the standard gcc-2.95.2. Which non-standard gcc-2.95.2 you are talking about? I can't find such problem in our patch to gcc-2.95.2, though any patches to gcc-2.95.2 may be obsolete now. > but the problem is when i use this gcc to compile the program , it has > error > > (.text+0x694): undefined reference to `__ashiftrt_r4_8' > (.text+0x774): undefined reference to `__ashiftrt_r4_8' > > anybody has the advice about it , i will appreciate in advance. You could check easily that __ashiftrt_r4_8 is defined or not in your libgcc.a by using cross nm. If not, it seems that your gcc has configuration problems. In that case, check your gcc/config/sh/t-linux or gcc/config/sh/t-sh (this depends how you configure gcc) includes a line like LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \ or not. (Or just try the newer gcc ftp.m17n.org:/pub/super-h/testing/gcc-core-20001120.tar.gz ftp.m17n.org:/pub/super-h/testing/gcc-20001120.diff.gz though I don't use it with -m2 at all. Is there someone who does it already?) kaz |