diff options
author | Peter Crosthwaite | 2013-04-18 06:47:31 +0200 |
---|---|---|
committer | Edgar E. Iglesias | 2013-04-18 13:50:53 +0200 |
commit | a540f158db41205c3f7bad8b214f9738dc00724d (patch) | |
tree | 24a3d81ffdb0f24ccd811212d963681364418d88 /configure | |
parent | dtc: add submodule (diff) | |
download | qemu-a540f158db41205c3f7bad8b214f9738dc00724d.tar.gz qemu-a540f158db41205c3f7bad8b214f9738dc00724d.tar.xz qemu-a540f158db41205c3f7bad8b214f9738dc00724d.zip |
configure/Make: Build libfdt from submodule DTC
Configure to use the DTC submodule to build libfdt when no system libfdt
is found. Prompt to install the DTC submodule if --enable-fdt is set but
no DTC can be found.
DTC has no out-of-tree build capability, so the configure will symlink
the Makefile and scripts directory in the out of tree build directory
and pass in all the needed DTC arguments to make out of tree build happen.
Ideally we fix the DTC make to support out of tree, but did it this way to
avoid commits to DTC.
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -2496,17 +2496,34 @@ if test "$fdt" != "no" ; then int main(void) { return 0; } EOF if compile_prog "" "$fdt_libs" ; then + # system DTC is good - use it fdt=yes - libs_softmmu="$libs_softmmu $fdt_libs" - else - if test "$fdt" = "yes" ; then - feature_not_found "fdt" + elif test -d ${source_path}/dtc/libfdt ; then + # have submodule DTC - use it + fdt=yes + dtc_internal="yes" + mkdir -p dtc + if [ "$source_path" != `pwd` ] ; then + symlink "$source_path/dtc/Makefile" "dtc/Makefile" + symlink "$source_path/dtc/scripts" "dtc/scripts" fi + fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt" + fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs" + elif test "$fdt" = "yes" ; then + # have neither and want - prompt for system/submodule install + error_exit "ERROR: DTC not present. Your options:" \ + " (1) Preferred: Install the DTC devel package" \ + " (2) Fetch the DTC submodule, using:" \ + " git submodule update --init dtc" + else + # don't have and don't want fdt_libs= fdt=no fi fi +libs_softmmu="$libs_softmmu $fdt_libs" + ########################################## # GLX probe, used by milkymist-tmu2 if test "$glx" != "no" ; then @@ -3452,7 +3469,7 @@ if test "$cpu" = "ppc64" -a "$targetos" != "Darwin" ; then fi # add pixman flags after all config tests are done -QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags" +QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags $fdt_cflags" libs_softmmu="$libs_softmmu $pixman_libs" echo "Install prefix $prefix" @@ -4515,6 +4532,10 @@ if [ "$pixman" = "internal" ]; then echo "config-host.h: subdir-pixman" >> $config_host_mak fi +if [ "$dtc_internal" = "yes" ]; then + echo "config-host.h: subdir-dtc" >> $config_host_mak +fi + # build tree in object directory in case the source is not in the current directory DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos" DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas" |