Re: [oe] [PATCH v3][meta-multimedia] mkvtoolnix: fix Boost 1.58 build, update to 7.9.0

2015-10-04 Thread Martin Jansa
Was gitsm:// fetcher improved to use premirror for submodules? The initial
version didn't and I don't remember seeing it fixed/improved.

On Sun, Oct 4, 2015 at 12:16 PM, Manuel Bachmann 
wrote:

> Hi Koen,
>
> Thanks for the hint, I didn't know you could do that ! There are very few
> examples, though, and I always get a "cannot stat .git/modules" when
> I try to use it. Still trying...
>
> Anyways, as the master git repo doesn't specify hashes in its .gitmodules
> (you always fetch the latest rev), I guess it's the same as ${AUTOREV}, but
> cleaner/shorter ? And then the "always refreshes and consumes bandwidth"
> problem Martin mentioned would still apply ; having SRCREVs is better and
> more stable in this case IMHO.
>
> Regards,
>
> *Manuel Bachmann, Graphics Engineer www.iot.bzh  *
>
>
> 2015-10-04 8:37 GMT+02:00 Koen Kooi :
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Op 03-10-15 om 23:22 schreef Manuel Bachmann:
> > > mkvtoolnix does not compile with newest Boost 1.58, mostly due to the
> > > following bugs : https://github.com/mbunkus/mkvtoolnix/issues/1172
> > > https://github.com/mbunkus/mkvtoolnix/issues/1176
> > >
> > > Update to the version immediately subsequent to their fixes, and adapt
> > > configure steps accordingly.
> > >
> > > Signed-off-by: Manuel Bachmann  ---
> > > meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb | 15
> > > +++ 1 file changed, 11 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb
> > > b/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb index
> > > dd613b3..da10153 100644 ---
> > > a/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb +++
> > > b/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb @@ -6,9
> +6,16
> > > @@ LIC_FILES_CHKSUM =
> > > "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> > >
> > > DEPENDS = "curl boost expat zlib libebml libmatroska libogg libvorbis
> > > bzip2 lzo file ruby-native"
> > >
> > > -PV = "7.1.0+git${SRCPV}" -SRCREV =
> > > "0c89ff941bfdd9f3378312f293a84f13cf3e2a96" -SRC_URI =
> > > "git://github.com/mbunkus/mkvtoolnix.git" +PV = "7.9.0+git${SRCPV}"
> > > +SRCREV_mkvtoolnix = "1a8b23b1e82ed180a5aaeb43537f2426be252985"
> > > +SRCREV_libebml = "04b34b0dbded40e0cec93cafa6a4f4c8e90c3206"
> > > +SRCREV_libmatroska = "db5d627b5bf48516c9e0b540254c0d36595760c3"
> > > +SRCREV_FORMAT = "mkvtoolnix" +SRC_URI = " \ +
> > > git://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix \ +
> > > git://
> > github.com/Matroska-Org/libebml.git;name=libebml;destsuffix=git/lib/li
> > bebml
> > > \ +
> > > git://
> > github.com/Matroska-Org/libmatroska.git;name=libmatroska;destsuffix=gi
> > t/lib/libmatroska
> > > \ +  "
> >
> > Wouldn't:
> >
> > SRCREV = "1a8b23b1e82ed180a5aaeb43537f2426be252985"
> > SRC_URI = "gitsm://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix"
> >
> > Be much easier to maintain?
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.5 (Darwin)
> > Comment: GPGTools - http://gpgtools.org
> >
> > iD8DBQFWEMkXMkyGM64RGpERAn7oAJsF+fflyuIAfXQ0VRUWDfucw7od7gCgquGN
> > MKNt3Fd8j7MicGjLPZsoyIA=
> > =ipI0
> > -END PGP SIGNATURE-
> >
> > --
> > ___
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> --
> ___
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [PATCH v3][meta-multimedia] mkvtoolnix: fix Boost 1.58 build, update to 7.9.0

2015-10-04 Thread Manuel Bachmann
Hi Koen,

Thanks for the hint, I didn't know you could do that ! There are very few
examples, though, and I always get a "cannot stat .git/modules" when
I try to use it. Still trying...

Anyways, as the master git repo doesn't specify hashes in its .gitmodules
(you always fetch the latest rev), I guess it's the same as ${AUTOREV}, but
cleaner/shorter ? And then the "always refreshes and consumes bandwidth"
problem Martin mentioned would still apply ; having SRCREVs is better and
more stable in this case IMHO.

Regards,

*Manuel Bachmann, Graphics Engineer www.iot.bzh  *


