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: [PATCHv2 1/9] Support for type-generic libm function implementations libm



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.


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