libs/guest: rework CFLAGS

Remove '-Werror -Wmissing-progress -I./include $(CFLAGS_xeninclude)',
those flags are already added via "libs.mk".

Flag "-I." isn't needed, we just need to fix the #include of
"xg_core.h" as this header isn't expected to be installed.

Make use of "-iquote" instead of '-I' for double-quote included
headers.

Also, regroup the CFLAGS into the same place in the makefile.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
Anthony PERARD authored and Julien Grall committed 2022-06-16 16:58:50 +01:00
1 parent 58be08a0e5
commit 74c01e32ad
2 files changed
+10 -12

No files matched your search

+9 -11
View File
@@ -28,18 +28,13 @@ OBJS-y += xg_core.o
OBJS-$(CONFIG_X86) += xg_core_x86.o
OBJS-$(CONFIG_ARM) += xg_core_arm.o
CFLAGS += -I$(XEN_libxenctrl)
vpath %.c ../../../xen/common/libelf
CFLAGS += -I../../../xen/common/libelf
LIBELF_OBJS += libelf-tools.o libelf-loader.o
LIBELF_OBJS += libelf-dominfo.o
OBJS-y += $(LIBELF_OBJS)
$(LIBELF_OBJS) $(LIBELF_OBJS:.o=.opic): CFLAGS += -Wno-pointer-sign
ifeq ($(CONFIG_X86),y) # Add libx86 to the build
vpath %.c ../../../xen/lib/x86
@@ -70,10 +65,12 @@ OBJS-y += xg_dom_decompress_unsafe_xz.o
OBJS-y += xg_dom_decompress_unsafe_zstd.o
endif
CFLAGS += -Werror -Wmissing-prototypes
CFLAGS += -I. -I./include $(CFLAGS_xeninclude)
CFLAGS += -D__XEN_TOOLS__
CFLAGS += -include $(XEN_ROOT)/tools/config.h
CFLAGS += -D__XEN_TOOLS__
CFLAGS += -include $(XEN_ROOT)/tools/config.h
CFLAGS += -iquote ../../../xen/common/libelf
# To be able to include xc_private.h
CFLAGS += -iquote $(XEN_libxenctrl)
# Needed for posix_fadvise64() in xc_linux.c
CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
@@ -92,8 +89,9 @@ ZLIB_CFLAGS :=
ZLIB_LIBS :=
endif
xg_dom_bzimageloader.o: CFLAGS += $(ZLIB_CFLAGS)
xg_dom_bzimageloader.opic: CFLAGS += $(ZLIB_CFLAGS)
xg_dom_bzimageloader.o xg_dom_bzimageloader.opic: CFLAGS += $(ZLIB_CFLAGS)
$(LIBELF_OBJS) $(LIBELF_OBJS:.o=.opic): CFLAGS += -Wno-pointer-sign
LIBHEADER := xenguest.h
+1 -1
View File
@@ -25,7 +25,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <xg_core.h>
#include "xg_core.h"
#include "xc_private.h"
#include "xg_private.h"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.