Hi guys,
the patch in attachment does:
- remove --enable-static option as it is not required. This was a
leftover from gcc-2.x something time. corosync binary should always be
built dynamic.
- fix quorum_* target as it was missing the list of objects to be linked
in.. doh!
- fix object dependencies between TARGET, TARGET_OBJS and TARGET_SRC.
This also fixes the build/relink issues at install times that have been
noted before.
Usual disclaimer here.
Fabio
Index: services/Makefile.am
===================================================================
--- services/Makefile.am (revision 1846)
+++ services/Makefile.am (working copy)
@@ -35,6 +35,8 @@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LCRSO = service_evs.lcrso service_cfg.lcrso service_cpg.lcrso service_confdb.lcrso service_pload.lcrso quorum_votequorum.lcrso quorum_testquorum.lcrso
+LCRSO_OBJS = $(LCRSO:service_%.lcrso=%.o) $(LCRSO:quorum_%.lcrso=%.o)
+
if BUILD_DARWIN
quorum_%.lcrso: %.o
$(CC) $(CFLAGS) -bundle -bundle_loader ../exec/corosync $^ -o $@
@@ -42,7 +44,7 @@
service_%.lcrso: %.o
$(CC) $(CFLAGS) -bundle -bundle_loader ../exec/corosync $^ -o $@
else
-quorum_%.lcrso:
+quorum_%.lcrso: %.o
$(CC) $(CFLAGS) -shared -Wl,-soname,$@ $^ -o $@
service_%.lcrso: %.o
@@ -55,7 +57,7 @@
lint:
-splint $(LINT_FLAGS) $(CFLAGS) *.c
-all-local: $(LCRSO)
+all-local: $(LCRSO_OBJS) $(LCRSO)
@echo Built Service Engines
install-exec-local:
Index: exec/Makefile.am
===================================================================
--- exec/Makefile.am (revision 1846)
+++ exec/Makefile.am (working copy)
@@ -35,11 +35,12 @@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
DARWIN_OPTS = -dynamiclib -bind_at_load -current_version $(SONAME) -compatibility_version $(SONAME)
-LCRSO =
LCR_SRC = objdb.c vsf_ykd.c coroparse.c quorum.c vsf_quorum.c
TOTEM_SRC = coropoll.c totemip.c totemnet.c totemrrp.c totemsrp.c totemmrp.c totempg.c crypto.c wthread.c
LOGSYS_SRC = wthread.c logsys.c
+LCRSO = $(LCR_SRC:%.c=%.lcrso)
+
lib_LIBRARIES = libtotem_pg.a liblogsys.a
sbin_PROGRAMS = corosync
SHARED_LIBS =
@@ -55,15 +56,11 @@
TOTEM_OBJS = $(TOTEM_SRC:%.c=%.o)
LOGSYS_OBJS = $(LOGSYS_SRC:%.c=%.o)
+LCRSO_OBJS = $(LCR_SRC:%.c=%.o)
-if BUILD_DYNAMIC
SHARED_LIBS += $(lib_LIBRARIES:%.a=%.so.$(SONAME))
SHARED_LIBS_SO = $(SHARED_LIBS:%.so.$(SONAME)=%.so)
SHARED_LIBS_SO_TWO = $(SHARED_LIBS:%.so.$(SONAME)=%.so.$(SOMAJOR))
-LCRSO += $(LCR_SRC:%.c=%.lcrso)
-else
-corosync_SOURCES += $(LCR_SRC)
-endif
if BUILD_DARWIN
%.lcrso: %.o
@@ -94,7 +91,7 @@
lint:
-splint $(LINT_FLAGS) $(CFLAGS) *.c
-all-local: $(LCRSO) $(SHARED_LIBS)
+all-local: $(LCRSO_OBJS) $(LCRSO) $(SHARED_LIBS)
@echo Built corosync Executive
install-exec-local:
Index: configure.in
===================================================================
--- configure.in (revision 1846)
+++ configure.in (working copy)
@@ -174,10 +174,6 @@
[ --with-lcrso-dir=DIR Corosync lcrso files. ],
[ LCRSODIR="$withval" ])
-AC_ARG_ENABLE(static,
- [ --enable-static Dont produce dynamic libraries. ],
- [ default="no" ])
-
AC_ARG_ENABLE(coverage,
[ --enable-coverage Coverage analysis of the codebase. ],
[ default="no" ])
@@ -477,7 +473,6 @@
echo "Enabling Coverage"
CFLAGS="$CFLAGS -O0 -g -ftest-coverage -fprofile-arcs"
LDFLAGS="$LDFLAGS -g -ftest-coverage -fprofile-arcs"
- enable_static=yes
PKG_FEATURES="$PKG_FEATURES coverage"
fi
@@ -517,12 +512,7 @@
AC_SUBST(CFLAGS_COPY)
AM_CONDITIONAL(BUILD_DARWIN, test $ON_DARWIN = 1)
-AM_CONDITIONAL(BUILD_DYNAMIC, test "x${enable_static}" != xyes)
-if test "x${enable_static}" != xyes; then
- PKG_FEATURES="$PKG_FEATURES static"
-fi
-
LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse -badflag -D__gnuc_va_list=va_list -D__attribute\(x\)="
AC_SUBST(LINT_FLAGS)
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais