diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2011-12-31 20:40:49 -0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-30 17:28:07 +0200 |
commit | 735f7e6248fb7725ce952eede17117ca6dc3ee42 (patch) | |
tree | f8f1144aefd75993f4180d796c70d88f43ddd84c /configure | |
parent | 1533bfc5fcc4ec5865c1de606504b6aba8a5f6fe (diff) |
Record the sub-architecture (CPU features enabled in the compiler)
If the system's compiler has extra features on top of the base
settings enabled or if the mkspec or $CXXFLAGS variable included some,
record them.
This will allow us to choose whether or not to use our own special
compilers, based on whether the system default compiler contains it or
not.
Change-Id: I87cada9fab4cfa58846a831d0a7c7b50d8fa87fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -708,8 +708,10 @@ CFG_PKGCONFIG=auto # Target architecture CFG_ARCH= +CFG_CPUFEATURES= # Host architecture, same as CFG_ARCH when not cross-compiling CFG_HOST_ARCH= +CFG_HOST_CPUFEATURES= # Set when the -arch or -host-arch arguments are used OPT_OBSOLETE_HOST_ARG=no @@ -3668,9 +3670,9 @@ fi # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is OUTFILE=$outpath/arch.result -"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" +"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG" if [ $? -eq 0 ]; then - CFG_ARCH=`cat "$OUTFILE"` + eval `cat "$OUTFILE"` else echo echo "Could not determine the target architecture!" @@ -3681,9 +3683,9 @@ rm -f "$OUTFILE" 2>/dev/null if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then # Do the same test again, using the host compiler - SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" + SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST" if [ $? -eq 0 ]; then - CFG_HOST_ARCH=`cat "$OUTFILE"` + eval `cat "$OUTFILE"` else echo echo "Could not determine the host architecture!" @@ -3694,6 +3696,7 @@ if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then else # not cross compiling, host == target CFG_HOST_ARCH="$CFG_ARCH" + CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES" fi unset OUTFILE @@ -5719,6 +5722,8 @@ cat >>"$QTCONFIG.tmp" <<EOF CONFIG += $QTCONFIG_CONFIG QT_ARCH = $CFG_ARCH QT_HOST_ARCH = $CFG_HOST_ARCH +QT_CPU_FEATURES = $CFG_CPUFEATURES +QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES QT_EDITION = $Edition QT_CONFIG += $QT_CONFIG @@ -5882,8 +5887,9 @@ else echo "Building for: $XPLATFORM" fi -echo "Architecture: $CFG_ARCH" -echo "Host architecture: $CFG_HOST_ARCH" +# the missing space before $CFG_FEATURES is intentional +echo "Architecture: $CFG_ARCH, features:$CFG_CPUFEATURES" +echo "Host architecture: $CFG_HOST_ARCH, features:$CFG_HOST_CPUFEATURES" if [ -n "$PLATFORM_NOTES" ]; then echo "Platform notes:" |