2015-10-04 8:37 GMT+02:00 Koen Kooi :

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Op 03-10-15 om 23:22 schreef Manuel Bachmann:
> > mkvtoolnix does not compile with newest Boost 1.58, mostly due to the
> > following bugs : https://github.com/mbunkus/mkvtoolnix/issues/1172
> > https://github.com/mbunkus/mkvtoolnix/issues/1176
> >
> > Update to the version immediately subsequent to their fixes, and adapt
> > configure steps accordingly.
> >
> > Signed-off-by: Manuel Bachmann  ---
> > meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb | 15
> > +++ 1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb
> > b/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb index
> > dd613b3..da10153 100644 ---
> > a/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb +++
> > b/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb @@ -6,9 +6,16
> > @@ LIC_FILES_CHKSUM =
> > "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> >
> > DEPENDS = "curl boost expat zlib libebml libmatroska libogg libvorbis
> > bzip2 lzo file ruby-native"
> >
> > -PV = "7.1.0+git${SRCPV}" -SRCREV =
> > "0c89ff941bfdd9f3378312f293a84f13cf3e2a96" -SRC_URI =
> > "git://github.com/mbunkus/mkvtoolnix.git" +PV = "7.9.0+git${SRCPV}"
> > +SRCREV_mkvtoolnix = "1a8b23b1e82ed180a5aaeb43537f2426be252985"
> > +SRCREV_libebml = "04b34b0dbded40e0cec93cafa6a4f4c8e90c3206"
> > +SRCREV_libmatroska = "db5d627b5bf48516c9e0b540254c0d36595760c3"
> > +SRCREV_FORMAT = "mkvtoolnix" +SRC_URI = " \ +
> > git://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix \ +
> > git://
> github.com/Matroska-Org/libebml.git;name=libebml;destsuffix=git/lib/li
> bebml
> > \ +
> > git://
> github.com/Matroska-Org/libmatroska.git;name=libmatroska;destsuffix=gi
> t/lib/libmatroska
> > \ +  "
>
> Wouldn't:
>
> SRCREV = "1a8b23b1e82ed180a5aaeb43537f2426be252985"
> SRC_URI = "gitsm://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix"
>
> Be much easier to maintain?
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.5 (Darwin)
> Comment: GPGTools - http://gpgtools.org
>
> iD8DBQFWEMkXMkyGM64RGpERAn7oAJsF+fflyuIAfXQ0VRUWDfucw7od7gCgquGN
> MKNt3Fd8j7MicGjLPZsoyIA=
> =ipI0
> -END PGP SIGNATURE-
>
> --
> ___
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [PATCH][meta-oe] freerdp: get out of "nonworking", fix build, improve

2015-10-04 Thread Manuel Bachmann
We make the "freerdp" recipe active again, fix the build
by pulling a more recent version (the "stable" branches are
buggy and useless), and fix ARM runtime with -fPIC.

We can then :
- make X11 non-mandatory ;
- add support for Wayland ("wlfreerdp" client) ;
- add support for DirectFB ("dfreerdp" client) ;
- add support for GStreamer 1.0 ;
- make "heavy" features such as pulseaudio, cups...
non-mandatory.

We really want to install the "winpr-makecert" tool to have
TLS, but CMake does not position its RPATH cleanly, so let
us have a custom patch for that until it gets sorted out.

Signed-off-by: Manuel Bachmann 
---
 meta-oe/recipes-support/freerdp/freerdp.inc| 73 ++
 .../winpr-makecert-Build-with-install-RPATH.patch  | 31 +
 meta-oe/recipes-support/freerdp/freerdp_git.bb | 21 +++
 .../recipes-support/nonworking/freerdp/freerdp.inc | 51 ---
 .../nonworking/freerdp/freerdp_git.bb  | 16 -
 5 files changed, 125 insertions(+), 67 deletions(-)
 create mode 100644 meta-oe/recipes-support/freerdp/freerdp.inc
 create mode 100644 
meta-oe/recipes-support/freerdp/freerdp/winpr-makecert-Build-with-install-RPATH.patch
 create mode 100644 meta-oe/recipes-support/freerdp/freerdp_git.bb
 delete mode 100644 meta-oe/recipes-support/nonworking/freerdp/freerdp.inc
 delete mode 100644 meta-oe/recipes-support/nonworking/freerdp/freerdp_git.bb

