@@ -1,3 +1,12 @@
+2011-02-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.gcc: Support --enable-ia32 for x86 Linux targets.
+
+ * configure.ac: Support --enable-ia32.
+ * configure: Regenerated.
+
+ * config/i386/t-linux64-x32: New.
+
2011-02-20 H.J. Lu <hongjiu.lu@intel.com>
* longlong.h (count_leading_zeros): Use long long builtin for
@@ -1257,11 +1257,17 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
if test x$enable_targets = xall; then
tm_file="${tm_file} i386/x86-64.h i386/linux64.h"
tm_defines="${tm_defines} TARGET_BI_ARCH=1"
- if test x$enable_x32 = xyes; then
+ case x${enable_x32}${enable_ia32} in
+ xyesyes)
tmake_file="${tmake_file} i386/t-linuxx32"
- else
+ ;;
+ xyesno)
+ tmake_file="${tmake_file} i386/t-linux64-x32"
+ ;;
+ *)
tmake_file="${tmake_file} i386/t-linux64"
- fi
+ ;;
+ esac
need_64bit_hwint=yes
need_64bit_isa=yes
case X"${with_cpu}" in
@@ -1298,11 +1304,17 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
esac
- if test x$enable_x32 = xyes; then
+ case x${enable_x32}${enable_ia32} in
+ xyesyes)
tmake_file="${tmake_file} i386/t-linuxx32"
- else
+ ;;
+ xyesno)
+ tmake_file="${tmake_file} i386/t-linux64-x32"
+ ;;
+ *)
tmake_file="${tmake_file} i386/t-linux64"
- fi
+ ;;
+ esac
tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
;;
i[34567]86-pc-msdosdjgpp*)
new file mode 100644
@@ -0,0 +1,34 @@
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# To support x86-64 and x32 libraries, the directory structrue
+# should be:
+#
+# /lib64 has x86-64 libraries.
+# /libx32 has x32 libraries.
+#
+MULTILIB_OPTIONS = m64/mx32
+MULTILIB_DIRNAMES = 64 x32
+MULTILIB_OSDIRNAMES = ../lib64 ../libx32
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o \
+ crtbeginT.o crtprec32.o crtprec64.o crtprec80.o \
+ crtfastmath.o
@@ -872,6 +872,7 @@ enable_build_with_cxx
with_stabs
enable_multilib
enable_x32
+enable_ia32
enable___cxa_atexit
enable_decimal_float
enable_fixed_point
@@ -1574,6 +1575,7 @@ Optional Features:
--enable-build-with-cxx build with C++ compiler instead of C compiler
--enable-multilib enable library support for multiple ABIs
--enable-x32 enable x32 library support for multiple ABIs
+ --enable-ia32 enable ia32 library support for multiple ABIs
--enable-__cxa_atexit enable __cxa_atexit for C++
--enable-decimal-float={no,yes,bid,dpd}
enable decimal float extension to C. Selecting 'bid'
@@ -6885,6 +6887,15 @@ else
fi
+# With ia32 support
+# Check whether --enable-ia32 was given.
+if test "${enable_ia32+set}" = set; then :
+ enableval=$enable_ia32;
+else
+ enable_ia32=yes
+fi
+
+
# Enable __cxa_atexit for C++.
# Check whether --enable-__cxa_atexit was given.
if test "${enable___cxa_atexit+set}" = set; then :
@@ -17516,7 +17527,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17519 "configure"
+#line 17530 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17622,7 +17633,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17625 "configure"
+#line 17636 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -611,6 +611,11 @@ AC_ARG_ENABLE(x32,
[ --enable-x32 enable x32 library support for multiple ABIs],
[], [enable_x32=no])
+# With ia32 support
+AC_ARG_ENABLE(ia32,
+[ --enable-ia32 enable ia32 library support for multiple ABIs],
+[], [enable_ia32=yes])
+
# Enable __cxa_atexit for C++.
AC_ARG_ENABLE(__cxa_atexit,
[ --enable-__cxa_atexit enable __cxa_atexit for C++],