[PATCHv2 1/9] Support for type-generic libm function implementations libm
Paul E. Murphy
murphyp@linux.vnet.ibm.com
Mon Sep 19 18:25:00 GMT 2016
On 09/19/2016 12:05 PM, Andreas Schwab wrote:
> On Aug 16 2016, "Paul E. Murphy" <murphyp@linux.vnet.ibm.com> wrote:
>
>> @@ -265,6 +269,29 @@ extra-objs += libieee.a ieee-math.o
>>
>> include ../Rules
>>
>> +generated += $(addsuffix .c,$(call type-foreach,$(gen-libm-calls))) \
>> + gen-libm-templates.stmp
>> +
>> +# Create wrappers in the math build directory.
>> +$(objpfx)gen-libm-templates.stmp:
>> + for gcall in $(gen-libm-calls); do \
>> + func=$${gcall%F*}$${gcall#*F}; \
>> + for type in $(foreach t,$(types),$(t)__$(type-$(t)-suffix)); do \
>> + suff=$${type#*__}; \
>> + type=$${type%__*}; \
>> + file=$(objpfx)$${gcall%F*}$${suff}$${gcall#*F}.c; \
>> + ( \
>> + echo "#include <math-type-macros-$${type}.h>"; \
>> + echo "#include <$${func}_template.c>"; \
>> + ) > $${file}; \
>> + done; \
>> + done; \
>> + echo > $(@)
>
> That should probably depend on Makefile so that it is rerun when
> gen-libm-calls changes.
>
> Andreas.
>
Indeed. I'll post a patch once I commit the three pending patches, one
of which adds a dependency for the output directory too.
More information about the Libc-alpha
mailing list