* [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib
@ 2017-11-08 1:10 Alistair Francis
2017-11-08 5:00 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alistair Francis @ 2017-11-08 1:10 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: alistair.francis, alistair23, kraxel, dgilbert
When cross compiling QEMU for Windows we need to specify the cross
version of ranlib to avoid build errors when buildling capstone. This
patch ensures we use the same cross prefix on ranlib as other toolchain
components.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
---
Makefile | 2 +-
configure | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0496c5057a..814f6820d9 100644
--- a/Makefile
+++ b/Makefile
@@ -405,7 +405,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
CAP_CFLAGS += -DCAPSTONE_HAS_X86
subdir-capstone: .git-submodule-status
- $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
+ $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
$(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))
diff --git a/configure b/configure
index a6055c0710..0e856bbc04 100755
--- a/configure
+++ b/configure
@@ -482,6 +482,7 @@ ccas="${CCAS-$cc}"
cpp="${CPP-$cc -E}"
objcopy="${OBJCOPY-${cross_prefix}objcopy}"
ld="${LD-${cross_prefix}ld}"
+ranlib="${RANLIB-${cross_prefix}ranlib}"
nm="${NM-${cross_prefix}nm}"
strip="${STRIP-${cross_prefix}strip}"
windres="${WINDRES-${cross_prefix}windres}"
@@ -6288,6 +6289,7 @@ echo "CCAS=$ccas" >> $config_host_mak
echo "CPP=$cpp" >> $config_host_mak
echo "OBJCOPY=$objcopy" >> $config_host_mak
echo "LD=$ld" >> $config_host_mak
+echo "RANLIB=$ranlib" >> $config_host_mak
echo "NM=$nm" >> $config_host_mak
echo "WINDRES=$windres" >> $config_host_mak
echo "CFLAGS=$CFLAGS" >> $config_host_mak
@@ -6782,6 +6784,7 @@ for rom in seabios vgabios ; do
echo "OBJCOPY=objcopy" >> $config_mak
echo "IASL=$iasl" >> $config_mak
echo "LD=$ld" >> $config_mak
+ echo "RANLIB=$ranlib" >> $config_mak
done
# set up tests data directory
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib
2017-11-08 1:10 [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib Alistair Francis
@ 2017-11-08 5:00 ` Philippe Mathieu-Daudé
2017-11-08 14:08 ` Philippe Mathieu-Daudé
2017-11-08 9:05 ` Daniel P. Berrange
2017-11-09 7:53 ` Richard Henderson
2 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-11-08 5:00 UTC (permalink / raw)
To: Alistair Francis, qemu-devel, peter.maydell; +Cc: alistair23, kraxel, dgilbert
Hi Alistair,
On 11/07/2017 10:10 PM, Alistair Francis wrote:
> When cross compiling QEMU for Windows we need to specify the cross
What toolchain do you use?
> version of ranlib to avoid build errors when buildling capstone. This
"building"
> patch ensures we use the same cross prefix on ranlib as other toolchain
> components.
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
MXE:
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>
> Makefile | 2 +-
> configure | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 0496c5057a..814f6820d9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -405,7 +405,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
> CAP_CFLAGS += -DCAPSTONE_HAS_X86
>
> subdir-capstone: .git-submodule-status
> - $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
> + $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
>
> $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
> $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))
> diff --git a/configure b/configure
> index a6055c0710..0e856bbc04 100755
> --- a/configure
> +++ b/configure
> @@ -482,6 +482,7 @@ ccas="${CCAS-$cc}"
> cpp="${CPP-$cc -E}"
> objcopy="${OBJCOPY-${cross_prefix}objcopy}"
> ld="${LD-${cross_prefix}ld}"
> +ranlib="${RANLIB-${cross_prefix}ranlib}"
> nm="${NM-${cross_prefix}nm}"
> strip="${STRIP-${cross_prefix}strip}"
> windres="${WINDRES-${cross_prefix}windres}"
> @@ -6288,6 +6289,7 @@ echo "CCAS=$ccas" >> $config_host_mak
> echo "CPP=$cpp" >> $config_host_mak
> echo "OBJCOPY=$objcopy" >> $config_host_mak
> echo "LD=$ld" >> $config_host_mak
> +echo "RANLIB=$ranlib" >> $config_host_mak
> echo "NM=$nm" >> $config_host_mak
> echo "WINDRES=$windres" >> $config_host_mak
> echo "CFLAGS=$CFLAGS" >> $config_host_mak
> @@ -6782,6 +6784,7 @@ for rom in seabios vgabios ; do
> echo "OBJCOPY=objcopy" >> $config_mak
> echo "IASL=$iasl" >> $config_mak
> echo "LD=$ld" >> $config_mak
> + echo "RANLIB=$ranlib" >> $config_mak
> done
>
> # set up tests data directory
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib
2017-11-08 5:00 ` Philippe Mathieu-Daudé
@ 2017-11-08 14:08 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-11-08 14:08 UTC (permalink / raw)
To: Alistair Francis, qemu-devel, peter.maydell; +Cc: alistair23, kraxel, dgilbert
On 11/08/2017 02:00 AM, Philippe Mathieu-Daudé wrote:
> Hi Alistair,
>
> On 11/07/2017 10:10 PM, Alistair Francis wrote:
>> When cross compiling QEMU for Windows we need to specify the cross
>
> What toolchain do you use?
>
>> version of ranlib to avoid build errors when buildling capstone. This
>
> "building"
>
>> patch ensures we use the same cross prefix on ranlib as other toolchain
>> components.
Please add this extra info in the commit (take from the mail thread)
which may be useful if we add a continuous integration test for these
toolchains/distribs.
- Fedora23 mingw
- RHEL-7 with mingw packages from epel:
LINK qemu-img.exe
build-win64/capstone/capstone.lib: error adding symbols: Archive has no
index; run ranlib to add one
collect2: error: ld returned 1 exit status
$ x86_64-w64-mingw32-ar --version
GNU ar (GNU Binutils) 2.25
- RHEL7.2
>>
>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
>> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> MXE:
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
>> ---
>>
>> Makefile | 2 +-
>> configure | 3 +++
>> 2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 0496c5057a..814f6820d9 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -405,7 +405,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
>> CAP_CFLAGS += -DCAPSTONE_HAS_X86
>>
>> subdir-capstone: .git-submodule-status
>> - $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
>> + $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
>>
>> $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
>> $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))
>> diff --git a/configure b/configure
>> index a6055c0710..0e856bbc04 100755
>> --- a/configure
>> +++ b/configure
>> @@ -482,6 +482,7 @@ ccas="${CCAS-$cc}"
>> cpp="${CPP-$cc -E}"
>> objcopy="${OBJCOPY-${cross_prefix}objcopy}"
>> ld="${LD-${cross_prefix}ld}"
>> +ranlib="${RANLIB-${cross_prefix}ranlib}"
>> nm="${NM-${cross_prefix}nm}"
>> strip="${STRIP-${cross_prefix}strip}"
>> windres="${WINDRES-${cross_prefix}windres}"
>> @@ -6288,6 +6289,7 @@ echo "CCAS=$ccas" >> $config_host_mak
>> echo "CPP=$cpp" >> $config_host_mak
>> echo "OBJCOPY=$objcopy" >> $config_host_mak
>> echo "LD=$ld" >> $config_host_mak
>> +echo "RANLIB=$ranlib" >> $config_host_mak
>> echo "NM=$nm" >> $config_host_mak
>> echo "WINDRES=$windres" >> $config_host_mak
>> echo "CFLAGS=$CFLAGS" >> $config_host_mak
>> @@ -6782,6 +6784,7 @@ for rom in seabios vgabios ; do
>> echo "OBJCOPY=objcopy" >> $config_mak
>> echo "IASL=$iasl" >> $config_mak
>> echo "LD=$ld" >> $config_mak
>> + echo "RANLIB=$ranlib" >> $config_mak
>> done
>>
>> # set up tests data directory
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib
2017-11-08 1:10 [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib Alistair Francis
2017-11-08 5:00 ` Philippe Mathieu-Daudé
@ 2017-11-08 9:05 ` Daniel P. Berrange
2017-11-09 7:53 ` Richard Henderson
2 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2017-11-08 9:05 UTC (permalink / raw)
To: Alistair Francis; +Cc: qemu-devel, peter.maydell, alistair23, kraxel, dgilbert
On Tue, Nov 07, 2017 at 05:10:46PM -0800, Alistair Francis wrote:
> When cross compiling QEMU for Windows we need to specify the cross
> version of ranlib to avoid build errors when buildling capstone. This
> patch ensures we use the same cross prefix on ranlib as other toolchain
> components.
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>
> Makefile | 2 +-
> configure | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
>
> diff --git a/Makefile b/Makefile
> index 0496c5057a..814f6820d9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -405,7 +405,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
> CAP_CFLAGS += -DCAPSTONE_HAS_X86
>
> subdir-capstone: .git-submodule-status
> - $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
> + $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
>
> $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
> $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))
> diff --git a/configure b/configure
> index a6055c0710..0e856bbc04 100755
> --- a/configure
> +++ b/configure
> @@ -482,6 +482,7 @@ ccas="${CCAS-$cc}"
> cpp="${CPP-$cc -E}"
> objcopy="${OBJCOPY-${cross_prefix}objcopy}"
> ld="${LD-${cross_prefix}ld}"
> +ranlib="${RANLIB-${cross_prefix}ranlib}"
> nm="${NM-${cross_prefix}nm}"
> strip="${STRIP-${cross_prefix}strip}"
> windres="${WINDRES-${cross_prefix}windres}"
> @@ -6288,6 +6289,7 @@ echo "CCAS=$ccas" >> $config_host_mak
> echo "CPP=$cpp" >> $config_host_mak
> echo "OBJCOPY=$objcopy" >> $config_host_mak
> echo "LD=$ld" >> $config_host_mak
> +echo "RANLIB=$ranlib" >> $config_host_mak
> echo "NM=$nm" >> $config_host_mak
> echo "WINDRES=$windres" >> $config_host_mak
> echo "CFLAGS=$CFLAGS" >> $config_host_mak
> @@ -6782,6 +6784,7 @@ for rom in seabios vgabios ; do
> echo "OBJCOPY=objcopy" >> $config_mak
> echo "IASL=$iasl" >> $config_mak
> echo "LD=$ld" >> $config_mak
> + echo "RANLIB=$ranlib" >> $config_mak
> done
>
> # set up tests data directory
> --
> 2.11.0
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib
2017-11-08 1:10 [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib Alistair Francis
2017-11-08 5:00 ` Philippe Mathieu-Daudé
2017-11-08 9:05 ` Daniel P. Berrange
@ 2017-11-09 7:53 ` Richard Henderson
2 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2017-11-09 7:53 UTC (permalink / raw)
To: Alistair Francis, qemu-devel, peter.maydell; +Cc: alistair23, kraxel, dgilbert
On 11/08/2017 02:10 AM, Alistair Francis wrote:
> When cross compiling QEMU for Windows we need to specify the cross
> version of ranlib to avoid build errors when buildling capstone. This
> patch ensures we use the same cross prefix on ranlib as other toolchain
> components.
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> ---
Thanks. Queued for pull with another outstanding capstone patch.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-09 7:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08 1:10 [Qemu-devel] [PATCH v1 1/1] Makefile: Capstone: Add support for cross compile ranlib Alistair Francis
2017-11-08 5:00 ` Philippe Mathieu-Daudé
2017-11-08 14:08 ` Philippe Mathieu-Daudé
2017-11-08 9:05 ` Daniel P. Berrange
2017-11-09 7:53 ` Richard Henderson
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.