This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Disable building with i386-*, -march=i386 or -mcpu=i386.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Allan McRae <allan at archlinux dot org>
- Cc: Roland McGrath <roland at hack dot frob dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>, Andreas Jaeger <aj at suse dot com>, Thomas Schwinge <thomas at codesourcery dot com>
- Date: Tue, 16 Apr 2013 10:55:31 -0700
- Subject: Re: [PATCH] Disable building with i386-*, -march=i386 or -mcpu=i386.
- References: <513FE49D dot 3050406 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1303131610540 dot 19781 at digraph dot polyomino dot org dot uk> <51526E77 dot 4040801 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1303271431550 dot 23096 at digraph dot polyomino dot org dot uk> <5154668A dot 6000700 at redhat dot com> <5160465E dot 8060400 at redhat dot com> <20130408210918 dot D97632C074 at topped-with-meat dot com> <51634DE2 dot 1060109 at redhat dot com> <20130408231128 dot DA09C2C0A2 at topped-with-meat dot com> <5163516D dot 1060705 at archlinux dot org> <516805F1 dot 2090504 at redhat dot com>
On 04/12/2013 06:02 AM, Carlos O'Donell wrote:
> On 04/08/2013 07:23 PM, Allan McRae wrote:
>> On 09/04/13 09:11, Roland McGrath wrote:
>>>> That's true, and I'm willing to make it hard error if that's what
>>>> people think we should actually do.
>>>
>>> It's my preference, but I don't insist on it.
>>>
>>
>> I am also in favour of the hard error - in line with every other
>> building issue found during configure.
>
> I concede, I'll make this to a hard error.
v2
- Make it hard error to configure with i386
- Add more examples for correct options.
Comments?
2013-04-16 Carlos O'Donell <carlos@redhat.com>
* configure.in: Remove i386 configure warning.
* configure: Regenerate.
* sysdeps/i386/preconfigure.in: New file.
* sysdeps/i386/preconfigure: Regenerate.
* sysdeps/i386/configure.in: Add example to error.
* sysdeps/i386/configure: Regenerate.
diff --git a/configure.in b/configure.in
index d93ca5c..bbdf156 100644
--- a/configure.in
+++ b/configure.in
@@ -390,15 +390,6 @@ case "$machine-$host_os" in
;;
esac
-# Configure for i686 if the user asks for i386. We don't support
-# i386 any more but it continues to be common for users to configure
-# 32-bit x86 as i386. We build for i686 instead.
-if test "$machine" = i386; then
- machine="i686"
- echo "\
-*** WARNING: Support for i386 is deprecated. Building for i686 instead."
-fi
-
submachine=
AC_ARG_WITH([cpu],
AS_HELP_STRING([--with-cpu=CPU], [select code for CPU variant]),
diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in
index 56a7c1f..ee55efd 100644
--- a/sysdeps/i386/configure.in
+++ b/sysdeps/i386/configure.in
@@ -18,7 +18,8 @@ LIBC_COMPILER_BUILTIN_INLINED(
[libc_cv_unsupported_i386=no],
[AC_MSG_ERROR([
*** Building with -march=i386/-mcpu=i386 is not supported.
-*** Please use host i786, i686, i586, or i486.])])
+*** Please use host i786, i686, i586, or i486.
+*** For example: export CFLAGS="-O2 -march=i386"])])
AC_CHECK_HEADER([cpuid.h], ,
[AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
diff --git a/sysdeps/i386/preconfigure.in b/sysdeps/i386/preconfigure.in
new file mode 100644
index 0000000..7f3082c
--- /dev/null
+++ b/sysdeps/i386/preconfigure.in
@@ -0,0 +1,12 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local preconfigure fragment for sysdeps/i386.
+
+# Configure for i686 if the user asks for i386. We don't support
+# i386 any more but it continues to be common for users to configure
+# 32-bit x86 as i386. We build for i686 instead.
+if test "$machine" = i386; then
+ AC_MSG_ERROR([
+*** ERROR: Support for i386 is deprecated.
+*** Please use host i786, i686, i585 or i486.
+*** For example: ./configure --host=i686-pc-linux-gnu"])
+fi
---
Cheers,
Carlos.