mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Some systems have python-config include -D_FORTIFY_SOURCE in the
CFLAGS. But -D_FORTIFY_SOURCE does not (currently) work with -O0, and
-O0 is enabled in debug builds (since 1166ecf781). As a result, on
those systems, debug builds fail.
Work around this problem as follows:
* In configure, detect -D_FORTIFY_SOURCE in $(python-config --cflags)
* If detected, set the new autoconf substitution and make variable
PY_NOOPT_CFLAGS to -O1.
* In tools/Rules.mk, where we add -O0, also add PY_NOOPT_CFLAGS
(which will override the -O0 with -O1 if required).
Overriding the -O0 is better than disabling Fortify because the
latter might have an adverse security impact. A user who wants to
disable optimisation completely even for Python and also disable
Fortify can set the environment variable
EXTRA_CFLAGS_XEN_TOOLS='-U_FORTIFY_SOURCE -O0'
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reported-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Euan Harris <euan.harris@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-by: Don Slutz <dslutz@verizon.com>
81 lines
2.4 KiB
Plaintext
81 lines
2.4 KiB
Plaintext
-include $(XEN_ROOT)/config/Paths.mk
|
|
|
|
CONFIG_RUMP := @CONFIG_RUMP@
|
|
ifeq ($(CONFIG_RUMP),y)
|
|
XEN_OS := NetBSDRump
|
|
endif
|
|
|
|
# A debug build of tools?
|
|
debug := @debug@
|
|
|
|
# Tools path
|
|
BISON := @BISON@
|
|
FLEX := @FLEX@
|
|
PYTHON := @PYTHON@
|
|
PYTHON_PATH := @PYTHONPATH@
|
|
PY_NOOPT_CFLAGS := @PY_NOOPT_CFLAGS@
|
|
PERL := @PERL@
|
|
CURL_CONFIG := @CURL@
|
|
XML2_CONFIG := @XML@
|
|
BASH := @BASH@
|
|
XGETTTEXT := @XGETTEXT@
|
|
AS86 := @AS86@
|
|
LD86 := @LD86@
|
|
BCC := @BCC@
|
|
IASL := @IASL@
|
|
FETCHER := @FETCHER@
|
|
SEABIOS_PATH := @seabios_path@
|
|
OVMF_PATH := @ovmf_path@
|
|
|
|
# Extra folder for libs/includes
|
|
PREPEND_INCLUDES := @PREPEND_INCLUDES@
|
|
PREPEND_LIB := @PREPEND_LIB@
|
|
APPEND_INCLUDES := @APPEND_INCLUDES@
|
|
APPEND_LIB := @APPEND_LIB@
|
|
|
|
PTHREAD_CFLAGS := @PTHREAD_CFLAGS@
|
|
PTHREAD_LDFLAGS := @PTHREAD_LDFLAGS@
|
|
PTHREAD_LIBS := @PTHREAD_LIBS@
|
|
|
|
PTYFUNCS_LIBS := @PTYFUNCS_LIBS@
|
|
|
|
LIBNL3_LIBS := @LIBNL3_LIBS@
|
|
LIBNL3_CFLAGS := @LIBNL3_CFLAGS@
|
|
XEN_TOOLS_RPATH := @rpath@
|
|
|
|
# Download GIT repositories via HTTP or GIT's own protocol?
|
|
# GIT's protocol is faster and more robust, when it works at all (firewalls
|
|
# may block it). We make it the default, but if your GIT repository downloads
|
|
# fail or hang, please specify GIT_HTTP=y in your environment.
|
|
GIT_HTTP := @githttp@
|
|
|
|
# Optional components
|
|
XENSTAT_XENTOP := @monitors@
|
|
OCAML_TOOLS := @ocamltools@
|
|
FLASK_POLICY := @xsmpolicy@
|
|
CONFIG_OVMF := @ovmf@
|
|
CONFIG_ROMBIOS := @rombios@
|
|
CONFIG_SEABIOS := @seabios@
|
|
CONFIG_QEMU_TRAD := @qemu_traditional@
|
|
CONFIG_QEMU_XEN := @qemu_xen@
|
|
CONFIG_BLKTAP2 := @blktap2@
|
|
CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@
|
|
CONFIG_REMUS_NETBUF := @remus_netbuf@
|
|
|
|
CONFIG_SYSTEMD := @systemd@
|
|
SYSTEMD_CFLAGS := @SYSTEMD_CFLAGS@
|
|
SYSTEMD_LIBS := @SYSTEMD_LIBS@
|
|
XEN_SYSTEMD_DIR := @SYSTEMD_DIR@
|
|
XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@
|
|
|
|
LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@
|
|
|
|
#System options
|
|
ZLIB := @zlib@
|
|
CONFIG_LIBICONV := @libiconv@
|
|
CONFIG_GCRYPT := @libgcrypt@
|
|
EXTFS_LIBS := @EXTFS_LIBS@
|
|
CURSES_LIBS := @CURSES_LIBS@
|
|
|
|
FILE_OFFSET_BITS := @FILE_OFFSET_BITS@
|