1. 10 5月, 2014 1 次提交
    • P
      build: simplify and fix fix-obj-vars · 2a8e6c7a
      Paolo Bonzini 提交于
      fix-obj-vars has the undesired side effect of breaking -cflags
      -objs and -libs variables in the toplevel Makefile.objs.  The
      variables in the toplevel Makefile.objs do not need any fix,
      so fix-obj-vars need not do anything.
      
      Since we are touching it, remove the now unnecessary $(if)
      in the callers.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2a8e6c7a
  2. 08 5月, 2014 2 次提交
  3. 17 3月, 2014 1 次提交
  4. 20 2月, 2014 4 次提交
    • F
      module: implement module loading · e26110cf
      Fam Zheng 提交于
      This patch adds loading, stamp checking and initialization of modules.
      
      The init function of dynamic module is no longer directly called as
      __attribute__((constructor)) in static linked version, it is called
      only after passed the checking of presense of stamp symbol:
      
          qemu_stamp_$RELEASEHASH
      
      where $RELEASEHASH is generated by hashing version strings and content
      of configure script.
      
      With this, modules built from a different tree/version/configure will
      not be loaded.
      
      The module loading code requires gmodule-2.0.
      
      Modules are searched under
       - CONFIG_MODDIR
       - executable folder (to allow running qemu-{img,io} in the build
         directory)
       - ../ of executable folder (to allow running system emulator in the
         build directory)
      
      Modules are linked under their subdir respectively, then copied to top
      level of build directory for above convinience, e.g.:
          $(BUILD_DIR)/block/curl.so -> $(BUILD_DIR)/block-curl.so
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e26110cf
    • F
      rules.mak: introduce DSO rules · 17969268
      Fam Zheng 提交于
      Add necessary rules and flags for shared object generation.
      The new rules introduced here are:
      
      1) %.o in $(common-obj-m) is compiled to %.o, then linked to %.so.
      
      2) %.mo in $(common-obj-m) is the placeholder for %.so for pattern
      matching in Makefile. It's linked to "-shared" with all its dependencies
      (multiple *.o) as input. Which means the list of depended objects must
      be specified in each sub-Makefile.objs:
      
          foo.mo-objs := bar.o baz.o qux.o
      
      in the same style with foo.o-cflags and foo.o-libs. The objects here
      will be prefixed with "$(obj)/" if it's a subdirectory Makefile.objs.
      
      3) For all files ending up in %.so, the following is added automatically:
      
          foo.o-cflags += -fPIC -DBUILD_DSO
      
      Also introduce --enable-modules in configure, the option will enable
      support of shared object build. Otherwise objects are static linked to
      executables.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      17969268
    • F
      rules.mak: allow per object cflags and libs · 5c0d52bc
      Fam Zheng 提交于
      Adds extract-libs in LINK to expand any "per object libs", the syntax to define
      such a libs options is like:
      
              foo.o-libs := $(CURL_LIBS)
      
      in block/Makefile.objs.
      
      Similarly,
      
              foo.o-cflags := $(FOO_CFLAGS)
      
      is also supported.
      
      "foo.o" must be listed in a nested var (e.g. common-obj-y) to make the
      option variables effective.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5c0d52bc
    • F
      rules.mak: fix $(obj) to a real relative path · ba1183da
      Fam Zheng 提交于
      Makefile.target includes rule.mak and unnested common-obj-y, then prefix
      them with '../', this will ignore object specific QEMU_CFLAGS in subdir
      Makefile.objs:
      
          $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS)
      
      Because $(obj) here is './block', instead of '../block'. This doesn't
      hurt compiling because we basically build all .o from top Makefile,
      before entering Makefile.target, but it will affact arriving per-object
      libs support.
      
      The starting point of $(obj) is passed in as argument of unnest-vars, as
      well as nested variables, so that different Makefiles can pass in a
      right value.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ba1183da
  5. 08 2月, 2014 2 次提交
  6. 17 10月, 2013 2 次提交
  7. 10 9月, 2013 1 次提交
  8. 04 5月, 2013 1 次提交
    • P
      win32: fix compilation again · fba90ac1
      Paolo Bonzini 提交于
      While commit c02817e5 fixed compilation
      without an installed libtool, moving the dependencies to rules.mak does
      not work because the version-*-y variables are not defined yet.  Building
      in a clean tree thus fails.
      
      Revert the commit and remove the dummy /bin/false assignment to LIBTOOL.
      This makes the build work, at the price of slightly worse errors when
      there are Makefile bugs.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1367425815-15083-1-git-send-email-pbonzini@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      fba90ac1
  9. 30 4月, 2013 1 次提交
    • D
      rules.mk: Fix build breakage · 7e7da8e3
      Dunrong Huang 提交于
      The following error occurs when building dtc module:
      
              CHK version_gen.h
               CC libfdt/fdt.o
      cc1: error: dtc: No such file or directory [-Werror]
      cc1: all warnings being treated as errors
      make[1]: *** [libfdt/fdt.o] Error 1
      make: *** [subdir-dtc] Error 2
      
      In rules.mak, "-I$(<D) -I$(@D)" was expanded to "-Idtc -I." when
      building submodule dct. Due to the using of "-Wmissing-include-dirs,
      a warning would be rarsed. To avoid it, add "-I$(<D) -I$(@D)" to
      QEMU_INCLUDES instead of QEMU_CFLAGS so that QEMU_CFLAGS does not
      contain the "-Idtc".
      
      Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NDunrong Huang <riegamaths@gmail.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1367247132-19622-1-git-send-email-riegamaths@gmail.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7e7da8e3
  10. 27 4月, 2013 2 次提交
  11. 24 4月, 2013 2 次提交
  12. 30 1月, 2013 2 次提交
  13. 13 1月, 2013 5 次提交
  14. 12 1月, 2013 1 次提交
  15. 19 12月, 2012 2 次提交
  16. 19 11月, 2012 1 次提交
  17. 17 8月, 2012 1 次提交
    • P
      Support using a different compiler for Objective-C files · 3c4a4d0d
      Peter Maydell 提交于
      MacOSX 10.8 ("Mountain Lion") requires us to compile our one
      Objective-C source file with clang even if the rest of QEMU
      requires a real gcc, because the system headers we use make
      use of Apple's "Blocks" extension to C/ObjC, and mainline
      gcc doesn't support that. Since we only need to use a true
      gcc for the parts of QEMU that use the fixed-register
      env variable, we can simply use clang to build the ObjC
      file: it will link to the gcc-built objects with no problems.
      
      Add the necessary support for an OBJCC variable in the
      makefile and configure machinery; we default to clang
      if we have it, otherwise whatever CC is (since gcc
      might be the Apple gcc which does support Blocks).
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3c4a4d0d
  18. 28 7月, 2012 1 次提交
  19. 20 6月, 2012 1 次提交
  20. 07 6月, 2012 2 次提交
  21. 25 4月, 2012 1 次提交
  22. 30 3月, 2012 1 次提交
  23. 02 9月, 2011 1 次提交
  24. 22 8月, 2011 1 次提交
  25. 12 8月, 2011 1 次提交