All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux
@ 2016-05-14 14:17 Thomas Petazzoni
  2016-05-14 14:17 ` [Buildroot] [PATCH 2/4] android-tools: fix build on big endian systems Thomas Petazzoni
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2016-05-14 14:17 UTC (permalink / raw)
  To: buildroot

The fastboot sub-option of android-tools did not properly replicate the
dependency of libselinux, which it is selecting. Due to this, an invalid
configuration could be generated, with fastboot selected while thread
support is not available for example (and therefore libselinux is not
available). This problem was causing the following build failure:

 http://autobuild.buildroot.net/results/21e45cee04fd983c85c6702595ee3f7ed8470931/

This is fixed by replicating the selinux dependencies in the fastboot
sub-option and adding the relevant Config.in comment.

In addition, the main android-tools option had some logic to make sure
at least one of its sub-option is enabled: adbd by default on systems
with MMU, and fastboot by default on systems without MMU (because
fastboot is the only part that builds on noMMU systems).

However, with the new dependencies in the fastboot sub-option, this
logic would have become a lot more complicated. Since fastboot is very
unlikely to be used on noMMU systems, we simply make the whole package
not available on noMMU systems.

Cc: Gary Bisson <gary.bisson@boundarydevices.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Julien Corjon <corjon.j@ecagroup.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/android-tools/Config.in | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/package/android-tools/Config.in b/package/android-tools/Config.in
index 84f18e8..9be3f40 100644
--- a/package/android-tools/Config.in
+++ b/package/android-tools/Config.in
@@ -1,12 +1,14 @@
 config BR2_PACKAGE_ANDROID_TOOLS
 	bool "android-tools"
-	# adb/adbd needs mmu
+	# Technically, fastboot could build on noMMU systems. But
+	# since we need at least one of the three sub-options enabled,
+	# and adb/adbd can't be built on noMMU systems, and fastboot
+	# has some complicated dependencies, we simply make the whole
+	# package not available on noMMU platforms.
+	depends on BR2_USE_MMU
 	select BR2_PACKAGE_ANDROID_TOOLS_ADBD if \
 	      !BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT && \
-	      !BR2_PACKAGE_ANDROID_TOOLS_ADB && \
-	      BR2_USE_MMU
-	select BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT if \
-	      !BR2_USE_MMU
+	      !BR2_PACKAGE_ANDROID_TOOLS_ADB
 	help
 	  This package contains the fastboot and adb utilities, that
 	  can be used to interact with target devices using of these
@@ -18,11 +20,18 @@ config BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT
 	bool "fastboot"
 	select BR2_PACKAGE_LIBSELINUX
 	select BR2_PACKAGE_ZLIB
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libselinux
+	depends on !BR2_STATIC_LIBS # libselinux
+	depends on !BR2_arc # libselinux
 	help
 	  This option will build and install the fastboot utility for
 	  the target, which can be used to reflash other target devices
 	  implementing the fastboot protocol.
 
+comment "fastboot needs a toolchain w/ threads, dynamic library"
+	depends on !BR2_arc
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+
 config BR2_PACKAGE_ANDROID_TOOLS_ADB
 	bool "adb"
 	depends on BR2_USE_MMU # uses fork()
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 2/4] android-tools: fix build on big endian systems
  2016-05-14 14:17 [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Thomas Petazzoni
@ 2016-05-14 14:17 ` Thomas Petazzoni
  2016-05-17 13:47   ` Peter Korsgaard
  2016-05-14 14:17 ` [Buildroot] [PATCH 3/4] cups: fix static linking problem Thomas Petazzoni
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2016-05-14 14:17 UTC (permalink / raw)
  To: buildroot

This commit adds a patch to the android-tools package to make it build
properly on big-endian systems.

Fixes:

  http://autobuild.buildroot.net/results/1b8ace1a083b419c1ab913fda0d36a1d2d910f13/ (PowerPC)
  http://autobuild.buildroot.net/results/5bb304c91367f1570903c8c527b387c65e572e56/ (Xtensa)

