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] Add support for --with-arch configure option


Hello Ulrich,

> First of all, I'm not even going to look at context diffs.  Never, ever
> send anything but unified diffs.

Ok. Converted to unified diff format.

> Second, if there is an ancient method implemented we don't just pile on.
>  Replace it.

Unfortunately it's not that simple.  There are targets which only
support one of them (RS6000: -mcpu= but S/390: -march=).  And there
also are targets which seem to support both (like ARM).  So I don't
think just replacing it is an option.

Bye,

-Andreas-

2008-08-18  Andreas Krebbel  <krebbel1@de.ibm.com>

	* Makeconfig: Use -march instead of -mcpu depending on
	with-arch variable.
	* configure.in: New configure parameter --with-arch added.
	* config.make.in: Set with-arch.


Index: Makeconfig
===================================================================
--- Makeconfig.orig	2008-08-12 16:15:53.000000000 +0200
+++ Makeconfig	2008-08-12 17:08:29.000000000 +0200
@@ -651,7 +651,12 @@ ifeq	"$(strip $(+cflags))" ""
 +cflags	:= $(default_cflags)
 endif	# $(+cflags) == ""
 
-+cflags += $(addprefix -mcpu=,$(with-cpu)) $(+gccwarn) $(+merge-constants)
+ifeq	"$with-arch" ""
++cflags += $(addprefix -mcpu=,$(with-cpu))
+else
++cflags += $(addprefix -march=,$(with-arch))
+endif
++cflags += $(+gccwarn) $(+merge-constants)
 +gcc-nowarn := -w
 
 # Don't duplicate options if we inherited variables from the parent.
Index: configure.in
===================================================================
--- configure.in.orig	2008-08-12 16:15:53.000000000 +0200
+++ configure.in	2008-08-12 17:08:29.000000000 +0200
@@ -355,6 +355,17 @@ AC_ARG_WITH([cpu],
   esac
 ])
 
+subarch=
+AC_ARG_WITH([arch],
+	    AS_HELP_STRING([--with-arch=CPU], [select code for CPU variant]),
+	    [dnl
+  case "$withval" in
+  yes|'') AC_MSG_ERROR([--with-arch requires an argument]) ;;
+  no) ;;
+  *) submachine="$withval"; subarch="$withval" ;;
+  esac
+])
+
 
 # An add-on can set this when it wants to disable the sanity check below.
 libc_config_ok=no
@@ -683,6 +694,7 @@ if test -z "$submachine_used" && test -n
   AC_MSG_ERROR(The $submachine subspecies of $host_cpu is not supported.)
 fi
 AC_SUBST(submachine)
+AC_SUBST(subarch)
 
 # We have now validated the configuration.
 
Index: config.make.in
===================================================================
--- config.make.in.orig	2008-08-12 16:15:53.000000000 +0200
+++ config.make.in	2008-08-12 17:08:29.000000000 +0200
@@ -32,6 +32,7 @@ config-vendor = @host_vendor@
 config-os = @host_os@
 config-sysdirs = @sysnames@
 with-cpu = @submachine@
+with-arch = @subarch@
 
 defines = @DEFINES@
 sysincludes = @SYSINCLUDES@


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