This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Build problems; Please help
- To: jpbrahma at hotmail dot com
- Subject: Re: Build problems; Please help
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Mon, 24 Jul 2000 17:27:50 -0700
- CC: gcc at gcc dot gnu dot org
Hi Jagat,
: Here is the output
: ====================================================
: /home/jbrahma/local/zip/build-egcs/gcc/xgcc
: -I../../egcs-20000717/gcc/../include -mthumb -DL_muldi3
: /var/tmp/ccAGbkAf.s: Assembler messages:
: /var/tmp/ccAGbkAf.s:95: Error: bad instruction `push {r4,r5,r6,r7,lr}'
: -----------------------------------------------------------------
: -----------------------libgcc2.s---------------------------------
: .global ___muldi3
: .thumb_func
: ___muldi3:
: line 95:>>>> push {r4, r5, r6, r7, lr}
: @ Inlined umul_ppmm
: mov r5, r0, lsr #16
: mov r7, r2, lsr #16
: -----------------------------------------
: Moreover if I remove the option -mthumb it works.
Your problem is that __arm__ is being defined in Thumb mode. The
-mthumb switch tells gcc to produce Thumb opcodes. The libgcc support
file gcc/longlong.h however, has an inlined version of the umul_ppmm
function, which contains ARM instructions. This inlined version
therefore, should be used in ARM mode, not Thumb mode. The inclusion
of the inclined version is dependent upon the preprocessor symbol
__arm__ being defined. This symbol is supposed to be defined in ARM
mode, but not in Thumb mode.
I suspect that this is happening because your configuration is
including gcc/config/arm/vxarm.h which unilaterally defines __arm__ in
CPP_PREDEFINES. I would suggest that you try removing the definition
from there and allowing the CPP_SPEC code in arm.h to handle defining
this macro.
ie:
Index: gcc/config/arm/vxarm.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/vxarm.h,v
retrieving revision 1.3
diff -p -r1.3 vxarm.h
*** vxarm.h 2000/02/15 16:36:34 1.3
--- vxarm.h 2000/07/25 00:20:52
*************** Boston, MA 02111-1307, USA. */
*** 39,45 ****
%{!mcpu*:%{!march=*:-DCPU=ARM710A}} \
"
#undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-D__vxworks -D__arm__ -Acpu(arm) -Amachine(arm)"
/* VxWorks does all the library stuff itself. */
--- 39,45 ----
%{!mcpu*:%{!march=*:-DCPU=ARM710A}} \
"
#undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-D__vxworks -Acpu(arm) -Amachine(arm)"
/* VxWorks does all the library stuff itself. */
: Again it tries to build the multilib with --enable-multilib=no.
: Here is the configure script that I used.
:
: ../egcs-20000717/configure --prefix=/home/jbrahma/local
: --target=arm-wrs-vxworks \
: --with-newlib --disable-biendian --enable-languages="c c++"
: --enable-multilib=no \
: --with-cpu=strongarm110
I suspect (but I am not sure) that disabling multilibs only works at
the top level, ie for disabling building mutlilibbed version of
newlib, libstdc++ etc. I think that you cannot disable the building
of multilib'ed versions of libgcc.a if they are specified in the
relevant t- file.
My suggestion: edit the t- file and remove the multilibs that you do
not want. (I do not know which t- file you are using, because you say
that you have created a new target in configure.in. I suspect however
that it will probably be t-arm-coff. If you do have a new target in
configure.in, then I would suggest changing the defintion of
tmake_file to, say t-arm-vxworks, and then copying t-arm-coff to this
file, and then edititing it to your hearts content.
Cheers
Nick