initial import
This commit is contained in:
63
festival/speech_tools-shared-build.patch
Normal file
63
festival/speech_tools-shared-build.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
diff --git speech_tools.orig/config/compilers/gcc_defaults.mak speech_tools/config/compilers/gcc_defaults.mak
|
||||
index 193ce24..194266e 100644
|
||||
--- speech_tools.orig/config/compilers/gcc_defaults.mak
|
||||
+++ speech_tools/config/compilers/gcc_defaults.mak
|
||||
@@ -81,7 +81,7 @@ SHARED_CXXFLAGS = -fPIC
|
||||
SHARED_LINKFLAGS =
|
||||
|
||||
ifndef GCC_MAKE_SHARED_LIB
|
||||
- MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX
|
||||
+ MAKE_SHARED_LIB = $(CXX) -shared -o XXX -Wl,-soname,YYY
|
||||
else
|
||||
MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB)
|
||||
endif
|
||||
diff --git speech_tools.orig/config/rules/defaults.mak speech_tools/config/rules/defaults.mak
|
||||
index 27ec08a..336c88f 100644
|
||||
--- speech_tools.orig/config/rules/defaults.mak
|
||||
+++ speech_tools/config/rules/defaults.mak
|
||||
@@ -69,15 +69,21 @@ ifdef N
|
||||
MADE_FROM_ABOVE:=$(N)
|
||||
endif
|
||||
|
||||
+ifneq ($(SHARED),0)
|
||||
+ LIBTYPE=so
|
||||
+else
|
||||
+ LIBTYPE=a
|
||||
+endif
|
||||
+
|
||||
ifndef PROJECT_LIBDEPS
|
||||
- PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).a)
|
||||
+ PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
|
||||
endif
|
||||
ifndef PROJECT_LIBS
|
||||
PROJECT_LIBS = $(foreach l,$(PROJECT_LIBRARIES),-L$(PROJECT_LIBRARY_DIR_$(l)) -l$(l))
|
||||
endif
|
||||
|
||||
ifndef REQUIRED_LIBDEPS
|
||||
- REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).a)
|
||||
+ REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
|
||||
endif
|
||||
ifndef REQUIRED_LIBS
|
||||
REQUIRED_LIBS = $(foreach l,$(REQUIRED_LIBRARIES),-L$(REQUIRED_LIBRARY_DIR_$(l)) -l$(l))
|
||||
diff --git speech_tools.orig/config/rules/library.mak speech_tools/config/rules/library.mak
|
||||
index f93d019..b449f21 100644
|
||||
--- speech_tools.orig/config/rules/library.mak
|
||||
+++ speech_tools/config/rules/library.mak
|
||||
@@ -103,13 +103,13 @@ endif
|
||||
###########################################################################
|
||||
|
||||
lib%.so : lib%.a
|
||||
- @echo Make Shared Library $*
|
||||
+ @echo Make Shared Library $(*F)
|
||||
@if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi
|
||||
@(cd shared_space ; $(AR) x ../$< )
|
||||
- @echo Link Shared Library $*
|
||||
- $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs
|
||||
+ @echo Link Shared Library $(*F)
|
||||
+ $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$(*F)),$(subst YYY,$(@F).$(PROJECT_LIBRARY_VERSION_$(*F)),$(MAKE_SHARED_LIB))) shared_space/*.o $(PROJECT_LIBRARY_USES_$(*F):%=-L. -l%) $$libs
|
||||
@$(RM) -f shared_space/*.o $@
|
||||
- @ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@
|
||||
+ @ln -s $(@F).$(PROJECT_LIBRARY_VERSION_$(*F)) $@
|
||||
|
||||
###########################################################################
|
||||
## ##
|
||||
Reference in New Issue
Block a user