Also, the 4.1.x series of GCC can be a little bit wonky (technical term) when compiling system tools.   Otherwise, since the problem is in assembler, I would suspect the binutils.<br>-Gedare<br><br><div class="gmail_quote">
On Thu, Sep 9, 2010 at 10:41 AM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On 09/09/2010 09:16 AM, Steven Grunza wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

-----Original Message-----<br>
From: Joel Sherrill [mailto:<a href="mailto:joel.sherrill@OARcorp.com" target="_blank">joel.sherrill@OARcorp.com</a>]<br>
Sent: Thursday, September 09, 2010 10:03 AM<br>
To: Steven Grunza<br>
Cc: <a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
Subject: Re: Problem with building powerpc-rtems4.11-gcc<br>
<br>
On 09/09/2010 08:55 AM, Steven Grunza wrote:<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'm currently changing build machines from a single CPU CentOS4<br>
       <br>
</blockquote>
box to a<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Core2Quad CentOS5 box.  Part of the change is the new machine has<br>
       <br>
</blockquote>
GCC<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
4.1.2 instead of 3.4.6.  The new machine is also running 64-bit<br>
       <br>
</blockquote>
(a first<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
for me) instead of 32-bit.<br>
<br>
<br>
Binutils 2.20.1 built and installed ok but gcc 4.5.1 is giving me<br>
       <br>
</blockquote>
a<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
strange error; it looks like the native compiler can't compile<br>
       <br>
</blockquote>
the<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
source to gcc-4.5.1:<br>
<br>
       <br>
</blockquote>
What is your PATH when building gcc?  I have a hunch that<br>
you forgot to put the RTEMS cross-assembler at the head<br>
of your PATH.  It is likely using the native as which won't<br>
work for powerpc code. :)<br>
     <br>
</blockquote>
<br>
Actually, it should be the native GCC since I'm building the<br>
cross-compiler.<br>
   <br>
</blockquote></div></div>
I didn't notice this was on a native gcc.  Still probably<br>
worth it to repeat the command by hand with a -v and see<br>
if what as it is using.  Worse case, you might have an old<br>
binutils.<div class="im"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Upon review of my path; however, I noticed something I consider a<br>
security error: my path had . in it.<br>
<br>
   <br>
</blockquote></div>
It has long been considered a security mistake.  I think this<br>
dates back to the earliest UNIX days. :)<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
grunzasr@c2q% echo $PATH<br>
/opt/rtems4.11/bin:.:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/l<br>
ocal/sbin:/usr/X11R6/bin<br>
<br>
<br>
I removed the . and then the build got past the problem (won't know if<br>
it worked until it finishes building).<br>
<br>
<br>
I consider the . in my PATH as a security error since it allows a<br>
someone to drop an executable (like vi) in a source directory and when<br>
the victim enters the command "vi foo.c" the victim runs the vi<br>
executable from the current directory instead of from /usr/bin or<br>
wherever it should be.<br>
<br>
<br>
I'm not sure why having the . in my path caused a problem but I don't<br>
mind removing it so I guess the problem is solved.<br>
<br>
<br>
   <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

make[2]: Entering directory<br>
`/home/grunzasr/rtems_head/tools/b-gcc-ppc/gcc'<br>
gcc -c  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall<br>
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-<br>
       <br>
</blockquote>
prototypes<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-Wmissing-format-attribute -Wold-style-definition -Wc++-compat<br>
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-<br>
       <br>
</blockquote>
4.5.1/gcc<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-I../../gcc-4.5.1/gcc/build -I../../gcc-4.5.1/gcc/../include<br>
-I../../gcc-4.5.1/gcc/../libcpp/include<br>
-I../../gcc-4.5.1/gcc/../libdecnumber<br>
-I../../gcc-4.5.1/gcc/../libdecnumber/dpd -I../libdecnumber<br>
       <br>
</blockquote>
\^M<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
                  -o build/genmodes.o ../../gcc-<br>
       <br>
</blockquote>
4.5.1/gcc/genmodes.c^M<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
/tmp/cc4psLZx.s: Assembler messages:^M<br>
/tmp/cc4psLZx.s:18: Error: Unrecognized opcode: `movq'^M<br>
/tmp/cc4psLZx.s:21: Error: Unrecognized opcode: `movq'^M<br>
<br>
<br>
My various tools are:<br>
<br>
grunzasr@c2q% gcc --version<br>
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)<br>
<br>
<br>
grunzasr@c2q% autoconf --version<br>
autoconf (GNU Autoconf) 2.67<br>
<br>
<br>
grunzasr@c2q% automake --version<br>
automake (GNU automake) 1.11.1<br>
<br>
<br>
grunzasr@c2q% m4 --version<br>
m4 (GNU M4) 1.4.14<br>
<br>
<br>
autoconf-2.67<br>
automake-1.11.1<br>
binutils-2.20.1<br>
gcc-4.5.1<br>
gmp-5.0.1<br>
m4-1.4.14<br>
mpc-0.8.1<br>
mpfr-2.4.2<br>
newlib-1.18.0<br>
<br>
<br>
I configured the b-gcc-ppc directory with the following:<br>
<br>
../gcc-4.5.1/configure --prefix=/opt/rtems4.11<br>
--target=powerpc-rtems4.11 --with-gnu-as --with-gnu-ld --with-<br>
       <br>
</blockquote>
newlib<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
--verbose --enable-threads --enable-languages="c,c++"<br>
<br>
<br>
If this didn't build ok on the CentOS4-32bit machine I would just<br>
       <br>
</blockquote>
assume<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
user error but I've run out of things to check.  Any suggestions<br>
       <br>
</blockquote>
on<br>
     <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
what's wrong or where to look?<br>
<br>
       <br>
</blockquote></blockquote>
   <br>
</blockquote>
<br>
<br></div></div><div class="im">
-- <br>
Joel Sherrill, Ph.D.             Director of Research&  Development<br>
joel.sherrill@OARcorp.com        On-Line Applications Research<br>
Ask me about RTEMS: a free RTOS  Huntsville AL 35805<br>
   Support Available             (256) 722-9985<br>
<br>
<br>
_______________________________________________<br></div><div><div></div><div class="h5">
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
</div></div></blockquote></div><br>