All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove CPPFLAGS_XEN
@ 2015-05-11 11:13 Olaf Hering
  2015-05-11 11:24 ` Vladimir 'phcoder' Serbinenko
  2015-05-11 11:28 ` Andrei Borzenkov
  0 siblings, 2 replies; 9+ messages in thread
From: Olaf Hering @ 2015-05-11 11:13 UTC (permalink / raw)
  To: grub-devel; +Cc: Olaf Hering

A grub for xen can be built with CPPFLAGS="-I/path" ./configure, which
has the benefit that CPPFLAGS gets automatically included in the
Makefiles.  There is no need for a private makefile variable, the xen
headers are equal to headers for other optional components.

For some commands the cppflags have to point to POSIX, otherwise
stdint.h will not be found. Previously it was loaded unconditionally
from /usr/include.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 conf/Makefile.common        |  3 ---
 grub-core/Makefile.core.def | 15 ++++++---------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/conf/Makefile.common b/conf/Makefile.common
index 96e58c9..1990005 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -18,9 +18,6 @@ if COND_arm64
   CFLAGS_PLATFORM += -mcmodel=large
 endif
 
-#FIXME: discover and check XEN headers
-CPPFLAGS_XEN = -I/usr/include
-
 # Other options
 
 CPPFLAGS_DEFAULT = -DGRUB_FILE=\"$(subst $(srcdir)/,,$<)\"
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index a6101de..10754e7 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -59,9 +59,6 @@ kernel = {
   ia64_efi_ldflags = '-Wl,-r,-d';
   ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
 
-  x86_64_xen_cppflags	   = '$(CPPFLAGS_XEN)';
-  i386_xen_cppflags	   = '$(CPPFLAGS_XEN)';
-
   arm_efi_ldflags          = '-Wl,-r,-d';
   arm_efi_stripflags       = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
 
@@ -604,7 +601,7 @@ module = {
 module = {
   name = lsxen;
   common = commands/xen/lsxen.c;
-  cppflags = '$(CPPFLAGS_XEN)';
+  cppflags = '$(CPPFLAGS_POSIX)';
 
   enable = xen;
 };
@@ -825,7 +822,7 @@ module = {
   i386_coreboot = lib/i386/halt.c;
   i386_qemu = lib/i386/halt.c;
   xen = lib/xen/halt.c;
-  xen_cppflags = '$(CPPFLAGS_XEN)';
+  xen_cppflags = '$(CPPFLAGS_POSIX)';
   efi = lib/efi/halt.c;
   ieee1275 = lib/ieee1275/halt.c;
   emu = lib/emu/halt.c;
@@ -846,7 +843,7 @@ module = {
   mips_loongson = lib/mips/loongson/reboot.c;
   mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
   xen = lib/xen/reboot.c;
-  xen_cppflags = '$(CPPFLAGS_XEN)';
+  xen_cppflags = '$(CPPFLAGS_POSIX)';
   uboot = lib/uboot/reboot.c;
   common = commands/reboot.c;
 };
@@ -1527,7 +1524,7 @@ module = {
   i386_xen = lib/i386/xen/relocator.S;
   x86_64_xen = lib/x86_64/xen/relocator.S;
   xen = lib/i386/relocator_common_c.c;
-  xen_cppflags = '$(CPPFLAGS_XEN)';
+  xen_cppflags = '$(CPPFLAGS_POSIX)';
 
   extra_dist = lib/i386/relocator_common.S;
   extra_dist = kern/powerpc/cache_flush.S;
@@ -1548,7 +1545,7 @@ module = {
   sparc64_ieee1275 = lib/ieee1275/cmos.c;
   powerpc_ieee1275 = lib/ieee1275/cmos.c;
   xen = lib/xen/datetime.c;
-  xen_cppflags = '$(CPPFLAGS_XEN)';
+  xen_cppflags = '$(CPPFLAGS_POSIX)';
 
   mips_arc = lib/arc/datetime.c;
   enable = noemu;
@@ -1651,7 +1648,7 @@ module = {
   name = linux;
   x86 = loader/i386/linux.c;
   xen = loader/i386/xen.c;
-  xen_cppflags	   = '$(CPPFLAGS_XEN)';
+  xen_cppflags = '$(CPPFLAGS_POSIX)';
   i386_pc = lib/i386/pc/vesa_modes_table.c;
   mips = loader/mips/linux.c;
   powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-05-13 17:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 11:13 [PATCH] Remove CPPFLAGS_XEN Olaf Hering
2015-05-11 11:24 ` Vladimir 'phcoder' Serbinenko
2015-05-11 11:30   ` Olaf Hering
2015-05-11 11:33     ` Vladimir 'phcoder' Serbinenko
2015-05-11 11:36       ` Olaf Hering
2015-05-13 10:31         ` Olaf Hering
2015-05-13 15:30           ` Olaf Hering
2015-05-13 17:27             ` Andrei Borzenkov
2015-05-11 11:28 ` Andrei Borzenkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.