WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix libflask compile

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix libflask compile
From: john.levon@xxxxxxx
Date: Mon, 01 Oct 2007 16:08:30 -0700
Delivery-date: Mon, 01 Oct 2007 16:09:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1191280053 25200
# Node ID bb3c65b6b6ece12c7c76ae3d8f3ab103932019e5
# Parent  6372695d23e7080ddcd55a030dba77e63675dd4b
Fix libflask compile

Fix non-portabilities in libflask.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/tools/flask/libflask/Makefile b/tools/flask/libflask/Makefile
--- a/tools/flask/libflask/Makefile
+++ b/tools/flask/libflask/Makefile
@@ -60,6 +60,6 @@ libflask.so.$(MAJOR): libflask.so.$(MAJO
        ln -sf $< $@
 
 libflask.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libflask.so.$(MAJOR) -shared 
-o $@ $^
+       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libflask.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^
 
 -include $(DEPS)
diff --git a/tools/flask/libflask/include/flask_op.h 
b/tools/flask/libflask/include/flask_op.h
--- a/tools/flask/libflask/include/flask_op.h
+++ b/tools/flask/libflask/include/flask_op.h
@@ -39,7 +39,7 @@ typedef struct flask_op {
 } flask_op_t;
 
 int flask_load(int xc_handle, char *buf, int size);
-int flask_context_to_sid(int xc_handle, char *buf, int size, u_int32_t *sid);
+int flask_context_to_sid(int xc_handle, char *buf, int size, uint32_t *sid);
 int flask_sid_to_context(int xc_handle, int sid, char *buf, int size);
 int do_flask_op(int xc_handle, flask_op_t *op);
 
diff --git a/tools/flask/loadpolicy/Makefile b/tools/flask/loadpolicy/Makefile
--- a/tools/flask/loadpolicy/Makefile
+++ b/tools/flask/loadpolicy/Makefile
@@ -1,11 +1,6 @@ XEN_ROOT=../../..
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
 XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
-
-INSTALL         = install
-INSTALL_DATA    = $(INSTALL) -m0644
-INSTALL_PROG    = $(INSTALL) -m0755
-INSTALL_DIR     = $(INSTALL) -d -m0755
 
 LIBXC_ROOT = $(XEN_ROOT)/tools/libxc
 LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask
@@ -28,13 +23,17 @@ TESTENV  = XENSTORED_ROOTDIR=$(TESTDIR) 
 TESTENV  = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR)
 
 CLIENTS := flask-loadpolicy
+CLIENTS_SRCS := $(patsubst flask-%,%.c,$(CLIENTS))
 CLIENTS_OBJS := $(patsubst flask-%,%.o,$(CLIENTS))
 
 .PHONY: all
 all: $(CLIENTS)
 
 $(CLIENTS): flask-%: %.o
-       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@
+       $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask 
-lxenctrl -o $@
+
+$(CLIENTS_OBJS): $(CLIENTS_SRCS)
+       $(COMPILE.c) -o $@ $<
 
 .PHONY: clean
 clean: 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix libflask compile, john . levon <=