[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r11169 - in /libdfp/trunk: ChangeLog Makefile.in README.developer configure configure.ac
- To: commits@xxxxxxxxxx
- Subject: [commits] r11169 - in /libdfp/trunk: ChangeLog Makefile.in README.developer configure configure.ac
- From: ryanarn@xxxxxxxxxx
- Date: Fri, 06 Aug 2010 21:05:27 -0000
Author: ryanarn
Date: Fri Aug 6 14:05:27 2010
New Revision: 11169
Log:
Apparently if -mzarch is needed by a configuration then configure.ac should
append it to CFLAGS. Unfortunately due to the fact that autoconf doesn't
support the updating of environment variables or any switches for that matter
we have to rely on libdfp/Makefile to pass the correct CFLAGS to
libdecnumber/Makefile otherwise it'll use the non-updated version. We can't
sub-make invoke using -e (or the environment can pollute the libdecnumber
build) so we pass CFLAGS on the command line. In order for this to work
libdecnumber/Makefile has to be sed hacked to only set CFLAGS to @CFLAGS@ if
CFLAGS coming from the parent (libdfp/Makefile) isn't set. This invoked
changing CFLAGS = 'foo' into CFLAGS ?= 'foo' in libdecnumber/Makefile. This
wasn't done in libdecnumber/Makefile.in because we don't want to change
libdecnumber/ at all since we don't maintain it.
2010-08-06 Ryan S. Arnold <rsa@xxxxxxxxxx>
* configure: Regenerated.
* Makefile.in: Added special sed script which changes
libdecnumber/Makefile:CFLAGS = foo into CFLAGS ?= foo. This allows
libdfp/Makefile's sub make invocation of libdecnumber/Makefile to
accept the updated CFLAGS. This was necessary to allow configure to
update CFLAGS with -mzarch for s390 z9-ec and z10. GCC should fix
this in their version of libdecnumber.
* configure.ac: -mzarch added to CFLAGS when s390 system is z9-ec or
z10.
* README.developer: Added indication that configure.ac sets -mzarch in
CFLAGS when appropriate.
Modified:
libdfp/trunk/ChangeLog
libdfp/trunk/Makefile.in
libdfp/trunk/README.developer
libdfp/trunk/configure
libdfp/trunk/configure.ac
Modified: libdfp/trunk/ChangeLog
==============================================================================
--- libdfp/trunk/ChangeLog (original)
+++ libdfp/trunk/ChangeLog Fri Aug 6 14:05:27 2010
@@ -1,3 +1,17 @@
+2010-08-06 Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ * configure: Regenerated.
+ * Makefile.in: Added special sed script which changes
+ libdecnumber/Makefile:CFLAGS = foo into CFLAGS ?= foo. This allows
+ libdfp/Makefile's sub make invocation of libdecnumber/Makefile to
+ accept the updated CFLAGS. This was necessary to allow configure to
+ update CFLAGS with -mzarch for s390 z9-ec and z10. GCC should fix
+ this in their version of libdecnumber.
+ * configure.ac: -mzarch added to CFLAGS when s390 system is z9-ec or
+ z10.
+ * README.developer: Added indication that configure.ac sets -mzarch in
+ CFLAGS when appropriate.
+
2010-08-06 Ryan S. Arnold <rsa@xxxxxxxxxx>
* Makefile.gdb (libdfp_tests.gdb): Add
Modified: libdfp/trunk/Makefile.in
==============================================================================
--- libdfp/trunk/Makefile.in (original)
+++ libdfp/trunk/Makefile.in Fri Aug 6 14:05:27 2010
@@ -83,9 +83,6 @@
+cflags := $(sort $(+cflags))
override CFLAGS = $(gnu-inline-CFLAGS) $(+cflags)
-# Necessary so that the submake invocation of libdecnumber/Makefile actually
-# picks up the CFLAGS.
-export CFLAGS
# These are the flags given to the compiler to tell it what sort of
# optimization and/or debugging output to do for .S files.
@@ -177,7 +174,14 @@
# variables from the environment.
$(dfp_backend)/$(dfp_backend_lib):
@echo "+Building DFP backend $@"
- DEFS="-D__STDC_DEC_FP__=200704L" CFLAGS="$(CFLAGS)" $(MAKE) -C $(dfp_backend)
+ # This is done so that if/when gcc changes libdecnumber/Makefile.in:
+ # CFLAGS = @CFLAGS@ to CFLAGS ?= @CFLAGS@ we don't need to do anything
+ # other than remove this line. This is better than changing
+ # libdecnumber/Makefile.in and having to redo the Makefile in the
+ # future.
+ sed '/CFLAGS =/s/^CFLAGS \?\= \(.*\)$$/CFLAGS ?= \1/' $(dfp_backend)/Makefile > $(dfp_backend)/Makefile.temp
+ mv $(dfp_backend)/Makefile.temp $(dfp_backend)/Makefile
+ DEFS="-D__STDC_DEC_FP__=200704L" CFLAGS="$(CFLAGS)" $(MAKE) -C $(dfp_backend)
@echo
libdfp: @enable_static@ @enable_shared@
Modified: libdfp/trunk/README.developer
==============================================================================
--- libdfp/trunk/README.developer (original)
+++ libdfp/trunk/README.developer Fri Aug 6 14:05:27 2010
@@ -286,14 +286,15 @@
different bitness than the default user env it is recommended that the
-m[31|32|64] flags be passed.
- Some System Z machines require the -mzarch flag, e.g.
- CFLAGS="-m31 -mzarch -O2 -g"
-
These should accompany sympathetic --build switch
described below, e.g.
powerpc-linux-gnu for -m32
powerpc64-linux-gnu for -m64
+
+ For System Z (s390), depending on the cpu, Libdfp's configure.ac will
+ append a -mzarch flag onto CFLAGS automatically. This is a special
+ flag required to enable hardware DFP on some System Z cpus.
ASFLAGS
Libdfp's Makefile.in will pull -g or -m[31|32|64] into ASFLAGS if it is
Modified: libdfp/trunk/configure
==============================================================================
--- libdfp/trunk/configure (original)
+++ libdfp/trunk/configure Fri Aug 6 14:05:27 2010
@@ -1556,11 +1556,15 @@
with_dfp=yes ;;
z9-ec)
submachine="$withval"
+ # Warning, -mzarch won't get passed to libecnumber/configure
+ CFLAGS="$CFLAGS -mzarch"
{ echo "$as_me:$LINENO: configuring for the $submachine processor" >&5
echo "$as_me: configuring for the $submachine processor" >&6;}
with_dfp=yes ;;
z10)
submachine="$withval"
+ # Warning, -mzarch won't get passed to libecnumber/configure
+ CFLAGS="$CFLAGS -mzarch"
{ echo "$as_me:$LINENO: configuring for the $submachine processor" >&5
echo "$as_me: configuring for the $submachine processor" >&6;}
with_dfp=yes ;;
Modified: libdfp/trunk/configure.ac
==============================================================================
--- libdfp/trunk/configure.ac (original)
+++ libdfp/trunk/configure.ac Fri Aug 6 14:05:27 2010
@@ -174,10 +174,14 @@
with_dfp=yes ;;
z9-ec)
submachine="$withval"
+ # Warning, -mzarch won't get passed to libecnumber/configure
+ CFLAGS="$CFLAGS -mzarch"
AC_MSG_NOTICE(configuring for the $submachine processor)
with_dfp=yes ;;
z10)
submachine="$withval"
+ # Warning, -mzarch won't get passed to libecnumber/configure
+ CFLAGS="$CFLAGS -mzarch"
AC_MSG_NOTICE(configuring for the $submachine processor)
with_dfp=yes ;;
*)