This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Disable building with i386-*, -march=i386 or -mcpu=i386.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]