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-changelog

[Xen-changelog] [xen-unstable] [SOLARIS] On Solaris, GCC is configured t

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [SOLARIS] On Solaris, GCC is configured to use Sun's LD. Fix the build to use
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Oct 2006 17:50:15 +0000
Delivery-date: Tue, 17 Oct 2006 10:51:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID a5ef8e491da7bff1598e428048d596bb2ea3fb68
# Parent  4154ba04725a824e1dcd81fc70185666e14918d3
[SOLARIS] On Solaris, GCC is configured to use Sun's LD. Fix the build to use
the correct flags, and link against libsocket where necessary.

Signed-off-by: John Levon <john.levon@xxxxxxx>
---
 config/Linux.mk                   |    4 ++++
 config/SunOS.mk                   |    4 ++++
 tools/blktap/lib/Makefile         |    4 ++--
 tools/console/Makefile            |    4 ++--
 tools/libxc/Makefile              |    4 ++--
 tools/vnet/libxutil/Makefile      |    2 +-
 tools/xenstat/libxenstat/Makefile |    8 ++++----
 tools/xenstat/xentop/Makefile     |    2 +-
 tools/xenstore/Makefile           |   10 +++++-----
 9 files changed, 25 insertions(+), 17 deletions(-)

diff -r 4154ba04725a -r a5ef8e491da7 config/Linux.mk
--- a/config/Linux.mk   Tue Oct 17 16:53:39 2006 +0100
+++ b/config/Linux.mk   Tue Oct 17 17:17:57 2006 +0100
@@ -20,6 +20,10 @@ INSTALL_PROG = $(INSTALL) -m0755
 
 LIB64DIR = lib64
 
+SOCKET_LIBS =
+SONAME_LDFLAG = -soname
+SHLIB_CFLAGS = -shared
+
 ifneq ($(debug),y)
 # Optimisation flags are overridable
 CFLAGS ?= -O2 -fomit-frame-pointer
diff -r 4154ba04725a -r a5ef8e491da7 config/SunOS.mk
--- a/config/SunOS.mk   Tue Oct 17 16:53:39 2006 +0100
+++ b/config/SunOS.mk   Tue Oct 17 17:17:57 2006 +0100
@@ -20,6 +20,10 @@ INSTALL_PROG = $(INSTALL) -m0755
 
 LIB64DIR = lib/amd64
 
+SOCKET_LIBS = -lsocket
+SONAME_LDFLAG = -h
+SHLIB_CFLAGS = -static-libgcc -shared
+
 ifneq ($(debug),y)
 # Optimisation flags are overridable
 CFLAGS ?= -O2 -fno-omit-frame-pointer
diff -r 4154ba04725a -r a5ef8e491da7 tools/blktap/lib/Makefile
--- a/tools/blktap/lib/Makefile Tue Oct 17 16:53:39 2006 +0100
+++ b/tools/blktap/lib/Makefile Tue Oct 17 17:17:57 2006 +0100
@@ -52,8 +52,8 @@ clean:
        rm -rf *.a *.so* *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS
 
 libblktap.a: $(OBJS) 
-       $(CC) $(CFLAGS) -Wl,-soname -Wl,$(SONAME) -shared         \
-             -L$(XEN_XENSTORE) -l xenstore                       \
+       $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,$(SONAME) $(SHLIB_CFLAGS) \
+             -L$(XEN_XENSTORE) -l xenstore                                \
              -o libblktap.so.$(MAJOR).$(MINOR) $^ $(LIBS)
        ln -sf libblktap.so.$(MAJOR).$(MINOR) libblktap.so.$(MAJOR)
        ln -sf libblktap.so.$(MAJOR) libblktap.so
diff -r 4154ba04725a -r a5ef8e491da7 tools/console/Makefile
--- a/tools/console/Makefile    Tue Oct 17 16:53:39 2006 +0100
+++ b/tools/console/Makefile    Tue Oct 17 17:17:57 2006 +0100
@@ -22,11 +22,11 @@ clean:
 
 xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
        $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-              -lxenctrl -lxenstore
+              $(SOCKET_LIBS) -lxenctrl -lxenstore
 
 xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
        $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-             -lxenctrl -lxenstore
+             $(SOCKET_LIBS) -lxenctrl -lxenstore
 
 .PHONY: install
 install: $(BIN)
