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 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.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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