mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Add a check, like the existing check for non-ANSI C in the public headers, that runs the public headers through a C++ compiler to flag non-C++-friendly constructs. Unlike the ANSI C check, we accept GCC-isms (gnu++98), and we also check various tools-only headers. Also tidy up the runes for these checks to be a bit more readable. io/ring.h uses 'private' as a field name, which is a keyword in C++; this patch doesn't change that. Instead the check works around it. Reported-by: Razvan Cojocaru <rcojocaru@bitdefender.com> Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <JBeulich@suse.com> Tested-by: Don Slutz <dslutz@verizon.com>
43 lines
1.0 KiB
Makefile
43 lines
1.0 KiB
Makefile
AS = $(CROSS_COMPILE)gas
|
|
LD = $(CROSS_COMPILE)gld
|
|
CC = $(CROSS_COMPILE)gcc
|
|
CPP = $(CROSS_COMPILE)gcc -E
|
|
CXX = $(CROSS_COMPILE)g++
|
|
AR = $(CROSS_COMPILE)gar
|
|
RANLIB = $(CROSS_COMPILE)granlib
|
|
NM = $(CROSS_COMPILE)gnm
|
|
STRIP = $(CROSS_COMPILE)gstrip
|
|
OBJCOPY = $(CROSS_COMPILE)gobjcopy
|
|
OBJDUMP = $(CROSS_COMPILE)gobjdump
|
|
SIZEUTIL = $(CROSS_COMPILE)gsize
|
|
|
|
SHELL = bash
|
|
|
|
INSTALL = ginstall
|
|
INSTALL_DIR = $(INSTALL) -d -m0755 -p
|
|
INSTALL_DATA = $(INSTALL) -m0644 -p
|
|
INSTALL_PROG = $(INSTALL) -m0755 -p
|
|
|
|
BOOT_DIR ?= /boot
|
|
|
|
SunOS_LIBDIR = /usr/sfw/lib
|
|
SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64
|
|
|
|
SOCKET_LIBS = -lsocket
|
|
PTHREAD_LIBS = -lpthread
|
|
UTIL_LIBS =
|
|
DLOPEN_LIBS = -ldl
|
|
|
|
SONAME_LDFLAG = -h
|
|
SHLIB_LDFLAGS = -R $(SunOS_LIBDIR) -shared
|
|
|
|
ifneq ($(debug),y)
|
|
CFLAGS += -O2 -fno-omit-frame-pointer
|
|
else
|
|
# Less than -O1 produces bad code and large stack frames
|
|
CFLAGS += -O1 -fno-omit-frame-pointer
|
|
endif
|
|
|
|
CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__
|
|
|