[dpdk-dev] app/test: call objdump in platform-independent way
Commit Message
Using of the /dev/stdin generates a warning when compiling on FreeBSD:
objcopy: Warning: '/dev/stdin' is not an ordinary file
app/test/Makefile:78: recipe for target 'test_resource_c.res.o' failed
# ls -l /dev/stdin
lrwxr-xr-x 1 root wheel 4 Jun 17 12:24 /dev/stdin -> fd/0
Replace /dev/stdin by a temporary file.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Reported-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
app/test/Makefile | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Comments
2016-06-17 14:52, Jan Viktorin:
> Using of the /dev/stdin generates a warning when compiling on FreeBSD:
>
> objcopy: Warning: '/dev/stdin' is not an ordinary file
> app/test/Makefile:78: recipe for target 'test_resource_c.res.o' failed
> # ls -l /dev/stdin
> lrwxr-xr-x 1 root wheel 4 Jun 17 12:24 /dev/stdin -> fd/0
>
> Replace /dev/stdin by a temporary file.
>
> Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
> Reported-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Looks good, thanks
2016-06-17 15:19, Thomas Monjalon:
> 2016-06-17 14:52, Jan Viktorin:
> > Using of the /dev/stdin generates a warning when compiling on FreeBSD:
> >
> > objcopy: Warning: '/dev/stdin' is not an ordinary file
> > app/test/Makefile:78: recipe for target 'test_resource_c.res.o' failed
> > # ls -l /dev/stdin
> > lrwxr-xr-x 1 root wheel 4 Jun 17 12:24 /dev/stdin -> fd/0
> >
> > Replace /dev/stdin by a temporary file.
> >
> > Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
> > Reported-by: Thomas Monjalon <thomas.monjalon@6wind.com>
>
> Tested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
>
> Looks good, thanks
Applied with title fixed: objdump -> objcopy ;)
@@ -43,13 +43,14 @@ define linked_resource
SRCS-y += $(1).res.o
$(1).res.o: $(2)
@ echo ' MKRES $$@'
+ $Q ln -fs $$< resource.tmp
$Q $(OBJCOPY) -I binary -B $(RTE_OBJCOPY_ARCH) -O $(RTE_OBJCOPY_TARGET) \
--rename-section \
.data=.rodata,alloc,load,data,contents,readonly \
- --redefine-sym _binary__dev_stdin_start=beg_$(1) \
- --redefine-sym _binary__dev_stdin_end=end_$(1) \
- --redefine-sym _binary__dev_stdin_size=siz_$(1) \
- /dev/stdin $$@ < $$<
+ --redefine-sym _binary_resource_tmp_start=beg_$(1) \
+ --redefine-sym _binary_resource_tmp_end=end_$(1) \
+ --redefine-sym _binary_resource_tmp_size=siz_$(1) \
+ resource.tmp $$@ && rm -f resource.tmp
endef
ifeq ($(CONFIG_RTE_APP_TEST_RESOURCE_TAR),y)