diff --git a/meta-oe/recipes-support/freerdp/freerdp.inc 
b/meta-oe/recipes-support/freerdp/freerdp.inc
new file mode 100644
index 000..af93e83
--- /dev/null
+++ b/meta-oe/recipes-support/freerdp/freerdp.inc
@@ -0,0 +1,73 @@
+# Copyright (C) 2010-2012 O.S. Systems Software Ltda. All Rights Reserved
+# Released under the MIT license
+
+DESCRIPTION = "FreeRDP RDP client & server library"
+HOMEPAGE = "http://www.freerdp.com;
+DEPENDS = "openssl alsa-lib pcsc-lite"
+SECTION = "net"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+inherit pkgconfig cmake
+
+EXTRA_OECMAKE += "-DWITH_ALSA=ON \
+  -DWITH_PCSC=ON \
+  -DWITH_FFMPEG=OFF \
+  -DWITH_CUNIT=OFF \
+ "
+
+PACKAGECONFIG ??= "  \
+${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
+${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 
'', d)}\
+${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 
'directfb', '', d)}\
+${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}\
+${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 
'pulseaudio', '', d)}\
+gstreamer cups \
+"
+
+X11_DEPS = "virtual/libx11 libxinerama libxext libxcursor libxv libxi 
libxrender libxfixes libxdamage libxrandr libxkbfile"
+PACKAGECONFIG[x11] = "-DWITH_X11=ON -DWITH_XINERAMA=ON -DWITH_XEXT=ON 
-DWITH_XCURSOR=ON -DWITH_XV=ON -DWITH_XI=ON -DWITH_XRENDER=ON -DWITH_XFIXES=ON 
-DWITH_XDAMAGE=ON -DWITH_XRANDR=ON -DWITH_XKBFILE=ON,-DWITH_X11=OFF,${X11_DEPS}"
+PACKAGECONFIG[wayland] = "-DWITH_WAYLAND=ON,-DWITH_WAYLAND=OFF,wayland"
+PACKAGECONFIG[directfb] = "-DWITH_DIRECTFB=ON,-DWITH_DIRECTFB=OFF,directfb"
+PACKAGECONFIG[pam] = "-DWITH_PAM=ON,-DWITH_PAM=OFF,libpam"
+PACKAGECONFIG[pulseaudio] = 
"-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio"
+PACKAGECONFIG[gstreamer] = 
"-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 
gstreamer1.0-plugins-base"
+PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups"
+
+PACKAGES =+ "libfreerdp"
+
+LEAD_SONAME = "libfreerdp.so"
+FILES_libfreerdp = "${libdir}/lib*${SOLIBS}"
+
+PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*"
+
+# we will need winpr-makecert to generate TLS certificates
+do_install_append () {
+install -m755 winpr/tools/makecert/cli/winpr-makecert ${D}${bindir}
+rm -rf ${D}/${libdir}/cmake
+rm -rf ${D}/${libdir}/freerdp
+}
+
+python populate_packages_prepend () {
+freerdp_root = d.expand('${libdir}/freerdp')
+
+do_split_packages(d, freerdp_root, '^(audin_.*)\.so$',
+output_pattern='libfreerdp-plugin-%s',
+description='FreeRDP plugin %s',
+prepend=True, extra_depends='libfreerdp-plugin-audin')
+
+do_split_packages(d, freerdp_root, '^(rdpsnd_.*)\.so$',
+output_pattern='libfreerdp-plugin-%s',
+description='FreeRDP plugin %s',
+prepend=True, extra_depends='libfreerdp-plugin-rdpsnd')
+
+do_split_packages(d, freerdp_root, '^(tsmf_.*)\.so$',
+output_pattern='libfreerdp-plugin-%s',
+description='FreeRDP plugin %s',
+prepend=True, extra_depends='libfreerdp-plugin-tsmf')
+
+do_split_packages(d, freerdp_root, '^([^-]*)\.so$',
+output_pattern='libfreerdp-plugin-%s',
+description='FreeRDP plugin %s',
+prepend=True, extra_depends='')
+}
diff --git 
a/meta-oe/recipes-support/freerdp/freerdp/winpr-makecert-Build-with-install-RPATH.patch
 

Re: [oe] [PATCH v3][meta-multimedia] mkvtoolnix: fix Boost 1.58 build, update to 7.9.0

