mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-07 03:29:37 +00:00
added static build option
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@229 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
ebc06f87ca
commit
43ce4dfe9e
4
Makefile
4
Makefile
|
@ -6,6 +6,10 @@ LIBS=
|
||||||
DEFINES=-DHAVE_BYTESWAP_H
|
DEFINES=-DHAVE_BYTESWAP_H
|
||||||
HELPER_CFLAGS=$(CFLAGS)
|
HELPER_CFLAGS=$(CFLAGS)
|
||||||
|
|
||||||
|
ifdef CONFIG_STATIC
|
||||||
|
LDFLAGS+=-static
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),i386)
|
ifeq ($(ARCH),i386)
|
||||||
CFLAGS+=-fomit-frame-pointer
|
CFLAGS+=-fomit-frame-pointer
|
||||||
OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
|
OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
|
||||||
|
|
25
configure
vendored
25
configure
vendored
|
@ -20,6 +20,7 @@ TMPH="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.h"
|
||||||
# default parameters
|
# default parameters
|
||||||
prefix="/usr/local"
|
prefix="/usr/local"
|
||||||
interp_prefix="/usr/gnemul/qemu-i386"
|
interp_prefix="/usr/gnemul/qemu-i386"
|
||||||
|
static="no"
|
||||||
cross_prefix=""
|
cross_prefix=""
|
||||||
cc="gcc"
|
cc="gcc"
|
||||||
host_cc="gcc"
|
host_cc="gcc"
|
||||||
|
@ -104,6 +105,8 @@ for opt do
|
||||||
;;
|
;;
|
||||||
--enable-gprof) gprof="yes"
|
--enable-gprof) gprof="yes"
|
||||||
;;
|
;;
|
||||||
|
--static) static="yes"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -176,19 +179,22 @@ echo " --source-path=PATH path of source code [$source_path]"
|
||||||
echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
|
echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
|
||||||
echo " --cc=CC use C compiler CC [$cc]"
|
echo " --cc=CC use C compiler CC [$cc]"
|
||||||
echo " --make=MAKE use specified make [$make]"
|
echo " --make=MAKE use specified make [$make]"
|
||||||
|
echo " --static enable static build [$static]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "NOTE: The object files are build at the place where configure is launched"
|
echo "NOTE: The object files are build at the place where configure is launched"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Install prefix $prefix"
|
echo "Install prefix $prefix"
|
||||||
echo "Source path $source_path"
|
echo "Source path $source_path"
|
||||||
echo "C compiler $cc"
|
echo "ELF interp prefix $interp_prefix"
|
||||||
echo "make $make"
|
echo "C compiler $cc"
|
||||||
echo "host CPU $cpu"
|
echo "make $make"
|
||||||
echo "Big Endian $bigendian"
|
echo "host CPU $cpu"
|
||||||
echo "target CPU $target_cpu"
|
echo "Big Endian $bigendian"
|
||||||
echo "gprof enabled $gprof"
|
echo "target CPU $target_cpu"
|
||||||
|
echo "gprof enabled $gprof"
|
||||||
|
echo "static build $static"
|
||||||
|
|
||||||
echo "Creating config.mak and config.h"
|
echo "Creating config.mak and config.h"
|
||||||
|
|
||||||
|
@ -244,6 +250,9 @@ if test "$gprof" = "yes" ; then
|
||||||
echo "TARGET_GPROF=yes" >> config.mak
|
echo "TARGET_GPROF=yes" >> config.mak
|
||||||
echo "#define HAVE_GPROF 1" >> $TMPH
|
echo "#define HAVE_GPROF 1" >> $TMPH
|
||||||
fi
|
fi
|
||||||
|
if test "$static" = "yes" ; then
|
||||||
|
echo "CONFIG_STATIC=yes" >> config.mak
|
||||||
|
fi
|
||||||
echo -n "VERSION=" >>config.mak
|
echo -n "VERSION=" >>config.mak
|
||||||
head $source_path/VERSION >>config.mak
|
head $source_path/VERSION >>config.mak
|
||||||
echo "" >>config.mak
|
echo "" >>config.mak
|
||||||
|
|
Loading…
Reference in a new issue