diff --git a/recipes-musicians/lsp-plugins/lsp-plugins.bb b/recipes-musicians/lsp-plugins/lsp-plugins.bb index f5c1500..f43ce02 100644 --- a/recipes-musicians/lsp-plugins/lsp-plugins.bb +++ b/recipes-musicians/lsp-plugins/lsp-plugins.bb @@ -16,20 +16,30 @@ DEPENDS += " \ lv2 \ " -SRC_URI += "file://0001-Makefile-align-for-oe-cross-build.patch" +SRC_URI += " \ + file://0001-Makefile-align-for-oe-cross-build.patch \ + file://0002-Pass-LDFLAGS-to-so-lib-builds.patch \ +" ARM_INSTRUCTION_SET = "arm" -def profile_handler(d): - profile = d.getVar('DEFAULTTUNE') - features = d.getVar('TUNE_FEATURES').split() - if 'armv7a' in features or 'armv7ve' in features: - profile = 'armv7a' - return profile +COMPATIBLE_MACHINE = "(^$)" +COMPATIBLE_MACHINE_armv7a = "(.*)" +COMPATIBLE_MACHINE_armv7ve = "(.*)" +COMPATIBLE_MACHINE_aarch64 = "(.*)" +COMPATIBLE_MACHINE_x86 = "(.*)" +COMPATIBLE_MACHINE_x86-64 = "(.*)" + +LSP_TARGET_ARCH = "" +LSP_TARGET_ARCH_armv7a = "armv7a" +LSP_TARGET_ARCH_armv7ve = "armv7a" +LSP_TARGET_ARCH_aarch64 = "aarch64" +LSP_TARGET_ARCH_x86 = "i586" +LSP_TARGET_ARCH_x86-64 = "x86_64" EXTRA_OEMAKE += " \ BUILD_PLATFORM=Linux \ - BUILD_PROFILE=${@profile_handler(d)} \ + BUILD_PROFILE=${LSP_TARGET_ARCH} \ PREFIX=${prefix} \ " diff --git a/recipes-musicians/lsp-plugins/lsp-plugins/0002-Pass-LDFLAGS-to-so-lib-builds.patch b/recipes-musicians/lsp-plugins/lsp-plugins/0002-Pass-LDFLAGS-to-so-lib-builds.patch new file mode 100644 index 0000000..372c5f7 --- /dev/null +++ b/recipes-musicians/lsp-plugins/lsp-plugins/0002-Pass-LDFLAGS-to-so-lib-builds.patch @@ -0,0 +1,29 @@ +From c1bbaf0ad86c5a3fcfbae6f7a5e089b619283f06 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Thu, 25 Apr 2019 23:36:34 +0200 +Subject: [PATCH] Pass LDFLAGS to so-lib builds +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Müller +--- + scripts/make/tools.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/make/tools.mk b/scripts/make/tools.mk +index 65953201..cdbed99a 100644 +--- a/scripts/make/tools.mk ++++ b/scripts/make/tools.mk +@@ -6,7 +6,7 @@ export LD ?= ld + export MAKE_OPTS = -s + export CFLAGS += $(CC_ARCH) -std=c++98 -fdata-sections -pthread -ffunction-sections -fno-exceptions -fno-asynchronous-unwind-tables -Wall -pipe -fno-rtti $(CC_FLAGS) -DLSP_MAIN_VERSION=\"$(VERSION)\" -DLSP_INSTALL_PREFIX=\"$(PREFIX)\" + export CXXFLAGS += $(CC_ARCH) -std=c++98 -fdata-sections -pthread -ffunction-sections -fno-exceptions -fno-asynchronous-unwind-tables -Wall -pipe -fno-rtti $(CC_FLAGS) -DLSP_MAIN_VERSION=\"$(VERSION)\" -DLSP_INSTALL_PREFIX=\"$(PREFIX)\" +-export SO_FLAGS = $(CC_ARCH) -Wl,-z,relro,-z,now -Wl,--gc-sections -shared -Llibrary -lc -fPIC ++export SO_FLAGS = $(CC_ARCH) -Wl,-z,relro,-z,now -Wl,--gc-sections -shared -Llibrary -lc -fPIC $(LDFLAGS) + export MERGE_FLAGS = $(LD_ARCH) -r + export EXE_TEST_FLAGS = $(LDFLAGS) $(CC_ARCH) + export EXE_FLAGS = $(LDFLAGS) $(CC_ARCH) -Wl,-z,relro,-z,now -Wl,--gc-sections +-- +2.20.1 +