2015-10-04 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Op 03-10-15 om 23:22 schreef Manuel Bachmann:
> mkvtoolnix does not compile with newest Boost 1.58, mostly due to the
> following bugs : https://github.com/mbunkus/mkvtoolnix/issues/1172 
> https://github.com/mbunkus/mkvtoolnix/issues/1176
> 
> Update to the version immediately subsequent to their fixes, and adapt
> configure steps accordingly.
> 
> Signed-off-by: Manuel Bachmann  --- 
> meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb | 15
> +++ 1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb
> b/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb index
> dd613b3..da10153 100644 ---
> a/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb +++
> b/meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb @@ -6,9 +6,16
> @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> 
> DEPENDS = "curl boost expat zlib libebml libmatroska libogg libvorbis
> bzip2 lzo file ruby-native"
> 
> -PV = "7.1.0+git${SRCPV}" -SRCREV =
> "0c89ff941bfdd9f3378312f293a84f13cf3e2a96" -SRC_URI =
> "git://github.com/mbunkus/mkvtoolnix.git" +PV = "7.9.0+git${SRCPV}" 
> +SRCREV_mkvtoolnix = "1a8b23b1e82ed180a5aaeb43537f2426be252985" 
> +SRCREV_libebml = "04b34b0dbded40e0cec93cafa6a4f4c8e90c3206" 
> +SRCREV_libmatroska = "db5d627b5bf48516c9e0b540254c0d36595760c3" 
> +SRCREV_FORMAT = "mkvtoolnix" +SRC_URI = " \ +
> git://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix \ +
> git://github.com/Matroska-Org/libebml.git;name=libebml;destsuffix=git/lib/li
bebml
> \ +
> git://github.com/Matroska-Org/libmatroska.git;name=libmatroska;destsuffix=gi
t/lib/libmatroska
> \ +  "

Wouldn't:

SRCREV = "1a8b23b1e82ed180a5aaeb43537f2426be252985"
SRC_URI = "gitsm://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix"

Be much easier to maintain?

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFWEMkXMkyGM64RGpERAn7oAJsF+fflyuIAfXQ0VRUWDfucw7od7gCgquGN
MKNt3Fd8j7MicGjLPZsoyIA=
=ipI0
-END PGP SIGNATURE-

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-initramfs][PATCH] kexecboot_0.6: fix build with gcc 5

2015-10-04 Thread Khem Raj
On Sun, Oct 4, 2015 at 3:49 PM, Andrea Adami  wrote:
> On Fri, Sep 25, 2015 at 6:38 AM, Khem Raj  wrote:
>
>> On Thu, Sep 24, 2015 at 2:11 PM, Andrea Adami 
>> wrote:
>> > On Thu, Sep 24, 2015 at 6:55 AM, Khem Raj  wrote:
>> >
>> >> On Wed, Sep 23, 2015 at 3:29 PM, Andrea Adami 
>> >> wrote:
>> >> > +-inline void
>> >> > ++extern inline void
>> >>
>> >> would it be better to make it static inline ?
>> >>
>> >
>> > Apparently not...
>>
>> well I meant to move the defintion of this function to header and not
>> just modify the declaration.
>>
>>
> Khem,
>
> what do you think if I simply modify the declaration from inline void to
> void? There is a single definition and it uses inline.
>
> Declaration in rgb.h
> + /* Convert RGBA uint32 to red/green/blue/alpha components */
> +-inline void
> ++void
> + rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
> +   kx_ccomp *blue, kx_ccomp *alpha);
>
> Definition in rgb.c is
> 
> #include "rgb.h"
> #include "rgbtab.h"
>
> inline void
> rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
> kx_ccomp *blue, kx_ccomp *alpha)
> {
> *alpha = (kx_ccomp) (rgba & 0x00FF);
> *blue =  (kx_ccomp)((rgba & 0xFF00) >> 8);
> *green = (kx_ccomp)((rgba & 0x00FF) >> 16);
> *red =   (kx_ccomp)((rgba & 0xFF00) >> 24);
> }
>
> It compiles and if I understand correctly the function will be callable
> from other files. Do you see any drawbacks? This would be a minimal change
> for upstream.
>
> About 'static inline' I think I get what you mean but please note the
> function is only used in one source file so I guess I could just define it
> 'static inline' there (or in a header if it would be used more than once ).
> Do you suggest to modify all the occurrences in the sources?
>

remove the declaration from header if its only used in one source
file. and make the one in source file as static inline
is the function definition in same file as its use ?

