On Tue, 2005-03-22 at 09:44 -0500, Anduin Withers wrote:
> If one is foolish enough to pass --cpu=i686 in to the configure script it
> isn't really honored. The problem is that through normal auto-detection $cpu
> would be set to x86, in the case where it is overridden this transformation
> doesn't occur (that chunk of script is before the option processing chunk)
> this leads to unpleasant things like TARGET_ARCH_X86=yes not being output to
> config.mak.

Can you try the attached patch? It should pass the --cpu and --tune
parameters down without problems. (And tell you if they are invalid for
your compiler.)

BTW is the cpu detection not working for you? I'd like the configure
script not to require parameters except for cross-compiling and turning
on experimental features.

-- Daniel

Index: configure
===================================================================
RCS file: /var/lib/mythcvs/mythtv/configure,v
retrieving revision 1.34
diff -r1.34 configure
166a167,188
> # These have to be looked up early for some types of cross-compiling to work
> cpu_overide="no"
> for opt do
>   case "$opt" in
>   --cpu=*)
>           cpu=`echo $opt | cut -d '=' -f 2`
>           cpu_raw="$cpu"
>           processor=""
>           processor_flags=""
>           cpu_overide="yes"
>   ;;
>   --tune=*)
>           tune=`echo $opt | cut -d '=' -f 2`
>           tune_raw="$tune"
>           processor=""
>           processor_flags=""
>   ;;
>   esac
> done
> 
> 
> 
450c472
<   --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
---
>   --extra-cflags=*) ECFLAGS="$${opt#--extra-cflags=}"
456,459c478,481
<   --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
<   ;;
<   --tune=*) tune=`echo $opt | cut -d '=' -f 2`
<   ;;
---
>   #--cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
>   #;;
>   #--tune=*) tune=`echo $opt | cut -d '=' -f 2`
>   #;;
783c805,806
<             ARCHFLAGS="-mcpu=$tune"
---
>             ARCHFLAGS="-mtune=$tune"
>             TUNECPU="$tune"
787a811,814
> if test x"$cpu_overide" = x"yes"; then
>     ARCHFLAGS="-mcpu=$cpu_raw $ARCHFLAGS"
> fi
> 
834c861,866
< if test x"$tune" = x"c3" -o x"$tune" = x"c3-2" -o x"$cpu" = x"c3" -o x"$cpu" = x"c3-2"; then
---
> if test x"$cpu_raw" = x"c3" -o x"$cpu_raw" = x"c3-2"; then
>     ARCHFLAGS="-march=$cpu"
>     optimize="small"
> fi
> if test x"$tune" = x"c3" -o x"$tune" = x"c3-2"; then
>     ARCHFLAGS="-march=$tune"
839c871
< if test x"$tune" = x"generic" -a x"$cpu" = x"x86"; then
---
> if test x"$tune" = x"generic" -a x"$cpu_overide" = x"no"; then
869a902
> TMP_ARCHFLAGS=$ARCHFLAGS
870a904,911
> if test x"$ARCHFLAGS" = x""; then
>     if test "$cpu_overide" = "yes" -o x"$tune_raw" != x""; then
>         echo "ERROR: Custom ./configure --tune or --cpu options failed compile test"
>         echo "       Removing to non-cpu specific compilation options. ($TMP_ARCHFLAGS)"
>         echo ""
>     fi
> fi
> 
1516c1557
< echo "CPU              $cpu"
---
> echo "CPU              $cpu ($processor)"
1628a1670
> echo "ECFLAGS=$ECFLAGS" >> config.mak
Index: settings.pro
===================================================================
RCS file: /var/lib/mythcvs/mythtv/settings.pro,v
retrieving revision 1.109
diff -r1.109 settings.pro
28a29
> QMAKE_CXXFLAGS += $$ECFLAGS
42a44
> QMAKE_CFLAGS += $$ECFLAGS
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to