This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


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

Re: Problems building TCL for insight on cygwin & win2k


Ian,
----- Original Message -----
From: "Ian Roxborough" <irox@redhat.com>
To: "Andy Hare" <ahare@btinternet.com>
Cc: "Keith Seitz" <keiths@cygnus.com>; "Insight Mail list"
<insight@sourceware.cygnus.com>
Sent: Friday, October 26, 2001 10:04 PM
Subject: Re: Problems building TCL for insight on cygwin & win2k


>
> Hi Andy,
>
> this is going to sound strange, but you're missing the -mwin32 flag
> which should be automatically added to the command line.
>
> Your problem doesn't seem to be with setting CC="gcc -mwin32", but
> some how the -mwin32 and -mno-win32 flags are not being passed at
> the right time.
>
> Something is going wrong at configure time and the EXTRA_CFLAGS
> variable used to pass -m*win32 isn't being set or isn't being passed.
>
> They should be present in <src-dir>/tcl/cygwin/configure.in (grep
> for mno-win32) and <src-dir>/tcl/win/configure.in (grep for mwin32).
> Also check the value of EXTRA_CFLAGS in <build-dir>/tcl/unix/tclConfig.sh
> and <build-dir>/tcl/win/tclConfig.sh.
>

Have been through the config scripts in both tcl/cygwin and tcl/win and
found the following. The scripts check for the cygwin build and then check
against the target name thus:
case "${target}" in
*-*-cygwin*)
 touch ac$$.c
 if ${CC} -c -mno-win32 ac$$.c >/dev/null 2>&1; then
     case "$EXTRA_CFLAGS" in
  *-mno-win32*) ;;
  *) EXTRA_CFLAGS="-mno-win32 $EXTRA_CFLAGS" ;;
     esac
 fi
 rm -f ac$$.o ac$$.c
 ;;
esac

but as I am building a cross version, i.e. hosted on cygwin but targetting
ARM it does not build the correct version. Modifying it to the following:

case "${host}" in
*cygwin*)
 touch ac$$.c
        if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
            case "$EXTRA_CFLAGS" in
                *-mwin32*) ;;
                *) EXTRA_CFLAGS="-mwin32 $EXTRA_CFLAGS" ;;
            esac
        fi
        rm -f ac$$.o ac$$.c
        ;;
esac

allows the tcl stuff to build and the CC=gcc -mwin32 is then not needed.

I would produce a patch to this effect but do not know how to create the
patch in the correct format or where to post it to so hopefully someone with
better knowledge of the system than me can take this info and produce the
required.

I will check the rest of the configure scripts to see if there are any more
such issues as now I have reached another problem within tk.

Andy Hare
www.ahare.btinternet.co.uk



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