ladspa-sdk: fix build fail in rocko
In the current recipe, the following error may occur.
ladspa-sdk/1.13-r0/temp/run.do_compile.7692: 105: export: --hash-style: bad variable name
This error seems to be due to this description of the recipe.
export LDLDFLAGS=echo ${LDFLAGS} | sed s:-Wl,::g
This patch changed to use CC instead of LD to fix this problem.
Signed-off-by: wata2ki <wata2ki@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From f3cbe95449fd6346933179f13d9ce23216a148fc Mon Sep 17 00:00:00 2001
|
||||
From 43251e9b177f5256825deaffe136230ca3c0378a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Sun, 18 Sep 2016 22:14:59 +0200
|
||||
Subject: [PATCH] do not pin build flags - use defaults
|
||||
Subject: [PATCH 1/2] do not pin build flags - use defaults
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -9,12 +9,13 @@ Content-Transfer-Encoding: 8bit
|
||||
Upstream-Status: Inappropriate [cross-specific]
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
Signed-off-by: wata2ki <wata2ki@gmail.com>
|
||||
---
|
||||
src/makefile | 14 +++++---------
|
||||
1 file changed, 5 insertions(+), 9 deletions(-)
|
||||
src/makefile | 16 +++++-----------
|
||||
1 file changed, 5 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/makefile b/src/makefile
|
||||
index 886237f..ace5266 100644
|
||||
index 886237f..1764da7 100644
|
||||
--- a/src/makefile
|
||||
+++ b/src/makefile
|
||||
@@ -15,8 +15,6 @@ INSTALL_BINARY_DIR = /usr/bin/
|
||||
@@ -35,41 +36,42 @@ index 886237f..ace5266 100644
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -35,11 +31,11 @@ CPP = c++
|
||||
@@ -34,12 +30,10 @@ CPP = c++
|
||||
#
|
||||
|
||||
../plugins/%.so: plugins/%.c ladspa.h
|
||||
$(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
|
||||
- $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
|
||||
- $(LD) -o ../plugins/$*.so plugins/$*.o -shared
|
||||
+ $(LD) -o ../plugins/$*.so plugins/$*.o -shared $(LDLDFLAGS)
|
||||
+ $(CC) $(CFLAGS) -o ../plugins/$*.so plugins/$*.c -shared $(LDFLAGS)
|
||||
|
||||
../plugins/%.so: plugins/%.cpp ladspa.h
|
||||
$(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
|
||||
- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
|
||||
- $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
|
||||
+ $(CPP) -o ../plugins/$*.so plugins/$*.o -shared $(LDFLAGS)
|
||||
+ $(CXX) $(CFLAGS) -o ../plugins/$*.so plugins/$*.cpp -shared $(LDFLAGS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -90,17 +86,17 @@ targets: $(PLUGINS) $(PROGRAMS)
|
||||
@@ -90,17 +84,17 @@ targets: $(PLUGINS) $(PROGRAMS)
|
||||
#
|
||||
|
||||
../bin/applyplugin: applyplugin.o load.o default.o
|
||||
- $(CC) $(CFLAGS) $(LIBRARIES) \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -ldl \
|
||||
+ $(CC) $(CFLAGS) -ldl $(LDFLAGS) \
|
||||
-o ../bin/applyplugin \
|
||||
applyplugin.o load.o default.o
|
||||
|
||||
../bin/analyseplugin: analyseplugin.o load.o default.o
|
||||
- $(CC) $(CFLAGS) $(LIBRARIES) \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -ldl -lm \
|
||||
+ $(CC) $(CFLAGS) -ldl -lm $(LDFLAGS) \
|
||||
-o ../bin/analyseplugin \
|
||||
analyseplugin.o load.o default.o
|
||||
|
||||
../bin/listplugins: listplugins.o search.o
|
||||
- $(CC) $(CFLAGS) $(LIBRARIES) \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -ldl \
|
||||
+ $(CC) $(CFLAGS) -ldl $(LDFLAGS) \
|
||||
-o ../bin/listplugins \
|
||||
listplugins.o search.o
|
||||
|
||||
--
|
||||
2.5.5
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
From 2fdcfa6361ac0d897552c39e362424da9f0e2423 Mon Sep 17 00:00:00 2001
|
||||
From: wata2ki <wata2ki@gmail.com>
|
||||
Date: Sat, 12 May 2018 20:49:12 +0900
|
||||
Subject: [PATCH 2/2] Fix _init and _fini multiple definition
|
||||
|
||||
When linking using CC, the following error occurs.
|
||||
|
||||
/tmp/ccpy2KWL.o: In function `_init':
|
||||
ladspa_sdk/src/plugins/noise.c:146: multiple definition of `_init'
|
||||
sysdeps/arm/crti.S:83: first defined here
|
||||
/tmp/ccpy2KWL.o: In function `_fini':
|
||||
ladspa_sdk/src/plugins/noise.c:223: multiple definition of `_fini'
|
||||
sysdeps/arm/crti.S:95: first defined here
|
||||
collect2: error: ld returned 1 exit status
|
||||
makefile:33: recipe for target '../plugins/noise.so' failed
|
||||
make: *** [../plugins/noise.so] Error 1
|
||||
|
||||
Because these plugins are using deprecated _init and _fini instead of __attribute__ ((constructor)) and __attribute__ ((destructor)).
|
||||
This patch is modified to use __attribute__ ((constructor)) and __attribute__ ((destructor)).
|
||||
|
||||
Signed-off-by: wata2ki <wata2ki@gmail.com>
|
||||
---
|
||||
src/plugins/amp.c | 8 ++++----
|
||||
src/plugins/delay.c | 8 ++++----
|
||||
src/plugins/filter.c | 8 ++++----
|
||||
src/plugins/noise.c | 8 ++++----
|
||||
4 files changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/amp.c b/src/plugins/amp.c
|
||||
index b6d2345..f80b3e3 100644
|
||||
--- a/src/plugins/amp.c
|
||||
+++ b/src/plugins/amp.c
|
||||
@@ -152,8 +152,8 @@ LADSPA_Descriptor * g_psStereoDescriptor = NULL;
|
||||
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
-void
|
||||
-_init() {
|
||||
+void __attribute__ ((constructor))
|
||||
+local_init() {
|
||||
|
||||
char ** pcPortNames;
|
||||
LADSPA_PortDescriptor * piPortDescriptors;
|
||||
@@ -335,8 +335,8 @@ deleteDescriptor(LADSPA_Descriptor * psDescriptor) {
|
||||
/*****************************************************************************/
|
||||
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
-void
|
||||
-_fini() {
|
||||
+void __attribute__ ((destructor))
|
||||
+local_fini() {
|
||||
deleteDescriptor(g_psMonoDescriptor);
|
||||
deleteDescriptor(g_psStereoDescriptor);
|
||||
}
|
||||
diff --git a/src/plugins/delay.c b/src/plugins/delay.c
|
||||
index 8b03979..7b15966 100644
|
||||
--- a/src/plugins/delay.c
|
||||
+++ b/src/plugins/delay.c
|
||||
@@ -228,8 +228,8 @@ LADSPA_Descriptor * g_psDescriptor = NULL;
|
||||
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
-void
|
||||
-_init() {
|
||||
+void __attribute__ ((constructor))
|
||||
+local_init() {
|
||||
|
||||
char ** pcPortNames;
|
||||
LADSPA_PortDescriptor * piPortDescriptors;
|
||||
@@ -322,8 +322,8 @@ _init() {
|
||||
/*****************************************************************************/
|
||||
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
-void
|
||||
-_fini() {
|
||||
+void __attribute__ ((destructor))
|
||||
+local_fini() {
|
||||
long lIndex;
|
||||
if (g_psDescriptor) {
|
||||
free((char *)g_psDescriptor->Label);
|
||||
diff --git a/src/plugins/filter.c b/src/plugins/filter.c
|
||||
index 3f50457..aa53a4f 100644
|
||||
--- a/src/plugins/filter.c
|
||||
+++ b/src/plugins/filter.c
|
||||
@@ -252,8 +252,8 @@ LADSPA_Descriptor * g_psHPFDescriptor = NULL;
|
||||
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
-void
|
||||
-_init() {
|
||||
+void __attribute__ ((constructor))
|
||||
+local_init() {
|
||||
|
||||
char ** pcPortNames;
|
||||
LADSPA_PortDescriptor * piPortDescriptors;
|
||||
@@ -431,8 +431,8 @@ deleteDescriptor(LADSPA_Descriptor * psDescriptor) {
|
||||
/*****************************************************************************/
|
||||
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
-void
|
||||
-_fini() {
|
||||
+void __attribute__ ((destructor))
|
||||
+local_fini() {
|
||||
deleteDescriptor(g_psLPFDescriptor);
|
||||
deleteDescriptor(g_psHPFDescriptor);
|
||||
}
|
||||
diff --git a/src/plugins/noise.c b/src/plugins/noise.c
|
||||
index 0fdd938..f602055 100644
|
||||
--- a/src/plugins/noise.c
|
||||
+++ b/src/plugins/noise.c
|
||||
@@ -142,8 +142,8 @@ LADSPA_Descriptor * g_psDescriptor;
|
||||
|
||||
/* _init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
-void
|
||||
-_init() {
|
||||
+void __attribute__ ((constructor))
|
||||
+local_init() {
|
||||
|
||||
char ** pcPortNames;
|
||||
LADSPA_PortDescriptor * piPortDescriptors;
|
||||
@@ -219,8 +219,8 @@ _init() {
|
||||
/*****************************************************************************/
|
||||
|
||||
/* _fini() is called automatically when the library is unloaded. */
|
||||
-void
|
||||
-_fini() {
|
||||
+void __attribute__ ((destructor))
|
||||
+local_fini() {
|
||||
long lIndex;
|
||||
if (g_psDescriptor) {
|
||||
free((char *)g_psDescriptor->Label);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
7
recipes-misc/recipes-multimedia/ladspa/ladspa-sdk_1.13.bb
Normal file → Executable file
7
recipes-misc/recipes-multimedia/ladspa/ladspa-sdk_1.13.bb
Normal file → Executable file
@@ -2,15 +2,14 @@ SUMMARY = "Linux Audio Developer's Simple Plug-in API, examples and tools"
|
||||
LICENSE = "LGPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=6fd75d9d2ba6776dcdc4d5257eeab3dd"
|
||||
|
||||
#inherit autotools pkgconfig perlnative
|
||||
|
||||
DEPENDS += " \
|
||||
fftw \
|
||||
"
|
||||
|
||||
SRC_URI = " \
|
||||
http://slackware.uk/slacky/slackware-13.0/multimedia/ladspa/${PV}/src/ladspa_sdk_${PV}.tgz \
|
||||
file://0001-do-not-pin-flags-for-native.patch \
|
||||
file://0001-do-not-pin-build-flags-use-defaults.patch \
|
||||
file://0002-Fix-_init-and-_fini-multiple-definition.patch \
|
||||
file://0002-Use-fallback-for-plugindir-in-case-env.-var-LADSPA_P.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "671be3e1021d0722cadc7fb27054628e"
|
||||
@@ -22,8 +21,6 @@ CFLAGS += "-I. -fPIC"
|
||||
CXXFLAGS += "-I. -fPIC"
|
||||
|
||||
do_compile() {
|
||||
# ld does not accept -Wl -> remove (see patch)
|
||||
export LDLDFLAGS=`echo ${LDFLAGS} | sed s:-Wl,::g`
|
||||
cd ${S}/src
|
||||
oe_runmake targets
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user