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]

[RFC][PATCH] fix math cflags overrides


The problem i see is that in the makefile logic the sysdirs var has
sysdeps/aarch64/fpu before sysdeps/ieee754/dbl-64.

this means source files and rules in the former override files in
the later (which is good), but it also means variable definitions
in makefile fragments of the later overrides the ones of the former
(i.e. reverse order wrt the source override, which is not what i'd
expect).

as a workaround i'd just use += instead of = in the dbl-64 makefile
cflags definitions so at least it does not drop earlier cflags,
the cflag definition ordering is not ideal: if i have a target
specific sqrt, i don't want to compile it with nofma flags.

2017-08-23  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* sysdeps/ieee754/dbl-64/Makefile: Don't override cflags.
diff --git a/sysdeps/ieee754/dbl-64/Makefile b/sysdeps/ieee754/dbl-64/Makefile
index 5557c75b45..c965982fa5 100644
--- a/sysdeps/ieee754/dbl-64/Makefile
+++ b/sysdeps/ieee754/dbl-64/Makefile
@@ -1,6 +1,6 @@
 ifeq ($(subdir),math)
 # branred depends on precise IEEE double rounding
-CFLAGS-branred.c = $(config-cflags-nofma)
-CFLAGS-e_sqrt.c = $(config-cflags-nofma)
-CFLAGS-e_pow.c = $(config-cflags-nofma)
+CFLAGS-branred.c += $(config-cflags-nofma)
+CFLAGS-e_sqrt.c += $(config-cflags-nofma)
+CFLAGS-e_pow.c += $(config-cflags-nofma)
 endif

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