* [PATCH] MIPS: VDSO: Fix binutils version test
@ 2016-01-05 7:21 Tony Wu
2016-01-06 15:22 ` James Hogan
0 siblings, 1 reply; 3+ messages in thread
From: Tony Wu @ 2016-01-05 7:21 UTC (permalink / raw)
To: ralf, Qais Yousef; +Cc: Alex Smith, linux-mips
Commit 2a037f310bab ("MIPS: VDSO: Fix build error") fixed the logic
for testing binutils version, but introduced another issue.
The ld-ifversion macro is defined as follows:
$(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
This macro checks ld version to echo $(3) or echo $(4) based on
the given condition.
It is called as follows in arch/mips/vdso/Makefile:
ifeq ($(call ld-ifversion, -lt, 22500000, y),)
$(warning MIPS VDSO requires binutils >= 2.25)
obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
ccflags-vdso += -DDISABLE_MIPS_VDSO
endif
Since $(4) is empty, echo $(4) will evaluate to a simple 'echo'. So, in
case binutils version is indeed greater than 2.25.0, ld-ifversion macro
will return a newline, not the empty string as expected, and that makes
the test fail.
This patch fixes the test condition.
Signed-off-by: Tony Wu <tung7970@gmail.com>
Cc: Qais Yousef <qais.yousef@imgtec.com>
Cc: Alex Smith <alex@alex-smith.me.uk>
diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index 018f8c7..a54a082 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -26,7 +26,7 @@ aflags-vdso := $(ccflags-vdso) \
# the comments on that file.
#
ifndef CONFIG_CPU_MIPSR6
- ifeq ($(call ld-ifversion, -lt, 22500000, y),)
+ ifneq ($(call ld-ifversion,-ge,22500000,y),y)
$(warning MIPS VDSO requires binutils >= 2.25)
obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
ccflags-vdso += -DDISABLE_MIPS_VDSO
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] MIPS: VDSO: Fix binutils version test
@ 2016-01-06 15:22 ` James Hogan
0 siblings, 0 replies; 3+ messages in thread
From: James Hogan @ 2016-01-06 15:22 UTC (permalink / raw)
To: Tony Wu; +Cc: ralf, Qais Yousef, Alex Smith, linux-mips
[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]
Hi Tony,
On Tue, Jan 05, 2016 at 03:21:01PM +0800, Tony Wu wrote:
> Commit 2a037f310bab ("MIPS: VDSO: Fix build error") fixed the logic
> for testing binutils version, but introduced another issue.
>
> The ld-ifversion macro is defined as follows:
>
> $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
>
> This macro checks ld version to echo $(3) or echo $(4) based on
> the given condition.
>
> It is called as follows in arch/mips/vdso/Makefile:
>
> ifeq ($(call ld-ifversion, -lt, 22500000, y),)
> $(warning MIPS VDSO requires binutils >= 2.25)
> obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
> ccflags-vdso += -DDISABLE_MIPS_VDSO
> endif
>
> Since $(4) is empty, echo $(4) will evaluate to a simple 'echo'. So, in
> case binutils version is indeed greater than 2.25.0, ld-ifversion macro
> will return a newline, not the empty string as expected, and that makes
> the test fail.
>
> This patch fixes the test condition.
See:
- http://patchwork.linux-mips.org/patch/11926/
(now merged into mainline)
- http://patchwork.linux-mips.org/patch/11931/
(in mips-for-linux-next / linux-next for v4.4)
Thanks
James
>
> Signed-off-by: Tony Wu <tung7970@gmail.com>
> Cc: Qais Yousef <qais.yousef@imgtec.com>
> Cc: Alex Smith <alex@alex-smith.me.uk>
>
> diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
> index 018f8c7..a54a082 100644
> --- a/arch/mips/vdso/Makefile
> +++ b/arch/mips/vdso/Makefile
> @@ -26,7 +26,7 @@ aflags-vdso := $(ccflags-vdso) \
> # the comments on that file.
> #
> ifndef CONFIG_CPU_MIPSR6
> - ifeq ($(call ld-ifversion, -lt, 22500000, y),)
> + ifneq ($(call ld-ifversion,-ge,22500000,y),y)
> $(warning MIPS VDSO requires binutils >= 2.25)
> obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
> ccflags-vdso += -DDISABLE_MIPS_VDSO
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] MIPS: VDSO: Fix binutils version test
@ 2016-01-06 15:22 ` James Hogan
0 siblings, 0 replies; 3+ messages in thread
From: James Hogan @ 2016-01-06 15:22 UTC (permalink / raw)
To: Tony Wu; +Cc: ralf, Qais Yousef, Alex Smith, linux-mips
[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]
Hi Tony,
On Tue, Jan 05, 2016 at 03:21:01PM +0800, Tony Wu wrote:
> Commit 2a037f310bab ("MIPS: VDSO: Fix build error") fixed the logic
> for testing binutils version, but introduced another issue.
>
> The ld-ifversion macro is defined as follows:
>
> $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
>
> This macro checks ld version to echo $(3) or echo $(4) based on
> the given condition.
>
> It is called as follows in arch/mips/vdso/Makefile:
>
> ifeq ($(call ld-ifversion, -lt, 22500000, y),)
> $(warning MIPS VDSO requires binutils >= 2.25)
> obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
> ccflags-vdso += -DDISABLE_MIPS_VDSO
> endif
>
> Since $(4) is empty, echo $(4) will evaluate to a simple 'echo'. So, in
> case binutils version is indeed greater than 2.25.0, ld-ifversion macro
> will return a newline, not the empty string as expected, and that makes
> the test fail.
>
> This patch fixes the test condition.
See:
- http://patchwork.linux-mips.org/patch/11926/
(now merged into mainline)
- http://patchwork.linux-mips.org/patch/11931/
(in mips-for-linux-next / linux-next for v4.4)
Thanks
James
>
> Signed-off-by: Tony Wu <tung7970@gmail.com>
> Cc: Qais Yousef <qais.yousef@imgtec.com>
> Cc: Alex Smith <alex@alex-smith.me.uk>
>
> diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
> index 018f8c7..a54a082 100644
> --- a/arch/mips/vdso/Makefile
> +++ b/arch/mips/vdso/Makefile
> @@ -26,7 +26,7 @@ aflags-vdso := $(ccflags-vdso) \
> # the comments on that file.
> #
> ifndef CONFIG_CPU_MIPSR6
> - ifeq ($(call ld-ifversion, -lt, 22500000, y),)
> + ifneq ($(call ld-ifversion,-ge,22500000,y),y)
> $(warning MIPS VDSO requires binutils >= 2.25)
> obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
> ccflags-vdso += -DDISABLE_MIPS_VDSO
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-06 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-05 7:21 [PATCH] MIPS: VDSO: Fix binutils version test Tony Wu
2016-01-06 15:22 ` James Hogan
2016-01-06 15:22 ` James Hogan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.