Commit Graph

590 Commits

Author SHA1 Message Date
Aurelien Jarno 493abda627 audio: link with -lpulse in addition to -lpulse-simple
Link with -lpulse in addition to -lpulse-simple, needed when --no-add-needed
is passed to the linker (gold default).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-18 00:25:46 +01:00
Blue Swirl 9cf55765b9 Fix typo
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-17 21:27:18 +00:00
Blue Swirl 9c7a420265 Prevent configuring for a user emulator on a different type of OS
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-17 20:52:56 +00:00
Anthony Liguori 422c46a81d Add a unit test for JSON support
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 08:49:39 -06:00
Anthony Liguori 9c9efb6b29 Add unit test for QFloat
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 08:49:38 -06:00
Jan Kiszka 78f5d72602 Cleanup configure checks for dup3 and fallocate
We have a function for this which does not issue annoying warnings.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 08:49:38 -06:00
Markus Armbruster eb852011ab Configurable block format whitelist
We have code for a quite a few block formats.  While I trust that all
of these formats are useful at least for some people in some
circumstances, some of them are of a kind that friends don't let
friends use in production.

This patch provides an optional block format whitelist, default off.
If a whitelist is configured with --block-drv-whitelist, QEMU proper
can use only whitelisted formats.  Other programs, like qemu-img, are
not affected.

Drivers for formats off the whitelist still participate in format
probing, to ensure all programs probe exactly the same.  Without that,
QEMU proper would be prone to treat images with a format off the
whitelist as raw when the image's format is probed.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-09 08:43:02 -06:00
Anthony Liguori 2d9f27d2fd Fix the build when srcdir == objdir
You would only see this error on a fresh clone when srcdir == objdir.  configure
will fail because roms/pcbios doesn't exist.

git submodule integration doesn't cleanup very well when switching between
branches so you'll get an roms/pcbios directory from normal operations if you
switch between old branches.

Thanks to a mistake in configure, if you build outside of srcdir, you'll also
get a valid roms/pcbios.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-02 15:50:27 -06:00
Mark McLoughlin dffcb71cb5 build: add CONFIG_LINUX
So I can add a tap-linux.c and use CONFIG_LINUX to pull it in
in Makefile

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:28 -05:00
Mark McLoughlin e1144d006d net: move net-queue.[ch] under net/
[v2: handle building in a separate dir]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:26 -05:00
Anthony Liguori 102251a4f3 Merge commit 'linux-user/linux-user-for-upstream' into staging 2009-10-21 13:36:49 -05:00
Blue Swirl 747bbdf79f Suppress warnings about 'warn_unused_result' attribute directive
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-18 16:26:06 +00:00
Ulrich Hecht d092793872 implementations of dup3 and fallocate that are good enough to fool LTP
updated fallocate check to new configure, added dup3 check as suggested
by Jan-Simon Möller.

Riku: updated to apply to current git.

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-10-15 23:55:55 +03:00
malc a91b857c38 configure: clean temporary executable files even on Windows
Signed-off-by: malc <av1474@comtv.ru>
2009-10-15 01:57:14 +04:00
Stefan Weil f514f41c45 Fix bswap in comment
Replace bsawp -> bswap.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-11 21:31:40 +02:00
malc 02d5467e9f Move dependency generation falgs out of configure
Signed-off-by: malc <av1474@comtv.ru>
2009-10-11 17:08:57 +04:00
malc 868dc0b4ad configure: clean up temporary dependency files
Signed-off-by: malc <av1474@comtv.ru>
2009-10-11 07:57:17 +04:00
malc d56316388d Windows Waveform Audio driver (no ADC support yet)
Signed-off-by: malc <av1474@comtv.ru>
2009-10-10 01:18:24 +04:00
Luiz Capitulino 3aa3dcfff6 Introduce QList unit-tests
This suite contains tests to assure that QList API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qlist

Patchworks-ID: 35333
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:18 -05:00
Juan Quintela 3d0f151783 Generate gdbstub-xml.c only when needed
First user of new config-devices.mak

Patchworks-ID: 35198
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:11 -05:00
Juan Quintela 1f3d3c8fd7 Add new config-devices.mak for each target
We generate config-devices.h from there automatically.
We need to do it in main Makefile, because we are going to need a main
Makefile for them.

Patchworks-ID: 35196
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:10 -05:00
Juan Quintela 91880d96a1 Move generation of config-target.h to Makefile from configure
Patchworks-ID: 35194
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:04 -05:00
Juan Quintela 25be210f69 Rename config.{h, mak} config-target.{h, mak}
Add config.h file that includes config-target.h and config-host.h

Patchworks-ID: 35193
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:03 -05:00
Juan Quintela 1215c6e761 Move generation of config-host.h to Makefile from configure
Use timestamp based appreach to avoid not needed recompilation.
Add it to rules.mak

Many thanks to Paolo Bonzini for helpding the design, and the debug.

Patchworks-ID: 35190
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:03 -05:00
Juan Quintela deed3ccfca Don't include config-host.mak from inside config.mak
Include it directly in Makefile.target

