I should have tested my suggestion. Unfortunately the standard stdarg.h on Solaris needs to include other files in /usr/include/. The current patch we have just uses gcc''s stdarg.h in xen/include/xen/stdarg.h. Keir, would you take such a change? regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 18/10/06 19:21, "John Levon" <levon@movementarian.org> wrote:> I should have tested my suggestion. Unfortunately the standard stdarg.h > on Solaris needs to include other files in /usr/include/. The current > patch we have just uses gcc''s stdarg.h in xen/include/xen/stdarg.h. > Keir, would you take such a change?#includes it, or includes it verbatim? The latter is a bit suspect, but I suppose okay if it''s obviously solaris-specific code. Is there no CFLAG magic that can make <stdarg.h> work for you? My suspicion is that gcc handles it a bit ''specially'' when it runs on Linux. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Oct 18, 2006 at 07:28:50PM +0100, Keir Fraser wrote:> > patch we have just uses gcc''s stdarg.h in xen/include/xen/stdarg.h. > > Keir, would you take such a change? > > #includes it, or includes it verbatim? The latter is a bit suspect, but IVerbatim. My patch just replaces xen/stdarg.h with gcc''s.> suppose okay if it''s obviously solaris-specific code. Is there no CFLAG > magic that can make <stdarg.h> work for you?Only by adding "-I /usr/include/", and that doesn''t seem ideal. regards, john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 18/10/06 19:40, "John Levon" <levon@movementarian.org> wrote:>> suppose okay if it''s obviously solaris-specific code. Is there no CFLAG >> magic that can make <stdarg.h> work for you? > > Only by adding "-I /usr/include/", and that doesn''t seem ideal.Perhaps acceptable if it works? We generally like to avoid it because it prevents us accidentally including system header files. If we need it just for Solaris it''s not so bad though -- our main build environment (Linux) will continue to provide a safety net. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Oct 19, 2006 at 02:41:49PM +0100, Keir Fraser wrote:> > Only by adding "-I /usr/include/", and that doesn''t seem ideal. > > Perhaps acceptable if it works? We generally like to avoid it because it > prevents us accidentally including system header files. If we need it just > for Solaris it''s not so bad though -- our main build environment (Linux) > will continue to provide a safety net.Fair point. regards john # HG changeset patch # User john.levon@sun.com # Date 1161272148 25200 # Node ID 73d8a4df0f0b0d5747f5937f5954a5302a9e2f74 # Parent 2e1a04af35cf4bc43dc6f0cde4539c5117fa500f Disable -nostdinc on Solaris so we can use the system''s <stdarg.h>. Signed-off-by: John Levon <john.levon@sun.com> diff --git a/config/StdGNU.mk b/config/StdGNU.mk --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -21,6 +21,8 @@ SONAME_LDFLAG = -soname SONAME_LDFLAG = -soname SHLIB_CFLAGS = -shared +STDINC_CFLAG = -nostdinc + ifneq ($(debug),y) # Optimisation flags are overridable CFLAGS ?= -O2 -fomit-frame-pointer diff --git a/config/SunOS.mk b/config/SunOS.mk --- a/config/SunOS.mk +++ b/config/SunOS.mk @@ -33,4 +33,7 @@ endif CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ +# We can''t use -nostdinc, as Xen needs <stdarg.h> +STDINC_CFLAG + CONFIG_IOEMU_OS = n diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -11,7 +11,7 @@ pae ?= n pae ?= n supervisor_mode_kernel ?= n -CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing +CFLAGS += $(STDINC_CFLAG) -fno-builtin -fno-common -fno-strict-aliasing CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe CFLAGS += -I$(BASEDIR)/include CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic diff --git a/xen/include/xen/stdarg.h b/xen/include/xen/stdarg.h --- a/xen/include/xen/stdarg.h +++ b/xen/include/xen/stdarg.h @@ -1,4 +1,4 @@ -#if defined(__OpenBSD__) || defined(__sun__) +#if defined(__OpenBSD__) # include "/usr/include/stdarg.h" #else # include <stdarg.h> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel