]> code.ossystems Code Review - openembedded-core.git/commitdiff
alsa-tools: Fix compiling with clang
authorKhem Raj <raj.khem@gmail.com>
Mon, 7 Sep 2015 08:25:19 +0000 (08:25 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Sep 2015 21:47:16 +0000 (22:47 +0100)
Fixed a linking error occurring when building with clang, where a
function reference is emitted but function is not since its marked as
inline, making it static inline gives better opportunity to compiler to
compile it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch [new file with mode: 0644]
meta/recipes-multimedia/alsa/alsa-tools_1.0.29.bb

diff --git a/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch b/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
new file mode 100644 (file)
index 0000000..d049a30
--- /dev/null
@@ -0,0 +1,31 @@
+From 1e5926df74a35fe2cd90bc59f5264a8715c94048 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Sep 2015 08:16:59 +0000
+Subject: [PATCH] as10k1: Make output_tram_line() static inline
+
+The function is not used in any other file, its better to make it static
+inline so compiler has a better chance of optimizing here
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ as10k1/as10k1.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/as10k1/as10k1.c b/as10k1/as10k1.c
+index 96af0c3..d0766fd 100644
+--- a/as10k1/as10k1.c
++++ b/as10k1/as10k1.c
+@@ -366,7 +366,7 @@ void as_exit(const char *message)
+       exit(1);
+ }
+-inline void output_tram_line( struct list_head *line_head, int type){
++static inline void output_tram_line( struct list_head *line_head, int type){
+         
+         struct tram *tram_sym;
+         struct list_head *entry;
+-- 
+2.5.1
+
index b5b9cc49c83ab68702fde2399e3842b19ce8783a..fdf396e3f30983651c9f8f7d757dc4146d080c19 100644 (file)
@@ -13,6 +13,7 @@ SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
            ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
                                 'file://makefile_no_gtk.patch', d)} \
            file://gitcompile_hdajacksensetest \
+           file://0001-as10k1-Make-output_tram_line-static-inline.patch \
           "
 
 SRC_URI[md5sum] = "f339a3cd24f748c9d007bdff0e98775b"