diff options
author | Idwer Vollering <vidwer@gmail.com> | 2013-02-25 03:49:04 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-03-22 16:31:37 +0100 |
commit | 19a5c59caaf4b064d1d75970ce2e9e62aad0635b (patch) | |
tree | 5e5e0c437ca8839ba5d1466b0b099fcfbd3086a6 | |
parent | 8f48f5069b988ad07d63256ffd1a7ddcbbb5c619 (diff) |
Fix QEMU build for glibc-2.17
The clock_* functions are no longer in librt starting with glibc-2.17,
but timer_* functions are.
This solves linker errors similar to this:
(32-bit archlinux installation with glibc 2.17-3, binutils 2.23.1-3, glib2 2.34.3-1)
/usr/bin/ld: ../qemu-timer.o: undefined reference to symbol 'timer_settime@@GLIBC_2.2'
/usr/bin/ld: note: 'timer_settime@@GLIBC_2.2' is defined in DSO /usr/lib/librt.so.1 so try adding it to the linker command line
/usr/lib/librt.so.1: could not read symbols: Invalid operation
Change-Id: I2d335d065457788ef8aada7d0d500e84ba31e4d0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/2504
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rwxr-xr-x | qemu-0.15.x/configure | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qemu-0.15.x/configure b/qemu-0.15.x/configure index 24778bf..947fa3f 100755 --- a/qemu-0.15.x/configure +++ b/qemu-0.15.x/configure @@ -2401,7 +2401,10 @@ fi cat > $TMPC <<EOF #include <signal.h> #include <time.h> -int main(void) { clockid_t id; return clock_gettime(id, NULL); } +int main(void) { + timer_t timer; struct itimerspec timeout; timer_settime(timer, 0, &timeout, NULL); + clockid_t id; return clock_gettime(id, NULL); +} EOF if compile_prog "" "" ; then |