> Thanks in advance
> Andrea
>
>
>
>> >
>> > rgba2comp is used in rgb.c and fb.c.
>> > Making it static inline leads to the following error:
>> >
>> > | In file included from
>> >
>> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/fb.h:39:0,
>> > |  from
>> >
>> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/gui.h:25,
>> > |  from
>> >
>> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/kexecboot.c:43:
>> > |
>> >
>> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/rgb.h:55:1:
>> > warning: 'rgba2comp' declared 'static' but never defined
>> [-Wunused-function]
>> > |  rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
>> > |  ^
>> > | arm-oe-linux-gnueabi-gcc  -march=armv5e -marm  -mthumb-interwork
>> > --sysroot=/tmp/build/tmp-glibc/sysroots/poodle -Wall -O2 -pipe -g
>> > -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu
>> > -Wl,--as-needed -o kexecboot util.o cfgparser.o devicescan.o evdevs.o
>> fb.o
>> > gui.o menu.o xpm.o rgb.o tui.o kexecboot.o fstype/fstype.o
>> machine/zaurus.o
>> > | fb.o: In function `compose_color':
>> > |
>> >
>> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/fb.c:34:
>> > undefined reference to `rgba2comp'
>> > | collect2: error: ld returned 1 exit status
>> >
>> > BTW, I didn't test that patch compiling with gcc 4 yet. It is just meant
>> as
>> > a fix for gcc 5 w/out  touching much code.
>> > Thanks for your review, suggestions are appreciated!
>> >
>> > Cheers
>> > Andrea
>> > --
>> > ___
>> > Openembedded-devel mailing list
>> > Openembedded-devel@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>> --
>> ___
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>>
> --
> ___
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-initramfs][PATCH] kexecboot_0.6: fix build with gcc 5

2015-10-04 Thread Andrea Adami
On Fri, Sep 25, 2015 at 6:38 AM, Khem Raj  wrote:

> On Thu, Sep 24, 2015 at 2:11 PM, Andrea Adami 
> wrote:
> > On Thu, Sep 24, 2015 at 6:55 AM, Khem Raj  wrote:
> >
> >> On Wed, Sep 23, 2015 at 3:29 PM, Andrea Adami 
> >> wrote:
> >> > +-inline void
> >> > ++extern inline void
> >>
> >> would it be better to make it static inline ?
> >>
> >
> > Apparently not...
>
> well I meant to move the defintion of this function to header and not
> just modify the declaration.
>
>
Khem,

what do you think if I simply modify the declaration from inline void to
void? There is a single definition and it uses inline.

Declaration in rgb.h
+ /* Convert RGBA uint32 to red/green/blue/alpha components */
+-inline void
++void
+ rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
+   kx_ccomp *blue, kx_ccomp *alpha);

Definition in rgb.c is

#include "rgb.h"
#include "rgbtab.h"

inline void
rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
kx_ccomp *blue, kx_ccomp *alpha)
{
*alpha = (kx_ccomp) (rgba & 0x00FF);
*blue =  (kx_ccomp)((rgba & 0xFF00) >> 8);
*green = (kx_ccomp)((rgba & 0x00FF) >> 16);
*red =   (kx_ccomp)((rgba & 0xFF00) >> 24);
}

It compiles and if I understand correctly the function will be callable
from other files. Do you see any drawbacks? This would be a minimal change
for upstream.

About 'static inline' I think I get what you mean but please note the
function is only used in one source file so I guess I could just define it
'static inline' there (or in a header if it would be used more than once ).
Do you suggest to modify all the occurrences in the sources?

Thanks in advance
Andrea



> >
> > rgba2comp is used in rgb.c and fb.c.
> > Making it static inline leads to the following error:
> >
> > | In file included from
> >
> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/fb.h:39:0,
> > |  from
> >
> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/gui.h:25,
> > |  from
> >
> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/kexecboot.c:43:
> > |
> >
> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/rgb.h:55:1:
> > warning: 'rgba2comp' declared 'static' but never defined
> [-Wunused-function]
> > |  rgba2comp(kx_rgba rgba, kx_ccomp *red, kx_ccomp *green,
> > |  ^
> > | arm-oe-linux-gnueabi-gcc  -march=armv5e -marm  -mthumb-interwork
> > --sysroot=/tmp/build/tmp-glibc/sysroots/poodle -Wall -O2 -pipe -g
> > -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu
> > -Wl,--as-needed -o kexecboot util.o cfgparser.o devicescan.o evdevs.o
> fb.o
> > gui.o menu.o xpm.o rgb.o tui.o kexecboot.o fstype/fstype.o
> machine/zaurus.o
> > | fb.o: In function `compose_color':
> > |
> >
> /tmp/build/tmp-glibc/work/poodle-oe-linux-gnueabi/kexecboot/0.6-r0/kexecboot-0.6/fb.c:34:
> > undefined reference to `rgba2comp'
> > | collect2: error: ld returned 1 exit status
> >
> > BTW, I didn't test that patch compiling with gcc 4 yet. It is just meant
> as
> > a fix for gcc 5 w/out  touching much code.
> > Thanks for your review, suggestions are appreciated!
> >
> > Cheers
> > Andrea
> > --
> > ___
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> --
> ___
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel