Error building gcc 4.2.1 for sparc target?

Joel Sherrill joel.sherrill at OARcorp.com
Thu Apr 3 13:30:13 UTC 2008


mike wrote:
> Never mind. Found it. It was an older version of 'as'. Building
> a newer version of binutils 2.17 for host fixed it.
>   
Something else changed in your environment.

You are getting invalid instruction errors from the assembler.
It looks like as in your path is NOT the native one.  push is
a native x86 instruction not a SPARC one.

But the bigger issue is Ralf's point.. why not use the RPMs?
We have an apt/yum repository and it would have taken
less time to install them that write the two emails.

--joel
> mike wrote:
>   
>> Hi all,
>>
>> My host: Linux Redhat. Host tools: gcc 4.1.1
>> Target : sparc-rtems
>>
>> I followed the documentation to build binutils 2.17 without any problem.
>> When I tried to build gcc 4.2.1 (same errors for 4.1.1) for
>> 'sparc-rtems' target following the doc,
>> I got the following errors during "make all". I would really appreciate
>> any pointers.
>> Thank you.
>> -mike-
>>
>>         gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall
>> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
>> -Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H -I.
>> -I. -I../../gcc-4.2.1/gcc -I../../gcc-4.2.1/gcc/.
>> -I../../gcc-4.2.1/gcc/../include
>> -I../../gcc-4.2.1/gcc/../libcpp/include
>> -I../../gcc-4.2.1/gcc/../libdecnumber -I../libdecnumber
>> -DSTANDARD_STARTFILE_PREFIX=\"../../../\"
>> -DSTANDARD_EXEC_PREFIX=\"/opt/rtems-4.8.0-tools/lib/gcc/\"
>> -DSTANDARD_LIBEXEC_PREFIX=\"/opt/rtems-4.8.0-tools/libexec/gcc/\"
>> -DDEFAULT_TARGET_VERSION=\"4.2.1\"
>> -DDEFAULT_TARGET_MACHINE=\"sparc-rtems\"
>> -DSTANDARD_BINDIR_PREFIX=\"/opt/rtems-4.8.0-tools/bin/\"
>> -DTOOLDIR_BASE_PREFIX=\"../../../../\"  `test "X${SHLIB_LINK}" = "X" ||
>> test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` `test
>> "X${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` \
>>                 -I. -I. -I../../gcc-4.2.1/gcc -I../../gcc-4.2.1/gcc/.
>> -I../../gcc-4.2.1/gcc/../include
>> -I../../gcc-4.2.1/gcc/../libcpp/include
>> -I../../gcc-4.2.1/gcc/../libdecnumber -I../libdecnumber
>> ../../gcc-4.2.1/gcc/cp/g++spec.c)
>> /tmp/ccVxeQoU.s: Assembler messages:
>> /tmp/ccVxeQoU.s:17: Error: Unknown opcode: `pushl'
>> /tmp/ccVxeQoU.s:19: Error: Illegal operands
>> /tmp/ccVxeQoU.s:22: Error: Unknown opcode: `xorl'
>> /tmp/ccVxeQoU.s:23: Error: Unknown opcode: `leave'
>> /tmp/ccVxeQoU.s:137: Error: Unknown opcode: `pushl'
>> /tmp/ccVxeQoU.s:139: Error: Illegal operands
>> /tmp/ccVxeQoU.s:141: Error: Unknown opcode: `pushl'
>> /tmp/ccVxeQoU.s:143: Error: Unknown opcode: `pushl'
>> /tmp/ccVxeQoU.s:145: Error: Unknown opcode: `pushl'
>> /tmp/ccVxeQoU.s:147: Error: Unknown opcode: `subl'
>> /tmp/ccVxeQoU.s:149: Error: Illegal operands
>>
>>
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.com
>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>
>>
>>
>>     
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list