This is the mail archive of the gcc-help@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]

libcgg2.c junk characters - compile error


Hi,
I am trying to compile gcc 2.95.3 (or 2.95.2 - whichever works) on my 
mac running OS X 10.1. I decided to do this after I realized that my 
version of cc (apple's mutant of gcc 2.95.2) does not have standard c++ 
libraries that I needed to compile another package. But I run into some 
strange problems. The compilation exists with the following error:
-------------------
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 
_ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 
_floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi 
_fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi 
_fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb 
_shtab _clear_cache _trampoline __main _exit _ctors _pure; \
do \
   echo ${name}; \
   ./xgcc -B/usr/local/gcc2/i386-apple-freebsd/bin/ -B./ 
-I/usr/local/gcc2/i386-apple-freebsd/include -O2   -DIN_GCC     -g 
-I./include   -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. 
-I../../gcc-2.95.2/gcc -I../../gcc-2.95.2/gcc/config 
-I../../gcc-2.95.2/gcc/../include -c -DL${name} \
        ../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
   if [ $? -eq 0 ] ; then true; else exit 1; fi; \
   ` if [ -f /Users/zrinka/Desktop/gcc2_obj/gcc/../binutils/ar ] ; then 
echo /Users/zrinka/Desktop/gcc2_obj/gcc/../binutils/ar ; else if 
[ "i386-apple-freebsd" = "i386-apple-freebsd" ] ; then echo ar; else 
t='s,x,x,'; echo ar | sed -e $t ; fi; fi` rc tmplibgcc2.a ${name}.o; \
   rm -f ${name}.o; \
done
_muldi3
libgcc2.c:156:Unknown pseudo-op: .type
libgcc2.c:156:Rest of line ignored. 1st junk character valued 95 (_).
libgcc2.c:156:Invalid mnemonic 'function'
libgcc2.c:158:Invalid mnemonic 'pushl'
libgcc2.c:159:Invalid mnemonic 'movl'
libgcc2.c:160:Invalid mnemonic 'subl'
libgcc2.c:161:Invalid mnemonic 'pushl'
libgcc2.c:162:Invalid mnemonic 'pushl'
libgcc2.c:163:Invalid mnemonic 'pushl'
libgcc2.c:164:Invalid mnemonic 'movl'
libgcc2.c:165:Invalid mnemonic 'movl'
libgcc2.c:166:Invalid mnemonic 'movl'
libgcc2.c:168:Invalid mnemonic 'mull'
libgcc2.c:170:Invalid mnemonic 'movl'
libgcc2.c:171:Invalid mnemonic 'movl'
libgcc2.c:172:Invalid mnemonic 'movl'
libgcc2.c:173:Invalid mnemonic 'movl'
libgcc2.c:174:Invalid mnemonic 'movl'
libgcc2.c:175:Invalid mnemonic 'movl'
libgcc2.c:176:Invalid mnemonic 'imull'
libgcc2.c:177:Invalid mnemonic 'movl'
libgcc2.c:178:Invalid mnemonic 'imull'
libgcc2.c:179:Invalid mnemonic 'addl'
libgcc2.c:180:Invalid mnemonic 'addl'
libgcc2.c:181:Invalid mnemonic 'movl'
libgcc2.c:182:Invalid mnemonic 'movl'
libgcc2.c:183:Invalid mnemonic 'movl'
libgcc2.c:184:Invalid mnemonic 'popl'
libgcc2.c:185:Invalid mnemonic 'popl'
libgcc2.c:186:Invalid mnemonic 'popl'
libgcc2.c:187:Invalid mnemonic 'leave'
libgcc2.c:188:Invalid mnemonic 'ret'
libgcc2.c:190:Unknown pseudo-op: .size
libgcc2.c:190:Rest of line ignored. 1st junk character valued 95 (_).
make[2]: *** [libgcc2.a] Error 1
make[1]: *** [bootstrap-lean] Error 2
make: *** [bootstrap-lean] Error 2
-----------------------

Now, when I look at the libgcc2.c at line 156 here is what i find (these 
are lines 156 - 191; notice strange ^L characters):
---------------------------
#endif
^L
#if defined (L_negdi2) || defined (L_divdi3) || defined (L_moddi3)
#if defined (L_divdi3) || defined (L_moddi3)
static inline
#endif
DItype
__negdi2 (DItype u)
{
   DIunion w;
   DIunion uu;

   uu.ll = u;

   w.s.low = -uu.s.low;
   w.s.high = -uu.s.high - ((USItype) w.s.low > 0);

   return w.ll;
}
#endif
^L
/* Unless shift functions are defined whith full ANSI prototypes,
    parameter b will be promoted to int if word_type is smaller than an 
int.  */
#ifdef L_lshrdi3
DItype
__lshrdi3 (DItype u, word_type b)
{
   DIunion w;
   word_type bm;
   DIunion uu;

   if (b == 0)
     return u;

   uu.ll = u;

---------------------------------------------------------------

I tried doing several things - I tried commenting them out (all of 
them - there are more of those further down the file), deleting them, 
deleting a line before and after and retyping - nothing worked. I even 
tried commenting out a whole piece of code between lines 100 and 300 but 
I was still getting the same error - reported at the same line in the 
code. Then I thought it might have been the result of unpacking and 
decompressing with 'stuffit expander' so I downloaded again and did 
gunzip and tar xvf from the command line - still the same characters in 
the same place. Then I downloaded gcc 2.95.2 and 3.0.2 and looked at 
their libgcc2.c - same thing. I downloaded all from 
ftp://ftp.mirror.ac.uk/sites/sourceware.cygnus.com/pub/gcc/releases/.
I successfully installed gcc 2.95.3 on an alpha some months ago and I 
don't remember having any problems. (unfortunately I have deleted the 
source since then so I could not find libgcc2.c there). What do I do at 
this point? I will probably try to download from another place (I tried 
the main ftp site yesterday but it kept asking me for a login and 
password - that was the first time that happened - that's why I found a 
mirror site).  One other note - to compile 2.95.3 or 2.95.2 I had to run 
configure with i386-apple-freebsd (configure with no options would not 
recognize the target). Could that cause problems?
A few more questions about 3.0.2. I tried that version initially but ran 
into different problems. configure recognized the target as 
powerpc-apple-darwin1.4, but then during build (it actually never got as 
far as 2.95.2.3) there was an error in function.c (see below). At that 
point I decided to go with 2.95.2 since cc that I have is based on that 
and I thought it would be easier - and then later build 3.0.2 using 
2.95.2. I also had a message during configure of 3.0.2 (*** This 
configuration is not supported in the following subdirectories: 
target-libffi target boehm-gc target-zlib target-libjava (Any other 
directories should still work fine.) ) that I did not quite understand. 
What is this warning and how does it affect the configure/build/install 
processes?

Any thoughts, hints.. would be greatly appreciated. Thank you!!
--------------------------------------------
In file included from ../../gcc-3.0.2/gcc/function.c:58:
../../gcc-3.0.2/gcc/ggc.h:136: warning: ANSI C forbids const or volatile 
functions
../../gcc-3.0.2/gcc/function.c: In function `assign_stack_local_1':
../../gcc-3.0.2/gcc/function.c:596: `DEFAULT_ABI' undeclared (first use 
in this function)
../../gcc-3.0.2/gcc/function.c:596: (Each undeclared identifier is 
reported only once
../../gcc-3.0.2/gcc/function.c:596: for each function it appears in.)
../../gcc-3.0.2/gcc/function.c: In function `fixup_memory_subreg':
../../gcc-3.0.2/gcc/function.c:2519: warning: comparison between signed 
and unsigned
../../gcc-3.0.2/gcc/function.c:2520: warning: comparison between signed 
and unsigned
../../gcc-3.0.2/gcc/function.c: In function `optimize_bit_field':
../../gcc-3.0.2/gcc/function.c:2716: warning: comparison between signed 
and unsigned
../../gcc-3.0.2/gcc/function.c:2718: warning: comparison between signed 
and unsigned
../../gcc-3.0.2/gcc/function.c:2764: warning: comparison between signed 
and unsigned
../../gcc-3.0.2/gcc/function.c: In function `purge_addressof_1':
../../gcc-3.0.2/gcc/function.c:3074: warning: comparison between signed 
and unsigned
../../gcc-3.0.2/gcc/function.c: In function `instantiate_virtual_regs':
../../gcc-3.0.2/gcc/function.c:3514: `DEFAULT_ABI' undeclared (first use 
in this function)
../../gcc-3.0.2/gcc/function.c: In function `instantiate_decls':
../../gcc-3.0.2/gcc/function.c:3581: warning: comparison between signed 
and unsigned
../../gcc-3.0.2/gcc/function.c: In function `aggregate_value_p':
../../gcc-3.0.2/gcc/function.c:4201: `DEFAULT_ABI' undeclared (first use 
in this function)
../../gcc-3.0.2/gcc/function.c: In function `assign_parms':
../../gcc-3.0.2/gcc/function.c:4554: `DEFAULT_ABI' undeclared (first use 
in this function)
../../gcc-3.0.2/gcc/function.c: In function `locate_and_pad_parm':
../../gcc-3.0.2/gcc/function.c:5192: `DEFAULT_ABI' undeclared (first use 
in this function)
make[2]: *** [function.o] Error 1
make[1]: *** [stage1_build] Error 2
make: *** [bootstrap] Error 2
------------------------------------------------------------

Zrinka Bilusic


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