summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-02-24 11:11:02 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-02 14:48:00 +0100
commit17ddce4692b31af4374b28cd40b9f25e8ed629cd (patch)
tree773832a8b53104941f5a9744535e41c5f68858f6 /configure
parent62a654cc902197cc99326879076ba53b6509dc67 (diff)
Remove Q_BYTE_ORDER and -*-endian arguments from configures
Do not write Q_BYTE_ORDER to qconfig.h in the configures. Instead, we #define Q_BYTE_ORDER in qprocessordetection.h, since many CPUs only support a single endian format. For bi-endian processors, we set Q_BYTE_ORDER depending on how the preprocessor sets __BYTE_ORDER__, __BIG_ENDIAN__, or __LITTLE_ENDIAN__ (instead of using a compile test to do so). For operating systems that only support a single byte order, we can check for Q_OS_* in addition to the preprocessor macros above. This is possible because qprocessordetection.h is included by qglobal.h after Q_OS_* and Q_CC_* detection has been done. Do this for Windows CE, which is always little- endian according to MSDN. Change-Id: I019a95e05252ef69895c4b38fbfa6ebfb6a943cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure114
1 files changed, 0 insertions, 114 deletions
diff --git a/configure b/configure
index cde6dccfa1..674462e928 100755
--- a/configure
+++ b/configure
@@ -763,8 +763,6 @@ CFG_AVX=auto
CFG_REDUCE_RELOCATIONS=auto
CFG_NAS=no
CFG_ACCESSIBILITY=auto
-CFG_ENDIAN=auto
-CFG_HOST_ENDIAN=auto
CFG_IWMMXT=no
CFG_NEON=auto
CFG_CLOCK_GETTIME=auto
@@ -1035,14 +1033,6 @@ while [ "$#" -gt 0 ]; do
VAL=$1
fi
;;
- -host-*-endian)
- VAR=host_endian
- VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
- ;;
- -*-endian)
- VAR=endian
- VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
- ;;
-qtnamespace)
VAR="qtnamespace"
shift
@@ -1228,24 +1218,6 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- endian)
- if [ "$VAL" = "little" ]; then
- CFG_ENDIAN="Q_LITTLE_ENDIAN"
- elif [ "$VAL" = "big" ]; then
- CFG_ENDIAN="Q_BIG_ENDIAN"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- host_endian)
- if [ "$VAL" = "little" ]; then
- CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
- elif [ "$VAL" = "big" ]; then
- CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
@@ -3727,16 +3699,6 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
-feature-<feature> .. Compile in <feature>. The available features
are described in src/corelib/global/qfeatures.txt
- -little-endian ...... Target platform is little endian (LSB first).
- -big-endian ......... Target platform is big endian (MSB first).
-
- -host-little-endian . Host platform is little endian (LSB first).
- -host-big-endian .... Host platform is big endian (MSB first).
-
- You only need to specify the endianness when
- cross-compiling, otherwise the host
- endianness will be used.
-
-no-freetype ........ Do not compile in Freetype2 support.
-qt-freetype ........ Use the libfreetype bundled with Qt.
* -system-freetype .... Use libfreetype from the operating system.
@@ -5532,48 +5494,6 @@ if [ "$CFG_LIBFREETYPE" = "auto" ]; then
fi
fi
-if [ "$CFG_ENDIAN" = "auto" ]; then
- if [ "$XPLATFORM_MINGW" = "yes" ]; then
- CFG_ENDIAN="Q_LITTLE_ENDIAN"
- else
- "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
- F="$?"
- if [ "$F" -eq 0 ]; then
- CFG_ENDIAN="Q_LITTLE_ENDIAN"
- elif [ "$F" -eq 1 ]; then
- CFG_ENDIAN="Q_BIG_ENDIAN"
- else
- echo
- echo "The target system byte order could not be detected!"
- echo "Turn on verbose messaging (-v) to see the final report."
- echo "You can use the -little-endian or -big-endian switch to"
- echo "$0 to continue."
- exit 101
- fi
- fi
-fi
-
-if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
- if [ "$BUILD_ON_MAC" = "yes" ]; then
- true #leave as auto
- else
- "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
- F="$?"
- if [ "$F" -eq 0 ]; then
- CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
- elif [ "$F" -eq 1 ]; then
- CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
- else
- echo
- echo "The host system byte order could not be detected!"
- echo "Turn on verbose messaging (-v) to see the final report."
- echo "You can use the -host-little-endian or -host-big-endian switch to"
- echo "$0 to continue."
- exit 101
- fi
- fi
-fi
-
HAVE_STL=no
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
HAVE_STL=yes
@@ -6447,41 +6367,7 @@ cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
#ifndef QT_EDITION
# define QT_EDITION $QT_EDITION
#endif
-
-/* Machine byte-order */
-#define Q_BIG_ENDIAN 4321
-#define Q_LITTLE_ENDIAN 1234
-EOF
-
-echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
-if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
- cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
-#if defined(__BIG_ENDIAN__)
-# define Q_BYTE_ORDER Q_BIG_ENDIAN
-#elif defined(__LITTLE_ENDIAN__)
-# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
-#else
-# error "Unable to determine byte order!"
-#endif
EOF
-else
- echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
-fi
-echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
-if [ "$CFG_ENDIAN" = "auto" ]; then
- cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
-#if defined(__BIG_ENDIAN__)
-# define Q_BYTE_ORDER Q_BIG_ENDIAN
-#elif defined(__LITTLE_ENDIAN__)
-# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
-#else
-# error "Unable to determine byte order!"
-#endif
-EOF
-else
- echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
-fi
-echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`