Message ID | 1445889660-24640-1-git-send-email-tuliom@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On Mon, 26 Oct 2015, Tulio Magno Quites Machado Filho wrote: > Joseph Myers <joseph@codesourcery.com> writes: > > > Even in GCC, creating generated files like that in the source directory > > would be wrong. If you can create them with a sed script, you can do so > > at build time and put the files in the build directory, not the source > > directory (which should be able to be on a read-only filesystem). > > Ack. What about this new version? I still say this belongs in the libgcc makefiles, not in glibc at all.
Joseph Myers <joseph@codesourcery.com> writes: > On Mon, 26 Oct 2015, Tulio Magno Quites Machado Filho wrote: > >> Joseph Myers <joseph@codesourcery.com> writes: >> >> > Even in GCC, creating generated files like that in the source directory >> > would be wrong. If you can create them with a sed script, you can do so >> > at build time and put the files in the build directory, not the source >> > directory (which should be able to be on a read-only filesystem). >> >> Ack. What about this new version? > > I still say this belongs in the libgcc makefiles, not in glibc at all. OK. I thought you were referring only to the other patch. Thanks!
diff --git a/soft-fp/Makefile b/soft-fp/Makefile index 28f9f0c..f5ea630 100644 --- a/soft-fp/Makefile +++ b/soft-fp/Makefile @@ -37,4 +37,22 @@ gcc-quad-routines := negtf2 addtf3 subtf3 multf3 divtf3 eqtf2 \ fixunstfdi floatditf extendsftf2 trunctfsf2 extenddftf2 \ trunctfdf2 sqrttf2 floatunsitf floatunditf +# Auto-generate KF routines list, removing unused files. +gcc-kf-routines-auto := $(subst tf,kf,\ + $(filter-out sqrttf2,$(gcc-quad-routines))) +gcc-kf-routines-auto-files := $(addprefix $(objpfx),\ + $(addsuffix .c,\ + $(gcc-kf-routines-auto))) + +generate-routines: $(gcc-kf-routines-auto-files) + +clean: + -rm -f $(gcc-kf-routines-auto-files) + include ../Rules + +.SECONDEXPANSION: +$(gcc-kf-routines-auto-files): $$(subst kf,tf,$$(@F)) + @mkdir -p $(objpfx) + @sed -e 's/\(__[a-z]\+\)tf\([a-z0-9]*\)/\1kf\2/g' \ + -e 's/quad[.]h/quad-float128.h/g' $< > $@