[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling |
Date: |
Fri, 22 Apr 2016 10:08:39 +0200 |
On Thu, 21 Apr 2016 20:36:49 +0300
Sergey Fedorov <address@hidden> wrote:
> On 18/04/16 18:47, Sergey Fedorov wrote:
> > On 18/04/16 18:34, Cornelia Huck wrote:
> >> On Mon, 18 Apr 2016 16:51:16 +0200
> >> Cornelia Huck <address@hidden> wrote:
> >>
> >>> On Thu, 7 Apr 2016 18:53:44 +0300
> >>> Sergey Fedorov <address@hidden> wrote:
> >>>
> >>>> From: Sergey Fedorov <address@hidden>
> >>>>
> >>>> Signed-off-by: Sergey Fedorov <address@hidden>
> >>>> Signed-off-by: Sergey Fedorov <address@hidden>
> >>>> ---
> >>>> pc-bios/s390-ccw/Makefile | 2 +-
> >>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
> >>>> index 4208cb429593..5ce6d4ccbaf5 100644
> >>>> --- a/pc-bios/s390-ccw/Makefile
> >>>> +++ b/pc-bios/s390-ccw/Makefile
> >>>> @@ -20,7 +20,7 @@ s390-ccw.elf: $(OBJECTS)
> >>>> $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"
> >>>> Building $(TARGET_DIR)$@")
> >>>>
> >>>> s390-ccw.img: s390-ccw.elf
> >>>> - $(call quiet-command,strip --strip-unneeded $< -o $@,"
> >>>> Stripping $(TARGET_DIR)$@")
> >>>> + $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"
> >>>> Stripping $(TARGET_DIR)$@")
> >>>>
> >>>> $(OBJECTS): Makefile
> >>>>
> >>> Thanks, applied to s390-next.
> >> Uhm, scratch that.
> >>
> >> This fails to build with --disable-strip, as $STRIP is unset in that
> >> case:
> >>
> >> Building s390-ccw/s390-ccw.elf
> >> Stripping s390-ccw/s390-ccw.img
> >> /bin/sh: --strip-unneeded: command not found
> >> make[1]: *** [s390-ccw.img] Error 127
> >>
> >>
> >> The catch is that we always want to strip that binary. Care to send a
> >> patch that deals with that?
> >>
> > I see the problem. I don't promise to fix it soon, but I could try
> > dealing with this as I have time. I don't mind if someone else can just
> > fix it with their own patch :)
>
> It's not straightforward to fix. We need to detect a correct
> cross-prefix for strip. There is something in roms/Makefile:
>
> #
> # cross compiler auto detection
> #
> path := $(subst :, ,$(PATH))
> system := $(shell uname -s | tr "A-Z" "a-z")
>
> # first find cross binutils in path
> find-cross-ld = $(firstword $(wildcard $(patsubst
> %,%/$(1)-*$(system)*-ld,$(path))))
> # then check we have cross gcc too
> find-cross-gcc = $(firstword $(wildcard $(patsubst %ld,%gcc,$(call
> find-cross-ld,$(1)))))
> # finally strip off path + toolname so we get the prefix
> find-cross-prefix = $(subst gcc,,$(notdir $(call find-cross-gcc,$(1))))
>
> powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
> powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
> x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
>
>
> and then:
>
> $(powerpc_cross_prefix)strip <...>
This one has the drawback of having to add architectures manually,
though.
>
>
> However, to solve this problem, it would be enough to export
> ${cross_prefix} from configure to config-host.mak and do like this:
>
> $(CROSS_PREFIX)strip <...>
I agree. This would probably be the easiest way.
- [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, (continued)
- [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Sergey Fedorov, 2016/04/07
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Cornelia Huck, 2016/04/07
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Cornelia Huck, 2016/04/18
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Cornelia Huck, 2016/04/18
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Sergey Fedorov, 2016/04/18
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Sergey Fedorov, 2016/04/21
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Alex Bennée, 2016/04/21
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling, Sergey Fedorov, 2016/04/21
- Re: [Qemu-devel] [PATCH 02/11] pc-bios/s390-ccw: Use correct strip when cross-compiling,
Cornelia Huck <=
[Qemu-devel] [PATCH 07/11] tcg/arm: Make direct jump patching thread-safe, Sergey Fedorov, 2016/04/07
[Qemu-devel] [PATCH 04/11] tcg/ppc: Make direct jump patching thread-safe, Sergey Fedorov, 2016/04/07
[Qemu-devel] [PATCH 11/11] tcg: Note requirement on atomic direct jump patching, Sergey Fedorov, 2016/04/07
[Qemu-devel] [PATCH 08/11] tcg/aarch64: Make direct jump patching thread-safe, Sergey Fedorov, 2016/04/07