Patchworks-ID: 35189
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:02 -05:00
Juan Quintela ae7489cba3 AIOLIBS is not used anywhere
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-06 14:46:10 -05:00
Juan Quintela a316e3788d Add -Wold-style-* flags
This time, I add them in configure only if target compiler supports it

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05 09:32:44 -05:00
Juan Quintela b6e31c1239 slirp: It needs to use QEMU_CFLAGS not CFLAGS
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05 09:32:44 -05:00
Stefan Weil ee682d27a5 Check availability of uuid header / library
If available, the Universally Unique Identifier library
is used by the vdi block driver.

Other parts of QEMU (vl.c) could also use it.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-04 13:24:45 +02:00
Blue Swirl fa58948d1f Use GNU ld to link roms on OpenSolaris
OpenSolaris ld seems to miss the equivalent of GNU ld's "-Ttext 0".

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-02 19:38:25 +00:00
Blue Swirl add16157d7 Compile some user files only once for all targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-27 16:26:02 +00:00
Blue Swirl b461cdc9b3 Don't compile roms if not building system targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-27 14:35:44 +00:00
Blue Swirl 5f6b9e8fd5 Probe for fdatasync()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 06:56:26 +00:00
Andre Przywara e5934d333f fix typo in configure --help
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-16 19:57:13 +02:00
Sebastian Herbszt 9332f6a2e2 configure: change "found" to "find"
Change "ERROR: configure was not able to found it" to
"ERROR: configure was not able to find it".

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13 19:42:03 +00:00
Blue Swirl 50108930b8 Revert "Fix Sparc/Linux host breakage by df70204db53e3611af986f434e74a882bce190ca"
This reverts commit 91b40c5be8.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13 19:38:48 +00:00
Blue Swirl 91b40c5be8 Fix Sparc/Linux host breakage by df70204db5
While i386, x86_64 and Sparc64/OpenBSD still worked after
df70204db5, Sparc32 and Sparc64 Linux hosts
broke.

Partially revert the commit: make the restored code conditional to
!CONFIG_USER_PIE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13 13:33:05 +00:00
Kirill A. Shutemov 34005a0060 Add configure option to compile user targets as PIE
Build uset targers as true PIE if user want to keep qemu
self-virtualizable.

v5:
  - Split into to patches: drop link hack and add PIE support
  - do not build PIE by default and drop toolchain check

v4:
  - Add test for toolchain if it has proper PIE support

v3:
  - One more pice of the hack was removed
  - Description updated

v2:
  - Add configure options do enable/disable PIE for usermode targets.
    Disabling can be useful if you build uswing toolchain which has
    broken PIE support. PIE for usermode targets enabled by default.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 13:17:45 +00:00
Kirill A. Shutemov df70204db5 Fix text relocations in linux-user targets
There is a link hack in linux-user which produces an executable that
looks like PIE, but always has text relocations since all object files
isn't position-independent (compiled without -fpic/-fpie). Dynamic loader
has to do more work to load a binary with text relocations.

The best way to keep this functionality is to build a true PIE without
text relocations.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 13:15:26 +00:00
Kirill A. Shutemov 5791f45b58 Do not link usermode targets with libhw*.a
Usermode targets are hardware-independed.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 13:14:59 +00:00
Blue Swirl d741429a9b Add #defines needed by OpenSolaris, fix breakage by the #defines
We need to define _XOPEN_SOURCE and __EXTENSIONS__ macros in order to get
CMSG_ and TIOCWIN macros defined. But then _POSIX_C_SOURCE gets defined, which
is (incorrectly) used as an indicator for existence of posix_memalign() in osdep.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 12:36:04 +00:00
Blue Swirl 31ff504d2a Fix OpenSolaris build breaking typos
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 12:33:07 +00:00
Blue Swirl de5071c551 Fix a Sparse warning about redefinition of offsetof()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 09:58:46 +00:00
Luiz Capitulino 3cfcae3cda configure: fix Linux AIO detection
We should set $linux_aio to 'no' if detection failed, otherwise
its contents will be empty, which is a bug as we test for 'yes'
or 'no'.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 17:31:27 -05:00
Juan Quintela 3aefa74455 fix VNC SASL detection
This test was missing the change to != no.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 17:31:26 -05:00
Stefan Weil c32d766af1 qemu-io: Improve portability (win32 now supported).
* Add missing include for struct timeval.
* Replace non-portable strsep by local qemu_strsep.
* Use POSIX basename by including libgen.h.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 14:57:20 -05:00
Anthony Liguori c34ebfdc87 Bring pcbios, seabios, and vgabios into the tree as git submodules. Right now,
they aren't integrated into the build but we can do that incrementally.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 10:13:29 -05:00
Luiz Capitulino 7b8c51add7 Introduce QDict unit-tests
This suite contains tests to assure that QDict API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qdict

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:34 -05:00
Luiz Capitulino 5de65a07ee Introduce QString unit-tests
This suite contains tests to assure that QString API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qstring

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:34 -05:00
Luiz Capitulino 33837ba6c5 Introduce QInt unit-tests
This suite contains tests to assure that QInt API works as expected.

To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:

$ ./check-qint

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:33 -05:00