Message ID | 1586769836-310-1-git-send-email-Cedric_Hombourger@mentor.com |
---|---|
State | Accepted |
Headers | show |
Series | test: make requirement for gawk explicit | expand |
Hi Cedric, On 13/04/20 11:23, Cedric Hombourger wrote: > The awk code used to translate wrapper declarations into linker > options requires features from GNU Awk. Systems with awk == mawk > will silently fail to produce a list -Wl,--wrap options (a null > string is returned in the shell expansion). > > Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com> > --- > test/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/test/Makefile b/test/Makefile > index 073fe6a..2b2070a 100644 > --- a/test/Makefile > +++ b/test/Makefile > @@ -35,7 +35,7 @@ EXTRA_LDFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_LDFLAGS)))#")) > endif > > ## transfer __mock_*() functions to according linker flags via rudimentary regex awk parsing > -LDMOCKS = `/usr/bin/awk '/^[^(extern)|(static)]*([\*_[:alnum:]]+[[:blank:]]+)+[\*]*__wrap_/{where = match($$0,"__wrap_[_[:alnum:]]+"); if (RSTART > 0) { print "-Wl,--wrap=" substr($$0, RSTART+7, RLENGTH-7);}}' $(basename $@).c` > +LDMOCKS = `/usr/bin/gawk '/^[^(extern)|(static)]*([\*_[:alnum:]]+[[:blank:]]+)+[\*]*__wrap_/{where = match($$0,"__wrap_[_[:alnum:]]+"); if (RSTART > 0) { print "-Wl,--wrap=" substr($$0, RSTART+7, RLENGTH-7);}}' $(basename $@).c` > > quiet_cmd_linktestexe = LD $(basename $@) > cmd_linktestexe = $(srctree)/scripts/trylink \ > Applied to -master, thanks ! Best regards, Stefano Babic
diff --git a/test/Makefile b/test/Makefile index 073fe6a..2b2070a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -35,7 +35,7 @@ EXTRA_LDFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_LDFLAGS)))#")) endif ## transfer __mock_*() functions to according linker flags via rudimentary regex awk parsing -LDMOCKS = `/usr/bin/awk '/^[^(extern)|(static)]*([\*_[:alnum:]]+[[:blank:]]+)+[\*]*__wrap_/{where = match($$0,"__wrap_[_[:alnum:]]+"); if (RSTART > 0) { print "-Wl,--wrap=" substr($$0, RSTART+7, RLENGTH-7);}}' $(basename $@).c` +LDMOCKS = `/usr/bin/gawk '/^[^(extern)|(static)]*([\*_[:alnum:]]+[[:blank:]]+)+[\*]*__wrap_/{where = match($$0,"__wrap_[_[:alnum:]]+"); if (RSTART > 0) { print "-Wl,--wrap=" substr($$0, RSTART+7, RLENGTH-7);}}' $(basename $@).c` quiet_cmd_linktestexe = LD $(basename $@) cmd_linktestexe = $(srctree)/scripts/trylink \
The awk code used to translate wrapper declarations into linker options requires features from GNU Awk. Systems with awk == mawk will silently fail to produce a list -Wl,--wrap options (a null string is returned in the shell expansion). Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com> --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)