Skip to contentSkip to conversation

FreeBSD compile fix.

Qemu-devel Andrzej Zaborowski 1 participant 1 message Nov 18, 2006 Kbuild

lore
Share & tools
lore
#0 lore raw

I needed the following change to build under FreeBSD 6.0.

---
 Makefile        |    8 +-------
 Makefile.target |    3 ++-
 configure       |    7 +++++++
 3 files changed, 10 insertions(+), 8 deletions(-)
Makefile +1 -7
index f0a8199..568bd5b 100644
@@ -25,13 +25,7 @@ else
 DOCS=
 endif
 
-ifndef CONFIG_DARWIN
-ifndef CONFIG_WIN32
-ifndef CONFIG_SOLARIS
-LIBS+=-lrt
-endif
-endif
-endif
+LIBS+=$(AIOLIBS)
 
 all: $(TOOLS) $(DOCS) recurse-all
 
Makefile.target +2 -1
index 63dba83..9c4272a 100644
@@ -406,6 +406,7 @@ VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJ
 endif
 
 VL_LDFLAGS=
+VL_LIBS=$(AIOLIBS)
 # specific flags are needed for non soft mmu emulator
 ifdef CONFIG_STATIC
 VL_LDFLAGS+=-static
@@ -416,7 +417,7 @@ endif
 ifndef CONFIG_DARWIN
 ifndef CONFIG_WIN32
 ifndef CONFIG_SOLARIS
-VL_LIBS=-lutil -lrt
+VL_LIBS+=-lutil
 endif
 endif
 endif
configure +7 -0
index 84f8ee0..f0f9fdb 100755
@@ -150,6 +150,12 @@ if [ "$solaris" = "yes" ] ; then
     solarisrev=`uname -r | cut -f2 -d.`
 fi
 
+if [ "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
+    AIOLIBS=
+else
+    AIOLIBS="-lrt"
+fi
+
 # find source path
 source_path=`dirname "$0"`
 if [ -z "$source_path" ]; then
@@ -588,6 +594,7 @@ echo "STRIP=$strip -s -R .comment -R .no
 echo "CFLAGS=$CFLAGS" >> $config_mak
 echo "LDFLAGS=$LDFLAGS" >> $config_mak
 echo "EXESUF=$EXESUF" >> $config_mak
+echo "AIOLIBS=$AIOLIBS" >> $config_mak
 if test "$cpu" = "i386" ; then
   echo "ARCH=i386" >> $config_mak
   echo "#define HOST_I386 1" >> $config_h
Signature · 1 line
1.4.3.2