trying to build a mingw compiler on cygwin

Stephen Smith ischis2@cox.net
Tue Sep 17 09:29:00 GMT 2002


I found the mingw files that I needed to go with the 2.95.2-6 compiler 
source that I have:
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/gcc-2.95.2/gcc-2.95.2-mingw-extra.tar.gz 


To make sure that I am in compliance with the License (when I 
distribute) I wanted to make sure
that I could duplicate the compiling of the libraries.  Having emailed 
Danny Smith (several times)
I tried building with this script and then am getting the error  shown 
below that. 
Would you have a clue as to the solution to this problem

I have checked the gcc directory and a ./specs file is being built.  I 
am building on a cygwin platform
with all of the packages up to date except for the gcc package which is 
being held constant at version
2.95.2-6.

The script , error trace and spects file are all included in this message.

Thanks,
Stephen Smith

-------------------------- Start of script ------------------------------
#! /bin/sh

set -e

export GCC=`which gcc`
export LD=`which ld`
export AS=`which as`

export CC="${GCC} -mno-cygwin"
export GCC_SRC_LOCATION=../gcc-2.95.2-6

${GCC_SRC_LOCATION}/configure  --with-gcc=${GCC} --with-gnu-ld=${LD} 
--with-gnu-as=${AS} --host=mingw32 --target=mingw32 
--prefix=/htc/mingw32 --enable-threads --disable-nls 
--enable-languages=c,f77,c++,objc --disable-win32-registry --disable-shared

make bootstrap
make -k check

---------------------------  Error log --------------------------------
for name in _chkstk; \
do \
echo ${name}; \
./xgcc -B/htc/mingw32/mingw32/bin/ -B./ -I/htc/mingw32/mingw32/include 
-O2 -I../../gcc-2.95.2-6/gcc/../winsup/include
-DIN_GCC     -g -I./include   -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 
-D__GCC_FLOAT_NOT_NEEDED   -I. -I../../gcc-2.95.2-6/
gcc -I../../gcc-2.95.2-6/gcc/config -I../../gcc-2.95.2-6/gcc/../include 
-c -DL${name} libgcc1.S; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
mv libgcc1.o ${name}.o; \
` if [ -f /htc/temp/builddir/gcc/../binutils/ar ] ; then echo 
/htc/temp/builddir/gcc/../binutils/ar ; else if [ "i386-
unknown-mingw32" = "i386-unknown-mingw32" ] ; then echo ar; else 
t='s,x,x,'; echo ar | sed -e $t ; fi; fi` rc tmplibgcc1
.a ${name}.o; \
rm -f ${name}.o; \
done
_chkstk
xgcc.exe: specs file malformed after 2 characters
make[2]: *** [libgcc1-asm.a] Error 1
make[2]: Leaving directory `/htc/temp/builddir/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/htc/temp/builddir/gcc'
make: *** [bootstrap] Error 2

---------------------------  Specs file --------------------------------
*asm:


*asm_final:


*cpp:
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT}

*cc1:
%(cc1_spec)

*cc1plus:


*endfile:


*link:
%{mwindows:--subsystem windows}                    
%{mconsole:--subsystem console}                    %{shared: %{mdll: 
%eshared and mdll are not compatible}}                    %{shared: 
--shared} %{mdll:--dll}                    %{shared|mdll: -e 
_DllMainCRTStartup@12}

*lib:
%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32}                   -luser32 
-lkernel32 -ladvapi32 -lshell32

*libgcc:
%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lcrtdll

*startfile:
%{shared|mdll:dllcrt1%O%s} %{!shared: %{!mdll:crt1%O%s}} %{pg:gcrt1%O%s}

*switches_need_spaces:


*signed_char:
%{funsigned-char:-D__CHAR_UNSIGNED__}

*predefines:
-Di386 -D_WIN32 -DWIN32 -D__WIN32__   -D__MINGW32__=0.2 -DWINNT  
-D_X86_=1 -D__STDC__=1  -D__stdcall=__attribute__((__stdcall__))   
-D_stdcall=__attribute__((__stdcall__))   
-D__cdecl=__attribute__((__cdecl__))   
-D__declspec(x)=__attribute__((x))   -Asystem(winnt) -Acpu(i386) 
-Amachine(i386)

*cross_compile:
0

*version:
2.95.2-6

*multilib:
. ;

*multilib_defaults:


*multilib_extra:


*multilib_matches:


*linker:
collect2

*cpp_486:
%{!ansi:-Di486} -D__i486 -D__i486__

*cpp_586:
%{!ansi:-Di586 -Dpentium}     -D__i586 -D__i586__ -D__pentium -D__pentium__

*cpp_k6:
%{!ansi:-Di586 -Dk6}     -D__i586 -D__i586__ -D__k6 -D__k6__

*cpp_686:
%{!ansi:-Di686 -Dpentiumpro}     -D__i686 -D__i686__ -D__pentiumpro 
-D__pentiumpro__

*cpp_cpu_default:


*cpp_cpu:
-Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ 
%{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} 
%{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} 
%{mcpu=pentiumpro:%(cpp_686)} %{mcpu=k6:%(cpp_k6)} 
%{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}

*cc1_cpu:
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} 
%{mpentium:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}

*mingw_include_path:
mingw32

*link_command:
%{!fsyntax-only:  %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} 
%{d} %{e*} %{m} %{N} %{n}             %{r} %{s} %{t} %{u*} %{x} %{z} 
%{Z}    %{!A:%{!nostdlib:%{!nostartfiles:%S}}}            %{static:} 
%{L*} %D %o            %{!nostdlib:%{!nodefaultlibs:%G %L %G}}        
    %{!A:%{!nostdlib:%{!nostartfiles:%E}}}            %{T*}           
 }}}}}}



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list