This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


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

update: building a cygwin -> linux gcc(crosscompiler pe->elf32) problems


Just to clarify first I do have the linux runtime libraries and includes in
/usr/local/linux/lib ../include respectivly.

Now the update:
I knew there was some problem with how 'one' of the makefiles was including
some of the headers.... So I went through some of the makefiles that were
in my gcc build directory after I had done a configure to see if I could
figure out where to mess around with....I 'believe' I figured it out.  In
the makefile in my /usr/local/src/gnu/build/gcc/gcc I changed 2 lines
line 361
which previously said LIBGCC2_INCLUDES = 
and comments above were
# Additional options to use when compiling libgcc2.a.
# Some targets override this to -Iinclude
to 
LIBGCC2_INCLUDES = /usr/local/linux/include
and line 438
which previously said OTHER_FIXINCLUDE_DIR = 
and comments above were
# Additional directories of header files to run fixincludes on.
# These should be directories searched automatically by default
# just as /usr/include is.
# *Do not* use this for directories that happen to contain
# header files, but are not searched automatically by default.
# On most systems, this is empty.
to 
OTHER_FIXINCLUDE_DIRS = /usr/local/linux/include

after all that I think I do get past the header issues I was having
although NOW i have a problem of another sort

here is the last part of my make.log file
my original problem and my setup are below the ~50 line exerpt form my
make.log file


cp xgcc.exe gcc-cross.exe
/usr/local/src/gnu/build/gcc/gcc/xgcc -B/usr/local/src/gnu/build/gcc/gcc/
-B/usr/local/linux/i686-pc-linux-gnu/bin/
-I/usr/local/linux/i686-pc-linux-gnu/include -dumpspecs > tmp-specs
mv tmp-specs specs
if [ -f libgcc2.ready ] ; then \
true; \
else \
touch libgcc2.ready; \
fi
rm -f tmplibgcc2.a
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}; \
  /usr/local/src/gnu/build/gcc/gcc/xgcc -B/usr/local/src/gnu/build/gcc/gcc/
-B/usr/local/linux/i686-pc-linux-gnu/bin/
-I/usr/local/linux/i686-pc-linux-gnu/include -O2 /usr/local/linux/include
-DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include  -fPIC -g1
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I.
-I/usr/local/src/gnu/gcc/gcc -I/usr/local/src/gnu/gcc/gcc/config
-I/usr/local/src/gnu/gcc/gcc/../include -c -DL${name} \
       /usr/local/src/gnu/gcc/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  i686-pc-linux-gnu-ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
xgcc: cannot specify -o with -c or -S and multiple compilations
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/usr/local/src/gnu/build/gcc/gcc'
make: *** [all-gcc] Error 2



original text:

> Here is an overview of what I am doing.... I am trying to make gcc so I
> can
> get elf32 objects out of it.
> just for the record I am building from CURRENT netrelease srcs...as in
> just
> to make sure I made a new directory and checked everything out
> yesterday(7/09/01) and made sure it was a sane enviroment and then I
> started from scratch...
> 
> Here is how I have been going about it.
> (I researched this quite a bit and found a couple of good howto's, this
> one
> was the most helpful 
>
http://www.nanotech.wisc.edu/~khan/software/gnu-win32/cygwin-to-linux-cross-howto.txt)
> 
> to save space and time
>   cygwin$ host=i686-pc-cygwin
>   cygwin$ build=i686-pc-cygwin
>   cygwin$ target=i686-pc-linux-gnu
>   cygwin$ prefix=/usr/local/linux
>   cygwin$ src_root=/usr/local/src/gnu
> 
> First I build binutils using a configure command and make command of
>  
>  cygwin$ $src_root/binutils-2.10.1/configure \
>     --with-included-gettext \
>     --target=$target --host=$host --build=$build \
>     --prefix=$prefix -v
>   cygwin$ make > make.log 2>&1
>   cygwin$ make install > install.log 2>&1
> 
> and that works fine....no major errors it compiles and works...
> then I added $prefix/bin to my path
> 
> now where the problem comes...building gcc
> configure command is
>   cygwin$ $src_root/gcc-2.95.2/configure \
>     --enable-languages=c \
>     --with-included-gettext --enable-shared --enable-threads \
>     --target=$target --host=$host --build=$build \
>     --prefix=$prefix -v
> 
> that works fine....but when I goto do the make
> it does quite a bit but
> errors out at 
> /usr/local/src/gnu/gcc/gcc/libgcc2.c:41: stdlib.h: No such file or
> directory
> /usr/local/src/gnu/gcc/gcc/libgcc2.c:42: unistd.h: No such file or
> directory
> make[1]: *** [libgcc2.a] Error 1
> 
> attached is my make.log for gcc(er not I guess....since this bounced
back....it was a little too big....if you need it just ask :) )
> 
> any help would be greatly appreciated
> (also I was wondering why this particular flavor of compiler is not a
> binary that a developer could dl somewhere easily accesable since 'to me'
> this seems like there is a good chance that nt developers might want
> there
> executables to be ported to a linux compatable file type(bfd))
> 
> Thanks 
> Nathan Fouarge
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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