From 08e92ba1e009d8b55e4ea44b4169ae80252b24f1 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 20 Jul 2012 21:03:56 +0800 Subject: mips: Autodetect MIPS DSP rev1 and rev2 instructionset Not every MIPS SoC has the DSP extensions, auto-detect them by using builtin GCC functions. Check for the DSP macros and add the result for rev1 and rev2 to the cpufeatures. Change-Id: I3d6c950f170f102514c43b349f9a23ee796d801a Reviewed-by: Girish Ramakrishnan Reviewed-by: Thiago Macieira --- configure | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 5e77995119..c334c24057 100755 --- a/configure +++ b/configure @@ -837,8 +837,8 @@ CFG_REDUCE_RELOCATIONS=auto CFG_ACCESSIBILITY=auto CFG_IWMMXT=no CFG_NEON=auto -CFG_MIPS_DSP=yes -CFG_MIPS_DSPR2=yes +CFG_MIPS_DSP=auto +CFG_MIPS_DSPR2=auto CFG_CLOCK_GETTIME=auto CFG_CLOCK_MONOTONIC=auto CFG_MREMAP=auto @@ -3994,17 +3994,25 @@ elif [ "$CFG_ARCH" != "arm" ]; then fi # detect mips_dsp support -if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then - CFG_MIPS_DSP=yes +if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then + CFG_MIPS_DSP=yes else - CFG_MIPS_DSP=no + CFG_MIPS_DSP=no + fi +elif [ "$CFG_ARCH" != "mips" ]; then + CFG_MIPS_DSP=no fi # detect mips_dspr2 support -if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then - CFG_MIPS_DSPR2=yes +if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "auto" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dspr2 "mips_dspr2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then + CFG_MIPS_DSPR2=yes else - CFG_MIPS_DSPR2=no + CFG_MIPS_DSPR2=no + fi +elif [ "$CFG_ARCH" != "mips" ]; then + CFG_MIPS_DSPR2=no fi [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista" -- cgit v1.2.3