I had to make changes to configure so that it can compile.
The trick is to manually enter the expected target machine, because this configure script cannot detect that cygwin win32 should be able to compile pcc.
This is the first stage in making pcc portable. If we cannot change this configure file, it will be hard for us to do any compilation, let alone make any modification for a new target machine.
As it turned out, it is not necessary to edit the configure script file. Just add a option argument.
./configure --target=i386-mingw-pecoff
configure is actually generated automatically using autoconf program.
#if test "${ac_cv_target+set}" = set; then
# echo $ECHO_N "(cached) $ECHO_C" >&6
#else
# if test "x$target_alias" = x; then
# ac_cv_target=$ac_cv_host
#else
# ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
# { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
#echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
# { (exit 1); exit 1; }; }
#fi
#fi
# The above lines had been commented out because it failed to detect the cygwin
# characteristics from the passed parameters. cygwin pass its machine as i686-pc-cygwin
# target name must be <processor>-<os>-<abi>
# valid choices for processor: i386 amd64 nova m16c powerpc hppa m68k pdp11 mips sparc sparc64
# valid choices for os: apple bsd darwin dragonfly linux midnightbsd mingw win32 minix mirbsd netbsd openbsd sunos
# valid choices for abi: pecoff elf machos classic68k aout coff
ac_cv_target="i386-mingw-pecoff"
No comments:
Post a Comment