From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH 2/3] util: Move general qemu_getauxval to util/getauxval.c
Date: Wed, 3 Sep 2014 11:44:55 +0800 [thread overview]
Message-ID: <1409715896-14322-3-git-send-email-famz@redhat.com> (raw)
In-Reply-To: <1409715896-14322-1-git-send-email-famz@redhat.com>
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
next prev parent reply other threads:[~2014-09-03 3:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Fam Zheng [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409715896-14322-3-git-send-email-famz@redhat.com \
--to=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).