diff -r 4154ba04725a -r a5ef8e491da7 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Tue Oct 17 16:53:39 2006 +0100
+++ b/tools/libxc/Makefile      Tue Oct 17 17:17:57 2006 +0100
@@ -117,7 +117,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(
        ln -sf $< $@
 
 libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenctrl.so.$(MAJOR) 
-shared -o $@ $^
+       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^
 
 # libxenguest
 
@@ -130,7 +130,7 @@ libxenguest.so.$(MAJOR): libxenguest.so.
        ln -sf $< $@
 
 libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenguest.so.$(MAJOR) 
-shared -o $@ $^ -lz -lxenctrl
+       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lz -lxenctrl
 
 -include $(DEPS)
 
diff -r 4154ba04725a -r a5ef8e491da7 tools/vnet/libxutil/Makefile
--- a/tools/vnet/libxutil/Makefile      Tue Oct 17 16:53:39 2006 +0100
+++ b/tools/vnet/libxutil/Makefile      Tue Oct 17 17:17:57 2006 +0100
@@ -55,7 +55,7 @@ libxutil.so.$(MAJOR): libxutil.so.$(MAJO
        ln -sf $^ $@
 
 libxutil.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
-       $(CC) $(CFLAGS) -Wl,-soname -Wl,libxutil.so.$(MAJOR) -shared -o $@ $^
+       $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxutil.so.$(MAJOR) 
$(SHLIB_CFLAGS) -o $@ $^
 
 libxutil.a: $(LIB_OBJS)
        $(AR) rc $@ $^
diff -r 4154ba04725a -r a5ef8e491da7 tools/xenstat/libxenstat/Makefile
--- a/tools/xenstat/libxenstat/Makefile Tue Oct 17 16:53:39 2006 +0100
+++ b/tools/xenstat/libxenstat/Makefile Tue Oct 17 17:17:57 2006 +0100
@@ -30,7 +30,7 @@ SHLIB=src/libxenstat.so.$(MAJOR).$(MINOR
 SHLIB=src/libxenstat.so.$(MAJOR).$(MINOR)
 SHLIB_LINKS=src/libxenstat.so.$(MAJOR) src/libxenstat.so
 OBJECTS=src/xenstat.o
-SONAME_FLAGS=-Wl,-soname -Wl,libxenstat.so.$(MAJOR)
+SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR)
 
 WARN_FLAGS=-Wall -Werror
 
@@ -45,7 +45,7 @@ all: $(LIB)
        $(RANLIB) $@
 
 $(SHLIB): $(OBJECTS)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(SONAME_FLAGS) -shared -o $@ $(OBJECTS) \
+       $(CC) $(CFLAGS) $(LDFLAGS) $(SONAME_FLAGS) $(SHLIB_CFLAGS) -o $@ 
$(OBJECTS) \
                -lxenstore -lxenctrl
 
 src/xenstat.o: src/xenstat.c src/xenstat.h
@@ -97,7 +97,7 @@ PYTHON_FLAGS=-I/usr/include/python$(PYTH
        swig -python $(SWIG_FLAGS) -outdir $(@D) -o $(PYSRC) $<
 
 $(PYLIB): $(PYSRC)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(PYTHON_FLAGS) -shared -lxenstat -o $@ $<
+       $(CC) $(CFLAGS) $(LDFLAGS) $(PYTHON_FLAGS) $(SHLIB_CFLAGS) -lxenstat -o 
$@ $<
 
 python-bindings: $(PYLIB) $(PYMOD)
 
@@ -118,7 +118,7 @@ PERL_FLAGS=`perl -MConfig -e 'print "$$C
        swig -perl $(SWIG_FLAGS) -outdir $(@D) -o $(PERLSRC) $<
 
 $(PERLLIB): $(PERLSRC)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) -shared -lxenstat -o $@ $<
+       $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) $(SHLIB_CFLAGS) -lxenstat -o 
$@ $<
 
 .PHONY: perl-bindings
 perl-bindings: $(PERLLIB) $(PERLMOD)
diff -r 4154ba04725a -r a5ef8e491da7 tools/xenstat/xentop/Makefile
--- a/tools/xenstat/xentop/Makefile     Tue Oct 17 16:53:39 2006 +0100
+++ b/tools/xenstat/xentop/Makefile     Tue Oct 17 17:17:57 2006 +0100
@@ -25,7 +25,7 @@ sbindir=$(prefix)/sbin
 
 CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
 LDFLAGS += -L$(XEN_LIBXENSTAT)
-LDLIBS += -lxenstat -lncurses
+LDLIBS += -lxenstat -lncurses $(SOCKET_LIBS)
 
 .PHONY: all
 all: xentop
diff -r 4154ba04725a -r a5ef8e491da7 tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   Tue Oct 17 16:53:39 2006 +0100
+++ b/tools/xenstore/Makefile   Tue Oct 17 17:17:57 2006 +0100
@@ -41,19 +41,19 @@ testcode: xs_test xenstored_test xs_rand
 testcode: xs_test xenstored_test xs_random
 
 xenstored: $(XENSTORED_OBJS)
-       $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl -o $@
+       $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl $(SOCKET_LIBS) -o $@
 
 $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
-       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
+       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
 
 $(CLIENTS_OBJS): xenstore_%.o: xenstore_client.c
        $(COMPILE.c) -DCLIENT_$(*F) -o $@ $<
 
 xenstore-control: xenstore_control.o libxenstore.so
-       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
+       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
 
 xenstore-ls: xsls.o libxenstore.so
-       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
+       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
 
 xenstored_test: xenstored_core_test.o xenstored_watch_test.o 
xenstored_domain_test.o xenstored_transaction_test.o xs_lib.o talloc_test.o 
fake_libxc.o utils.o tdb.o
        $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
@@ -90,7 +90,7 @@ libxenstore.so.$(MAJOR): libxenstore.so.
        ln -sf $< $@
 
 libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so.$(MAJOR) 
-shared -o $@ $^ -lpthread
+       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenstore.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread
 
 libxenstore.a: xs.o xs_lib.o
        $(AR) rcs libxenstore.a $^

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [SOLARIS] On Solaris, GCC is configured to use Sun's LD. Fix the build to use, Xen patchbot-unstable <=