direct-io.hg

changeset 12476:729a6231de35

[TOOLS] Provide common LFS CFLAGS/LDFLAGS additions in Rules.mk.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Nov 17 09:54:48 2006 +0000 (2006-11-17)
parents b631e7885b5f
children 7f7aeaa0cba6
files tools/Rules.mk tools/blktap/drivers/Makefile tools/blktap/lib/Makefile tools/ioemu/Makefile.target tools/libfsimage/Rules.mk tools/libfsimage/common/Makefile tools/misc/lomount/lomount.c tools/xentrace/Makefile
line diff
     1.1 --- a/tools/Rules.mk	Fri Nov 17 09:18:28 2006 +0000
     1.2 +++ b/tools/Rules.mk	Fri Nov 17 09:54:48 2006 +0000
     1.3 @@ -14,6 +14,11 @@ X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
     1.4  
     1.5  CFLAGS += -D__XEN_TOOLS__
     1.6  
     1.7 +# Enable implicit LFS support *and* explicit LFS names.
     1.8 +CFLAGS  += $(shell getconf LFS_CFLAGS)
     1.9 +CFLAGS  += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
    1.10 +LDFLAGS += $(shell getconf LFS_LDFLAGS)
    1.11 +
    1.12  %.opic: %.c
    1.13  	$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
    1.14  
     2.1 --- a/tools/blktap/drivers/Makefile	Fri Nov 17 09:18:28 2006 +0000
     2.2 +++ b/tools/blktap/drivers/Makefile	Fri Nov 17 09:54:48 2006 +0000
     2.3 @@ -13,7 +13,6 @@ CFLAGS   += -Wno-unused
     2.4  CFLAGS   += -fno-strict-aliasing
     2.5  CFLAGS   += -I $(XEN_LIBXC) -I $(LIBAIO_DIR)
     2.6  CFLAGS   += $(INCLUDES) -I. -I../../xenstore 
     2.7 -CFLAGS   += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
     2.8  CFLAGS   += -D_GNU_SOURCE
     2.9  
    2.10  # Get gcc to generate the dependencies for us.
     3.1 --- a/tools/blktap/lib/Makefile	Fri Nov 17 09:18:28 2006 +0000
     3.2 +++ b/tools/blktap/lib/Makefile	Fri Nov 17 09:54:48 2006 +0000
     3.3 @@ -17,7 +17,6 @@ SRCS     += xenbus.c blkif.c xs_api.c
     3.4  CFLAGS   += -Werror
     3.5  CFLAGS   += -Wno-unused
     3.6  CFLAGS   += -fno-strict-aliasing -fPIC
     3.7 -CFLAGS   += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
     3.8  # get asprintf():
     3.9  CFLAGS   += -D _GNU_SOURCE
    3.10  
     4.1 --- a/tools/ioemu/Makefile.target	Fri Nov 17 09:18:28 2006 +0000
     4.2 +++ b/tools/ioemu/Makefile.target	Fri Nov 17 09:54:48 2006 +0000
     4.3 @@ -177,7 +177,8 @@ endif
     4.4  
     4.5  #########################################################
     4.6  
     4.7 -DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
     4.8 +DEFINES+=-D_GNU_SOURCE
     4.9 +#-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
    4.10  LIBS+=-lm
    4.11  LIBS+=-L../../libxc -lxenctrl -lxenguest
    4.12  LIBS+=-L../../xenstore -lxenstore
     5.1 --- a/tools/libfsimage/Rules.mk	Fri Nov 17 09:18:28 2006 +0000
     5.2 +++ b/tools/libfsimage/Rules.mk	Fri Nov 17 09:54:48 2006 +0000
     5.3 @@ -2,7 +2,7 @@ include $(XEN_ROOT)/tools/Rules.mk
     5.4  
     5.5  DEPS = .*.d
     5.6  
     5.7 -CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wp,-MD,.$(@F).d
     5.8 +CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror -Wp,-MD,.$(@F).d
     5.9  LDFLAGS += -L../common/
    5.10  
    5.11  PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
     6.1 --- a/tools/libfsimage/common/Makefile	Fri Nov 17 09:18:28 2006 +0000
     6.2 +++ b/tools/libfsimage/common/Makefile	Fri Nov 17 09:54:48 2006 +0000
     6.3 @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
     6.4  MAJOR = 1.0
     6.5  MINOR = 0
     6.6  
     6.7 -CFLAGS += -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wp,-MD,.$(@F).d
     6.8 +CFLAGS += -Werror -Wp,-MD,.$(@F).d
     6.9  DEPS = .*.d
    6.10  
    6.11  LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
     7.1 --- a/tools/misc/lomount/lomount.c	Fri Nov 17 09:18:28 2006 +0000
     7.2 +++ b/tools/misc/lomount/lomount.c	Fri Nov 17 09:54:48 2006 +0000
     7.3 @@ -44,8 +44,6 @@ enum
     7.4  	ERR_MOUNT		// Other failure of mount command
     7.5  };
     7.6  
     7.7 -#define _LARGEFILE_SOURCE
     7.8 -#define _FILE_OFFSET_BITS 64
     7.9  #include <unistd.h>
    7.10  #include <stdio.h>
    7.11  #include <stdlib.h>
     8.1 --- a/tools/xentrace/Makefile	Fri Nov 17 09:18:28 2006 +0000
     8.2 +++ b/tools/xentrace/Makefile	Fri Nov 17 09:54:48 2006 +0000
     8.3 @@ -1,7 +1,7 @@
     8.4  XEN_ROOT=../..
     8.5  include $(XEN_ROOT)/tools/Rules.mk
     8.6  
     8.7 -CFLAGS  += -Werror -D_LARGEFILE64_SOURCE
     8.8 +CFLAGS  += -Werror
     8.9  
    8.10  CFLAGS  += -I $(XEN_XC)
    8.11  CFLAGS  += -I $(XEN_LIBXC)