Cc: Gary Bisson <gary.bisson@boundarydevices.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Julien Corjon <corjon.j@ecagroup.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../android-tools/0005-fix-big-endian-build.patch  | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 package/android-tools/0005-fix-big-endian-build.patch

diff --git a/package/android-tools/0005-fix-big-endian-build.patch b/package/android-tools/0005-fix-big-endian-build.patch
new file mode 100644
index 0000000..c35fdcb
--- /dev/null
+++ b/package/android-tools/0005-fix-big-endian-build.patch
@@ -0,0 +1,61 @@
+Fix build on big endian systems
+
+The usb_linux_client.c file defines cpu_to_le16/32 by using the C
+library htole16/32 function calls. However, cpu_to_le16/32 are used
+when initializing structures, i.e in a context where a function call
+is not allowed.
+
+It works fine on little endian systems because htole16/32 are defined
+by the C library as no-ops. But on big-endian systems, they are
+actually doing something, which might involve calling a function,
+causing build failures.
+
+To solve this, we simply open-code cpu_to_le16/32 in a way that allows
+them to be used when initializing structures.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/core/adb/usb_linux_client.c
+===================================================================
+--- a/core/adb/usb_linux_client.c
++++ b/core/adb/usb_linux_client.c
+@@ -34,8 +34,15 @@
+ #define MAX_PACKET_SIZE_FS	64
+ #define MAX_PACKET_SIZE_HS	512
+ 
+-#define cpu_to_le16(x)  htole16(x)
+-#define cpu_to_le32(x)  htole32(x)
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++# define cpu_to_le16(x) (x)
++# define cpu_to_le32(x) (x)
++#else
++# define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
++# define cpu_to_le32(x) \
++	((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >>  8) | \
++	 (((x) & 0x0000ff00u) <<  8) | (((x) & 0x000000ffu) << 24))
++#endif
+ 
+ struct usb_handle
+ {
+Index: b/core/adbd/usb_linux_client.c
+===================================================================
+--- a/core/adbd/usb_linux_client.c
++++ b/core/adbd/usb_linux_client.c
+@@ -34,8 +34,15 @@
+ #define MAX_PACKET_SIZE_FS	64
+ #define MAX_PACKET_SIZE_HS	512
+ 
+-#define cpu_to_le16(x)  htole16(x)
+-#define cpu_to_le32(x)  htole32(x)
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++# define cpu_to_le16(x) (x)
++# define cpu_to_le32(x) (x)
++#else
++# define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
++# define cpu_to_le32(x) \
++	((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >>  8) | \
++	 (((x) & 0x0000ff00u) <<  8) | (((x) & 0x000000ffu) << 24))
++#endif
+ 
+ struct usb_handle
+ {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/4] cups: fix static linking problem
  2016-05-14 14:17 [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Thomas Petazzoni
  2016-05-14 14:17 ` [Buildroot] [PATCH 2/4] android-tools: fix build on big endian systems Thomas Petazzoni
@ 2016-05-14 14:17 ` Thomas Petazzoni
  2016-05-17  8:47   ` Olivier Schonken
  2016-05-25 20:47   ` Peter Korsgaard
  2016-05-14 14:17 ` [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations Thomas Petazzoni
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2016-05-14 14:17 UTC (permalink / raw)
  To: buildroot

In static linking configurations, cups fails to build due to the lack of
Scrt1.o from uClibc toolchains. This Scrt1.o is only needed for PIE
binaries. Since we don't really care about PIE binaries in the context
of Buildroot, this commit solves the problem by patching cups to not
generate a PIE binary.

Fixes:

  http://autobuild.buildroot.net/results/445a401da2f63a6c43d7c166516287db6cc977ab/

Cc: Olivier Schonken <olivier.schonken@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/cups/0004-remove-pie.patch | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 package/cups/0004-remove-pie.patch

diff --git a/package/cups/0004-remove-pie.patch b/package/cups/0004-remove-pie.patch
new file mode 100644
index 0000000..3d81941
--- /dev/null
+++ b/package/cups/0004-remove-pie.patch
@@ -0,0 +1,21 @@
+Remove PIE flags from the build
+
+Generating a statically linked binary built with PIE requires the
+Scrt1.o file, which isn't part of Buildroot uClibc toolchains. To
+solve this, we simply disable the PIE flags.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Makedefs.in
+===================================================================
+--- a/Makedefs.in
++++ b/Makedefs.in
+@@ -142,7 +142,7 @@
+ IPPFIND_MAN	=	@IPPFIND_MAN@
+ LDFLAGS		=	-L../cgi-bin -L../cups -L../filter -L../ppdc \
+ 			-L../scheduler @LDARCHFLAGS@ \
+-			@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
++			@LDFLAGS@ @RELROFLAGS@ $(OPTIM)
+ LINKCUPS	=	@LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(LIBZ)
+ LINKCUPSIMAGE	=	@LINKCUPSIMAGE@
+ LIBS		=	$(LINKCUPS) $(COMMONLIBS)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations
  2016-05-14 14:17 [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Thomas Petazzoni
  2016-05-14 14:17 ` [Buildroot] [PATCH 2/4] android-tools: fix build on big endian systems Thomas Petazzoni
  2016-05-14 14:17 ` [Buildroot] [PATCH 3/4] cups: fix static linking problem Thomas Petazzoni
@ 2016-05-14 14:17 ` Thomas Petazzoni
  2016-05-14 23:45   ` Arnout Vandecappelle
  2016-05-15 19:22   ` Thomas Petazzoni
  2016-05-14 23:31 ` [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Arnout Vandecappelle
  2016-05-15 19:21 ` Thomas Petazzoni
  4 siblings, 2 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2016-05-14 14:17 UTC (permalink / raw)
  To: buildroot

gmrender-resurrect uses <error.h>, which isn't available on musl
configuration, so let's disable this package in such situations.

Fixes:

  http://autobuild.buildroot.net/results/96a280a8115cd01d64670e4caf2471d3ee4581d9/
  (and numerous similar build failures)

Cc: kei-k at ca2.so-net.ne.jp <kei-k@ca2.so-net.ne.jp>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gmrender-resurrect/Config.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/gmrender-resurrect/Config.in b/package/gmrender-resurrect/Config.in
index db655ad..1a46225 100644
--- a/package/gmrender-resurrect/Config.in
+++ b/package/gmrender-resurrect/Config.in
@@ -3,6 +3,8 @@ config BR2_PACKAGE_GMRENDER_RESURRECT
 	depends on BR2_USE_WCHAR # gstreamer1 -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2, libupnp
 	depends on BR2_USE_MMU # gstreamer1
+	# uses <error.h>
+	depends on !BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_GSTREAMER1
 	select BR2_PACKAGE_GST1_PLUGINS_BASE # run-time only
 	select BR2_PACKAGE_LIBUPNP
@@ -11,6 +13,7 @@ config BR2_PACKAGE_GMRENDER_RESURRECT
 
 	  https://github.com/hzeller/gmrender-resurrect
 
-comment "gmrender-resurrect needs a toolchain w/ wchar, threads"
+comment "gmrender-resurrect needs an (e)glibc or uClibc toolchain w/ wchar, threads"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_TOOLCHAIN_USES_MUSL
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux
  2016-05-14 14:17 [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2016-05-14 14:17 ` [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations Thomas Petazzoni
@ 2016-05-14 23:31 ` Arnout Vandecappelle
  2016-05-15 19:21 ` Thomas Petazzoni
  4 siblings, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2016-05-14 23:31 UTC (permalink / raw)
  To: buildroot

On 05/14/16 16:17, Thomas Petazzoni wrote:
> The fastboot sub-option of android-tools did not properly replicate the
> dependency of libselinux, which it is selecting. Due to this, an invalid
> configuration could be generated, with fastboot selected while thread
> support is not available for example (and therefore libselinux is not
> available). This problem was causing the following build failure:
>
>  http://autobuild.buildroot.net/results/21e45cee04fd983c85c6702595ee3f7ed8470931/
>
> This is fixed by replicating the selinux dependencies in the fastboot
> sub-option and adding the relevant Config.in comment.
>
> In addition, the main android-tools option had some logic to make sure
> at least one of its sub-option is enabled: adbd by default on systems
> with MMU, and fastboot by default on systems without MMU (because
> fastboot is the only part that builds on noMMU systems).
>
> However, with the new dependencies in the fastboot sub-option, this
> logic would have become a lot more complicated. Since fastboot is very
> unlikely to be used on noMMU systems, we simply make the whole package
> not available on noMMU systems.

  Actually, the new dependencies would still be complicated if we didn't have 
that automatic selection logic, because the whole package would still need to 
depend on BR2_USE_MMU || (BR2_TOOLCHAIN_HAS_THREADS && !BR2_STATIC_LIBS && 
!BR2_arc).

  But I agree with the reasoning, so

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Regards,
  Arnout

>
> Cc: Gary Bisson <gary.bisson@boundarydevices.com>
> Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
> Cc: Julien Corjon <corjon.j@ecagroup.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/android-tools/Config.in | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/package/android-tools/Config.in b/package/android-tools/Config.in
> index 84f18e8..9be3f40 100644
> --- a/package/android-tools/Config.in
> +++ b/package/android-tools/Config.in
> @@ -1,12 +1,14 @@
>  config BR2_PACKAGE_ANDROID_TOOLS
>  	bool "android-tools"
> -	# adb/adbd needs mmu
> +	# Technically, fastboot could build on noMMU systems. But
> +	# since we need at least one of the three sub-options enabled,
> +	# and adb/adbd can't be built on noMMU systems, and fastboot
> +	# has some complicated dependencies, we simply make the whole
> +	# package not available on noMMU platforms.
> +	depends on BR2_USE_MMU
>  	select BR2_PACKAGE_ANDROID_TOOLS_ADBD if \
>  	      !BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT && \
> -	      !BR2_PACKAGE_ANDROID_TOOLS_ADB && \
> -	      BR2_USE_MMU
> -	select BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT if \
> -	      !BR2_USE_MMU
> +	      !BR2_PACKAGE_ANDROID_TOOLS_ADB
>  	help
>  	  This package contains the fastboot and adb utilities, that
>  	  can be used to interact with target devices using of these
> @@ -18,11 +20,18 @@ config BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT
>  	bool "fastboot"
>  	select BR2_PACKAGE_LIBSELINUX
>  	select BR2_PACKAGE_ZLIB
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libselinux
> +	depends on !BR2_STATIC_LIBS # libselinux
> +	depends on !BR2_arc # libselinux
>  	help
>  	  This option will build and install the fastboot utility for
>  	  the target, which can be used to reflash other target devices
>  	  implementing the fastboot protocol.
>
> +comment "fastboot needs a toolchain w/ threads, dynamic library"
> +	depends on !BR2_arc
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
> +
>  config BR2_PACKAGE_ANDROID_TOOLS_ADB
>  	bool "adb"
>  	depends on BR2_USE_MMU # uses fork()
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations
  2016-05-14 14:17 ` [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations Thomas Petazzoni
@ 2016-05-14 23:45   ` Arnout Vandecappelle
  2016-05-15 19:22   ` Thomas Petazzoni
  1 sibling, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2016-05-14 23:45 UTC (permalink / raw)
  To: buildroot

On 05/14/16 16:17, Thomas Petazzoni wrote:
> gmrender-resurrect uses <error.h>, which isn't available on musl
> configuration, so let's disable this package in such situations.
>
> Fixes:
>
>   http://autobuild.buildroot.net/results/96a280a8115cd01d64670e4caf2471d3ee4581d9/
>   (and numerous similar build failures)
>
> Cc: kei-k at ca2.so-net.ne.jp <kei-k@ca2.so-net.ne.jp>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Regards,
  Arnout


> ---
>  package/gmrender-resurrect/Config.in | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/package/gmrender-resurrect/Config.in b/package/gmrender-resurrect/Config.in
> index db655ad..1a46225 100644
> --- a/package/gmrender-resurrect/Config.in
> +++ b/package/gmrender-resurrect/Config.in
> @@ -3,6 +3,8 @@ config BR2_PACKAGE_GMRENDER_RESURRECT
>  	depends on BR2_USE_WCHAR # gstreamer1 -> libglib2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2, libupnp
>  	depends on BR2_USE_MMU # gstreamer1
> +	# uses <error.h>
> +	depends on !BR2_TOOLCHAIN_USES_MUSL
>  	select BR2_PACKAGE_GSTREAMER1
>  	select BR2_PACKAGE_GST1_PLUGINS_BASE # run-time only
>  	select BR2_PACKAGE_LIBUPNP
> @@ -11,6 +13,7 @@ config BR2_PACKAGE_GMRENDER_RESURRECT
>
>  	  https://github.com/hzeller/gmrender-resurrect
>
> -comment "gmrender-resurrect needs a toolchain w/ wchar, threads"
> +comment "gmrender-resurrect needs an (e)glibc or uClibc toolchain w/ wchar, threads"
>  	depends on BR2_USE_MMU
> -	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> +		BR2_TOOLCHAIN_USES_MUSL
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux
  2016-05-14 14:17 [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2016-05-14 23:31 ` [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Arnout Vandecappelle
@ 2016-05-15 19:21 ` Thomas Petazzoni
  4 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2016-05-15 19:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 14 May 2016 16:17:11 +0200, Thomas Petazzoni wrote:
> The fastboot sub-option of android-tools did not properly replicate the
> dependency of libselinux, which it is selecting. Due to this, an invalid
> configuration could be generated, with fastboot selected while thread
> support is not available for example (and therefore libselinux is not
> available). This problem was causing the following build failure:
> 
>  http://autobuild.buildroot.net/results/21e45cee04fd983c85c6702595ee3f7ed8470931/
> 
> This is fixed by replicating the selinux dependencies in the fastboot
> sub-option and adding the relevant Config.in comment.
> 
> In addition, the main android-tools option had some logic to make sure
> at least one of its sub-option is enabled: adbd by default on systems
> with MMU, and fastboot by default on systems without MMU (because
> fastboot is the only part that builds on noMMU systems).
> 
> However, with the new dependencies in the fastboot sub-option, this
> logic would have become a lot more complicated. Since fastboot is very
> unlikely to be used on noMMU systems, we simply make the whole package
> not available on noMMU systems.
> 
> Cc: Gary Bisson <gary.bisson@boundarydevices.com>
> Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
> Cc: Julien Corjon <corjon.j@ecagroup.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/android-tools/Config.in | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)

Applied to master.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations
  2016-05-14 14:17 ` [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations Thomas Petazzoni
  2016-05-14 23:45   ` Arnout Vandecappelle
@ 2016-05-15 19:22   ` Thomas Petazzoni
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2016-05-15 19:22 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 14 May 2016 16:17:14 +0200, Thomas Petazzoni wrote:
> gmrender-resurrect uses <error.h>, which isn't available on musl
> configuration, so let's disable this package in such situations.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/96a280a8115cd01d64670e4caf2471d3ee4581d9/
>   (and numerous similar build failures)
> 
> Cc: kei-k at ca2.so-net.ne.jp <kei-k@ca2.so-net.ne.jp>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/gmrender-resurrect/Config.in | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Applied to master.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/4] cups: fix static linking problem
  2016-05-14 14:17 ` [Buildroot] [PATCH 3/4] cups: fix static linking problem Thomas Petazzoni
@ 2016-05-17  8:47   ` Olivier Schonken
  2016-05-25 20:47   ` Peter Korsgaard
  1 sibling, 0 replies; 11+ messages in thread
From: Olivier Schonken @ 2016-05-17  8:47 UTC (permalink / raw)
  To: buildroot

Hi Thomas

Thanks for fixing this issue.  I had unfortunately parked it to focus on
more pressing issues.

The patch looks good, and fixes the build error.

Regards

Olivier

On 14 May 2016 at 16:17, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> In static linking configurations, cups fails to build due to the lack of
> Scrt1.o from uClibc toolchains. This Scrt1.o is only needed for PIE
> binaries. Since we don't really care about PIE binaries in the context
> of Buildroot, this commit solves the problem by patching cups to not
> generate a PIE binary.
>
> Fixes:
>
>
> http://autobuild.buildroot.net/results/445a401da2f63a6c43d7c166516287db6cc977ab/
>
> Cc: Olivier Schonken <olivier.schonken@gmail.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/cups/0004-remove-pie.patch | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 package/cups/0004-remove-pie.patch
>
> diff --git a/package/cups/0004-remove-pie.patch
> b/package/cups/0004-remove-pie.patch
> new file mode 100644
> index 0000000..3d81941
> --- /dev/null
> +++ b/package/cups/0004-remove-pie.patch
> @@ -0,0 +1,21 @@
> +Remove PIE flags from the build
> +
> +Generating a statically linked binary built with PIE requires the
> +Scrt1.o file, which isn't part of Buildroot uClibc toolchains. To
> +solve this, we simply disable the PIE flags.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +
> +Index: b/Makedefs.in
> +===================================================================
> +--- a/Makedefs.in
> ++++ b/Makedefs.in
> +@@ -142,7 +142,7 @@
> + IPPFIND_MAN   =       @IPPFIND_MAN@
> + LDFLAGS               =       -L../cgi-bin -L../cups -L../filter
> -L../ppdc \
> +                       -L../scheduler @LDARCHFLAGS@ \
> +-                      @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
> ++                      @LDFLAGS@ @RELROFLAGS@ $(OPTIM)
> + LINKCUPS      =       @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(LIBZ)
> + LINKCUPSIMAGE =       @LINKCUPSIMAGE@
> + LIBS          =       $(LINKCUPS) $(COMMONLIBS)
> --
> 2.7.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160517/d6d1fd0b/attachment.html>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 2/4] android-tools: fix build on big endian systems
  2016-05-14 14:17 ` [Buildroot] [PATCH 2/4] android-tools: fix build on big endian systems Thomas Petazzoni
@ 2016-05-17 13:47   ` Peter Korsgaard
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2016-05-17 13:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > This commit adds a patch to the android-tools package to make it build
 > properly on big-endian systems.

 > Fixes:

 >   http://autobuild.buildroot.net/results/1b8ace1a083b419c1ab913fda0d36a1d2d910f13/ (PowerPC)
 >   http://autobuild.buildroot.net/results/5bb304c91367f1570903c8c527b387c65e572e56/ (Xtensa)

 > Cc: Gary Bisson <gary.bisson@boundarydevices.com>
 > Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
 > Cc: Julien Corjon <corjon.j@ecagroup.com>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/4] cups: fix static linking problem
  2016-05-14 14:17 ` [Buildroot] [PATCH 3/4] cups: fix static linking problem Thomas Petazzoni
  2016-05-17  8:47   ` Olivier Schonken
@ 2016-05-25 20:47   ` Peter Korsgaard
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2016-05-25 20:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > In static linking configurations, cups fails to build due to the lack of
 > Scrt1.o from uClibc toolchains. This Scrt1.o is only needed for PIE
 > binaries. Since we don't really care about PIE binaries in the context
 > of Buildroot, this commit solves the problem by patching cups to not
 > generate a PIE binary.

 > Fixes:

 >   http://autobuild.buildroot.net/results/445a401da2f63a6c43d7c166516287db6cc977ab/

 > Cc: Olivier Schonken <olivier.schonken@gmail.com>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-05-25 20:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-14 14:17 [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Thomas Petazzoni
2016-05-14 14:17 ` [Buildroot] [PATCH 2/4] android-tools: fix build on big endian systems Thomas Petazzoni
2016-05-17 13:47   ` Peter Korsgaard
2016-05-14 14:17 ` [Buildroot] [PATCH 3/4] cups: fix static linking problem Thomas Petazzoni
2016-05-17  8:47   ` Olivier Schonken
2016-05-25 20:47   ` Peter Korsgaard
2016-05-14 14:17 ` [Buildroot] [PATCH 4/4] gmrender-resurrect: disable on musl configurations Thomas Petazzoni
2016-05-14 23:45   ` Arnout Vandecappelle
2016-05-15 19:22   ` Thomas Petazzoni
2016-05-14 23:31 ` [Buildroot] [PATCH 1/4] android-tools: fix dependency on libselinux Arnout Vandecappelle
2016-05-15 19:21 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.