* [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a
@ 2014-09-03 3:44 Fam Zheng
2014-09-03 3:44 ` [Qemu-devel] [PATCH 1/3] trace: Only link generated-tracers.o with "simple" backend Fam Zheng
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Fam Zheng @ 2014-09-03 3:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Stefan Hajnoczi, peter.maydell
On Mac OS X, ranlib complains on a few empty objects:
AR libqemuutil.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
file: libqemuutil.a(generated-tracers.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
file: libqemuutil.a(host-utils.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
file: libqemuutil.a(getauxval.o) has no symbols
This series fixes the warnings.
Fam
Fam Zheng (3):
trace: Only link generated-tracers.o with "simple" backend
util: Move general qemu_getauxval to util/getauxval.c
util: Don't link host-utils.o if it's empty
include/qemu/osdep.h | 4 ----
trace/Makefile.objs | 3 +--
util/Makefile.objs | 3 ++-
util/getauxval.c | 8 ++++++++
util/host-utils.c | 2 --
5 files changed, 11 insertions(+), 9 deletions(-)
--
2.1.0.27.g96db324
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 1/3] trace: Only link generated-tracers.o with "simple" backend
2014-09-03 3:44 [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Fam Zheng
@ 2014-09-03 3:44 ` Fam Zheng
2014-09-05 9:04 ` Stefan Hajnoczi
2014-09-03 3:44 ` [Qemu-devel] [PATCH 2/3] util: Move general qemu_getauxval to util/getauxval.c Fam Zheng
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Fam Zheng @ 2014-09-03 3:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Stefan Hajnoczi, peter.maydell
In any other cases the object file is effectively empty, which is
disliked by ranlib and nm on Mac OS X.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
trace/Makefile.objs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 387f191..46de95c 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -140,8 +140,7 @@ $(obj)/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/
######################################################################
# Backend code
-util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
+util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o generated-tracers.o
util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
util-obj-y += control.o
-util-obj-y += generated-tracers.o
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 2/3] util: Move general qemu_getauxval to util/getauxval.c
2014-09-03 3:44 [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Fam Zheng
2014-09-03 3:44 ` [Qemu-devel] [PATCH 1/3] trace: Only link generated-tracers.o with "simple" backend Fam Zheng
@ 2014-09-03 3:44 ` Fam Zheng
2014-09-03 3:44 ` [Qemu-devel] [PATCH 3/3] util: Don't link host-utils.o if it's empty Fam Zheng
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-09-03 3:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Stefan Hajnoczi, peter.maydell
So that we won't have an empty getauxval.o which is disliked by ranlib.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Paolo Bonzini@redhat.com
Signed-off-by: Fam Zheng <famz@redhat.com>
---
include/qemu/osdep.h | 4 ----
util/getauxval.c | 8 ++++++++
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 9dd43fc..1565404 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -246,11 +246,7 @@ char *qemu_get_exec_dir(void);
* Search the auxiliary vector for @type, returning the value
* or 0 if @type is not present.
*/
-#if defined(CONFIG_GETAUXVAL) || defined(__linux__)
unsigned long qemu_getauxval(unsigned long type);
-#else
-static inline unsigned long qemu_getauxval(unsigned long type) { return 0; }
-#endif
void qemu_set_tty_echo(int fd, bool echo);
diff --git a/util/getauxval.c b/util/getauxval.c
index 25f48e5..1732ace 100644
--- a/util/getauxval.c
+++ b/util/getauxval.c
@@ -98,4 +98,12 @@ unsigned long qemu_getauxval(unsigned long type)
return 0;
}
+
+#else
+
+unsigned long qemu_getauxval(unsigned long type)
+{
+ return 0;
+}
+
#endif
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 3/3] util: Don't link host-utils.o if it's empty
2014-09-03 3:44 [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Fam Zheng
2014-09-03 3:44 ` [Qemu-devel] [PATCH 1/3] trace: Only link generated-tracers.o with "simple" backend Fam Zheng
2014-09-03 3:44 ` [Qemu-devel] [PATCH 2/3] util: Move general qemu_getauxval to util/getauxval.c Fam Zheng
@ 2014-09-03 3:44 ` Fam Zheng
2014-09-03 7:53 ` [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Paolo Bonzini
2014-09-03 11:49 ` Peter Maydell
4 siblings, 0 replies; 9+ messages in thread
From: Fam Zheng @ 2014-09-03 3:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Stefan Hajnoczi, peter.maydell
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
util/Makefile.objs | 3 ++-
util/host-utils.c | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/util/Makefile.objs b/util/Makefile.objs
index 6b3c83b..cb8862b 100644
--- a/util/Makefile.objs
+++ b/util/Makefile.objs
@@ -1,7 +1,8 @@
util-obj-y = osdep.o cutils.o unicode.o qemu-timer-common.o
util-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o event_notifier-win32.o
util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o event_notifier-posix.o qemu-openpty.o
-util-obj-y += envlist.o path.o host-utils.o module.o
+util-obj-y += envlist.o path.o module.o
+util-obj-$(call lnot,$(CONFIG_INT128)) += host-utils.o
util-obj-y += bitmap.o bitops.o hbitmap.o
util-obj-y += fifo8.o
util-obj-y += acl.o
diff --git a/util/host-utils.c b/util/host-utils.c
index ee57ef5..102e5bf 100644
--- a/util/host-utils.c
+++ b/util/host-utils.c
@@ -28,7 +28,6 @@
#include "qemu/host-utils.h"
/* Long integer helpers */
-#ifndef CONFIG_INT128
static inline void mul64(uint64_t *plow, uint64_t *phigh,
uint64_t a, uint64_t b)
{
@@ -161,4 +160,3 @@ int divs128(int64_t *plow, int64_t *phigh, int64_t divisor)
return overflow;
}
-#endif /* !CONFIG_INT128 */
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a
2014-09-03 3:44 [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Fam Zheng
` (2 preceding siblings ...)
2014-09-03 3:44 ` [Qemu-devel] [PATCH 3/3] util: Don't link host-utils.o if it's empty Fam Zheng
@ 2014-09-03 7:53 ` Paolo Bonzini
2014-09-10 6:19 ` Fam Zheng
2014-09-03 11:49 ` Peter Maydell
4 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2014-09-03 7:53 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: peter.maydell, Stefan Hajnoczi
Il 03/09/2014 05:44, Fam Zheng ha scritto:
> On Mac OS X, ranlib complains on a few empty objects:
>
> AR libqemuutil.a
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libqemuutil.a(generated-tracers.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libqemuutil.a(host-utils.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libqemuutil.a(getauxval.o) has no symbols
>
> This series fixes the warnings.
>
> Fam
>
> Fam Zheng (3):
> trace: Only link generated-tracers.o with "simple" backend
> util: Move general qemu_getauxval to util/getauxval.c
> util: Don't link host-utils.o if it's empty
>
> include/qemu/osdep.h | 4 ----
> trace/Makefile.objs | 3 +--
> util/Makefile.objs | 3 ++-
> util/getauxval.c | 8 ++++++++
> util/host-utils.c | 2 --
> 5 files changed, 11 insertions(+), 9 deletions(-)
>
Thanks, looks good. Stefan, can you ack the first patch?
Paolo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a
2014-09-03 3:44 [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Fam Zheng
` (3 preceding siblings ...)
2014-09-03 7:53 ` [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Paolo Bonzini
@ 2014-09-03 11:49 ` Peter Maydell
4 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2014-09-03 11:49 UTC (permalink / raw)
To: Fam Zheng; +Cc: Paolo Bonzini, QEMU Developers, Stefan Hajnoczi
On 3 September 2014 04:44, Fam Zheng <famz@redhat.com> wrote:
> On Mac OS X, ranlib complains on a few empty objects:
>
> AR libqemuutil.a
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libqemuutil.a(generated-tracers.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libqemuutil.a(host-utils.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libqemuutil.a(getauxval.o) has no symbols
>
> This series fixes the warnings.
>
> Fam
>
> Fam Zheng (3):
> trace: Only link generated-tracers.o with "simple" backend
> util: Move general qemu_getauxval to util/getauxval.c
> util: Don't link host-utils.o if it's empty
Series
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
This fixes both the ranlib warnings and the ones from nm
that your new patch was producing. Thanks!
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] trace: Only link generated-tracers.o with "simple" backend
2014-09-03 3:44 ` [Qemu-devel] [PATCH 1/3] trace: Only link generated-tracers.o with "simple" backend Fam Zheng
@ 2014-09-05 9:04 ` Stefan Hajnoczi
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-09-05 9:04 UTC (permalink / raw)
To: Fam Zheng; +Cc: Paolo Bonzini, qemu-devel, Stefan Hajnoczi, peter.maydell
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
On Wed, Sep 03, 2014 at 11:44:54AM +0800, Fam Zheng wrote:
> In any other cases the object file is effectively empty, which is
> disliked by ranlib and nm on Mac OS X.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> trace/Makefile.objs | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
If another trace backend uses generate_c() there will be a link error so
they'll figure out they need to add it in the makefile.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a
2014-09-03 7:53 ` [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Paolo Bonzini
@ 2014-09-10 6:19 ` Fam Zheng
2014-09-10 8:23 ` Paolo Bonzini
0 siblings, 1 reply; 9+ messages in thread
From: Fam Zheng @ 2014-09-10 6:19 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: peter.maydell, qemu-devel, Stefan Hajnoczi
On Wed, 09/03 09:53, Paolo Bonzini wrote:
> Il 03/09/2014 05:44, Fam Zheng ha scritto:
> > On Mac OS X, ranlib complains on a few empty objects:
> >
> > AR libqemuutil.a
> > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> > file: libqemuutil.a(generated-tracers.o) has no symbols
> > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> > file: libqemuutil.a(host-utils.o) has no symbols
> > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> > file: libqemuutil.a(getauxval.o) has no symbols
> >
> > This series fixes the warnings.
> >
> > Fam
> >
> > Fam Zheng (3):
> > trace: Only link generated-tracers.o with "simple" backend
> > util: Move general qemu_getauxval to util/getauxval.c
> > util: Don't link host-utils.o if it's empty
> >
> > include/qemu/osdep.h | 4 ----
> > trace/Makefile.objs | 3 +--
> > util/Makefile.objs | 3 ++-
> > util/getauxval.c | 8 ++++++++
> > util/host-utils.c | 2 --
> > 5 files changed, 11 insertions(+), 9 deletions(-)
> >
>
> Thanks, looks good. Stefan, can you ack the first patch?
>
Paolo,
Since Stefan reviewed the first patch, would you apply this series?
Fam
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a
2014-09-10 6:19 ` Fam Zheng
@ 2014-09-10 8:23 ` Paolo Bonzini
0 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2014-09-10 8:23 UTC (permalink / raw)
To: Fam Zheng; +Cc: peter.maydell, qemu-devel, Stefan Hajnoczi
Il 10/09/2014 08:19, Fam Zheng ha scritto:
> Paolo,
>
> Since Stefan reviewed the first patch, would you apply this series?
Yes, pull request coming soon.
Paolo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-09-10 8:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 3:44 [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Fam Zheng
2014-09-03 3:44 ` [Qemu-devel] [PATCH 1/3] trace: Only link generated-tracers.o with "simple" backend Fam Zheng
2014-09-05 9:04 ` Stefan Hajnoczi
2014-09-03 3:44 ` [Qemu-devel] [PATCH 2/3] util: Move general qemu_getauxval to util/getauxval.c Fam Zheng
2014-09-03 3:44 ` [Qemu-devel] [PATCH 3/3] util: Don't link host-utils.o if it's empty Fam Zheng
2014-09-03 7:53 ` [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a Paolo Bonzini
2014-09-10 6:19 ` Fam Zheng
2014-09-10 8:23 ` Paolo Bonzini
2014-09-03 11:49 ` Peter Maydell
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.