[PATCH v2 1/2] BZ #17645, fix slow DSO sorting behavior in dynamic loader

Andreas Schwab schwab@linux-m68k.org
Tue May 19 14:21:00 GMT 2020


On Mai 19 2020, Chung-Lin Tang wrote:

> +define include_dsosort_tests
> +# We use the existence of the Makefile fragment file to indicate if we need to
> +# regenerate all sources and script for this test file.
> +$(shell if ! test -f "$(objpfx)$(1).tmp-makefile"; then \
> +          $(PYTHON) $(..)scripts/dso-ordering-test.py --description-file $(1) \
> +          --objpfx $(objpfx) --output-makefile $(objpfx)$(1).tmp-makefile; fi)
> +include $(objpfx)$(1).tmp-makefile
> +endef

You can just write a rule that creates $(objpfx)$(1).tmp-makefile, no
need to use $(shell).

> +# Currently all tests are defined in description files, and this function is
> +# not utilized, but kept here for possible conveniences.
> +define single_dsosort_test
> +$(shell $(PYTHON) $(..)scripts/dso-ordering-test.py --objpfx $(objpfx) \
> +        $(2) $(1) $(3) --output-makefile $(objpfx)$(1).tmp-makefile)
> +include $(objpfx)$(1).tmp-makefile
> +endef

Likewise.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list