All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/5] Misc autobuilder fixes
@ 2014-11-23 17:35 Thomas Petazzoni
  2014-11-23 17:35 ` [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain Thomas Petazzoni
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 17:35 UTC (permalink / raw)
  To: buildroot

Hello,

Here are some fixes for various autobuilder failures. Three affecting
Blackfin, one affecting ARC.

Thomas

Thomas Petazzoni (5):
  toolchain-external: fix C++ build issues with the Blackfin toolchain
  mpdecimal: fix build on pure static library configurations
  ushare: do not allow building in static lib situations
  radvd: switch to new patch naming convention, use Git formatted
    patches
  radvd: add a patch to fix build failure on architectures without
    sysctl()

 ...-support-for-enable-disable-shared-static.patch | 101 +++++++++++++++++++++
 package/mpdecimal/mpdecimal.mk                     |   1 +
 ...-check-requirement-we-don-t-do-unit-tests.patch |  29 ++++++
 ...-fstack-protector-the-toolchain-might-lac.patch |  27 ++++++
 ...0003-Improve-check-of-the-sysctl-function.patch |  49 ++++++++++
 package/radvd/radvd-01-drop-check.patch            |  18 ----
 package/radvd/radvd-02-drop-stack-protector.patch  |  15 ---
 package/radvd/radvd.mk                             |   2 +-
 package/ushare/Config.in                           |   8 +-
 toolchain/toolchain-external/toolchain-external.mk |   9 ++
 10 files changed, 223 insertions(+), 36 deletions(-)
 create mode 100644 package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
 create mode 100644 package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch
 create mode 100644 package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch
 create mode 100644 package/radvd/0003-Improve-check-of-the-sysctl-function.patch
 delete mode 100644 package/radvd/radvd-01-drop-check.patch
 delete mode 100644 package/radvd/radvd-02-drop-stack-protector.patch

-- 
2.1.0

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

* [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain
  2014-11-23 17:35 [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
@ 2014-11-23 17:35 ` Thomas Petazzoni
  2014-11-23 17:54   ` Yann E. MORIN
  2014-11-23 17:36 ` [Buildroot] [PATCH 2/5] mpdecimal: fix build on pure static library configurations Thomas Petazzoni
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 17:35 UTC (permalink / raw)
  To: buildroot

The Blackfin toolchain install some libtool .la files, which none of
the other toolchains seem to do, and those .la files confuse libtool
down the road, causing build failures due to incorrect library
paths. As an example, the thrift package has been constantly failing
to build on Blackfin due to this.

To solve this issue, we simply remove the .la files installed by the
toolchain from the staging directory.

Fixes:

  http://autobuild.buildroot.org/results/8ac/8ac073a4e9c3a228dd22d80ea02b9dc3fc739164/

And many similar occurences of the same problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/toolchain-external.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index da3718c..72acb41 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -331,14 +331,17 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y)
 TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2012R2/2012R2-RC2/i386/
 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2012R2-RC2.i386.tar.bz2
 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2012R2-RC2.i386.tar.bz2
+TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1),y)
 TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2013R1/2013R1-RC1/i386/
 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2013R1-RC1.i386.tar.bz2
 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2013R1-RC1.i386.tar.bz2
+TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y)
 TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2014R1/2014R1-RC2/i386/
 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2014R1-RC2.i386.tar.bz2
 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
+TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sources.buildroot.net/
 TOOLCHAIN_EXTERNAL_SOURCE = lin32-microblazeel-unknown-linux-gnu_14.3_early.tar.xz
@@ -666,6 +669,12 @@ define TOOLCHAIN_EXTERNAL_SANITIZE_KERNEL_HEADERS
 		-e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @'
 endef
 
+# Some toolchains have .la libtool files that actually confuse libtool
+# down the road. Get rid of them.
+define TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
+	find $(STAGING_DIR) -name '*.la' | xargs rm -f
+endef
+
 define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
 	if test -f $(TARGET_CROSS)gdb ; then \
 		$(call gen_gdbinit_file) ; \
-- 
2.1.0

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

* [Buildroot] [PATCH 2/5] mpdecimal: fix build on pure static library configurations
  2014-11-23 17:35 [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
  2014-11-23 17:35 ` [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain Thomas Petazzoni
@ 2014-11-23 17:36 ` Thomas Petazzoni
  2014-11-23 18:00   ` Yann E. MORIN
  2014-11-23 17:36 ` [Buildroot] [PATCH 3/5] ushare: do not allow building in static lib situations Thomas Petazzoni
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 17:36 UTC (permalink / raw)
  To: buildroot

This commit adds a patch to mpdecimal that makes it understand
--enable-shared/--disable-shared and --enable-static/--disable-static,
even if mpdecimal isn't using automake/libtool. It allows to build
only the static variant of the mpdecimal library when needed.

Fixes:

  http://autobuild.buildroot.org/results/276/2764bd8c42ba659682760ffc6afa933b7530d06c/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...-support-for-enable-disable-shared-static.patch | 101 +++++++++++++++++++++
 package/mpdecimal/mpdecimal.mk                     |   1 +
 2 files changed, 102 insertions(+)
 create mode 100644 package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch

diff --git a/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
new file mode 100644
index 0000000..630bbd6
--- /dev/null
+++ b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
@@ -0,0 +1,101 @@
+From c349964887901848fb4cd5db53a5bcb6dae27aaa Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 23 Nov 2014 10:16:33 +0100
+Subject: [PATCH] Add minimal support for --{enable,disable}-{shared,static}
+
+mpdecimal uses autoconf, but not automake or libtool, so this commit
+adds some basic handling of --{enable,disable}-{shared,static}, so
+that building the shared library can be disabled in pure static
+library contexts.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile.in          |  6 ++++++
+ configure.ac         | 13 +++++++++++++
+ libmpdec/Makefile.in | 11 ++++++++++-
+ 3 files changed, 29 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 2c91891..0c44f36 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -9,6 +9,8 @@ LIBSTATIC = @LIBSTATIC@
+ LIBSONAME = @LIBSONAME@
+ LIBSHARED = @LIBSHARED@
+ INSTALL = @INSTALL@
++BUILD_SHARED = @BUILD_SHARED@
++BUILD_STATIC = @BUILD_STATIC@
+ 
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -32,9 +34,13 @@ install: FORCE
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)
+ 	$(INSTALL) -m 644 libmpdec/mpdecimal.h $(DESTDIR)$(includedir)
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(libdir)
++ifeq ($(BUILD_STATIC),yes)
+ 	$(INSTALL) -m 644 libmpdec/$(LIBSTATIC) $(DESTDIR)$(libdir)
++endif
++ifeq ($(BUILD_SHARED),yes)
+ 	$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)
+ 	cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so
++endif
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(docdir)
+ 	cp -R doc/* $(DESTDIR)$(docdir)
+ 
+diff --git a/configure.ac b/configure.ac
+index 7ee8f86..2b3e505 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -88,6 +88,19 @@ CFLAGS="$saved_cflags"
+ AC_PROG_INSTALL
+ AC_SUBST(INSTALL)
+ 
++AC_ARG_ENABLE([shared],
++	[AS_HELP_STRING([--enable-shared], [build shared library])],
++	[BUILD_SHARED=$enableval],
++	[BUILD_SHARED=yes])
++
++AC_ARG_ENABLE([static],
++	[AS_HELP_STRING([--enable-static], [build static library])],
++	[BUILD_STATIC=$enableval],
++	[BUILD_STATIC=yes])
++
++AC_SUBST(BUILD_SHARED)
++AC_SUBST(BUILD_STATIC)
++
+ # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
+ # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
+ AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
+diff --git a/libmpdec/Makefile.in b/libmpdec/Makefile.in
+index d9619a3..985c73c 100644
+--- a/libmpdec/Makefile.in
++++ b/libmpdec/Makefile.in
+@@ -7,6 +7,8 @@
+ LIBSTATIC = @LIBSTATIC@
+ LIBSONAME = @LIBSONAME@
+ LIBSHARED = @LIBSHARED@
++BUILD_SHARED = @BUILD_SHARED@
++BUILD_STATIC = @BUILD_STATIC@
+ 
+ CC = @CC@
+ LD = @LD@
+@@ -32,8 +34,15 @@ ifeq ($(MAKECMDGOALS), profile_use)
+   MPD_LDFLAGS += $(MPD_PUSE)
+ endif
+ 
++ifeq ($(BUILD_SHARED),yes)
++TARGETS += $(LIBSHARED)
++endif
++
++ifeq ($(BUILD_STATIC),yes)
++TARGETS += $(LIBSTATIC)
++endif
+ 
+-default: $(LIBSTATIC) $(LIBSHARED)
++default: $(TARGETS)
+ 
+ 
+ OBJS := basearith.o context.o constants.o convolute.o crt.o mpdecimal.o \
+-- 
+2.1.0
+
diff --git a/package/mpdecimal/mpdecimal.mk b/package/mpdecimal/mpdecimal.mk
index fc5f855..8257c8d 100644
--- a/package/mpdecimal/mpdecimal.mk
+++ b/package/mpdecimal/mpdecimal.mk
@@ -10,6 +10,7 @@ MPDECIMAL_INSTALL_STAGING = YES
 MPDECIMAL_LICENSE = BSD-2c
 MPDECIMAL_LICENSE_FILES = LICENSE.txt
 MPDECIMAL_CONF_OPTS = LD="$(TARGET_CC)"
+MPDECIMAL_AUTORECONF = YES
 
 # On i386, by default, mpdecimal tries to uses <fenv.h> which is not
 # available in musl/glibc. So in this case, we tell mpdecimal to use
-- 
2.1.0

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

* [Buildroot] [PATCH 3/5] ushare: do not allow building in static lib situations
  2014-11-23 17:35 [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
  2014-11-23 17:35 ` [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain Thomas Petazzoni
  2014-11-23 17:36 ` [Buildroot] [PATCH 2/5] mpdecimal: fix build on pure static library configurations Thomas Petazzoni
@ 2014-11-23 17:36 ` Thomas Petazzoni
  2014-11-23 18:18   ` Yann E. MORIN
  2014-11-23 17:36 ` [Buildroot] [PATCH 4/5] radvd: switch to new patch naming convention, use Git formatted patches Thomas Petazzoni
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 17:36 UTC (permalink / raw)
  To: buildroot

The ushare configure script is a custom shell script, and it is not
designed to understand that the library order is important when doing
static linking.

Fixes:

  http://autobuild.buildroot.org/results/32e/32ed2a521043f929cc290145c8a651e69042e104/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/ushare/Config.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/package/ushare/Config.in b/package/ushare/Config.in
index 981f081..7f817d2 100644
--- a/package/ushare/Config.in
+++ b/package/ushare/Config.in
@@ -4,6 +4,10 @@ config BR2_PACKAGE_USHARE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp
 	select BR2_PACKAGE_LIBUPNP
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	# ushare has a completely custom configure script that does
+	# broken things with library ordering, which breaks static
+	# linking.
+	depends on !BR2_PREFER_STATIC_LIB
 	help
 	  uShare is a UPnP (TM) A/V & DLNA Media Server.
 	  It implements the server component that provides UPnP media devices
@@ -11,5 +15,5 @@ config BR2_PACKAGE_USHARE
 
 	  http://ushare.geexbox.org/
 
-comment "ushare needs a toolchain w/ largefile, threads"
-	depends on !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS)
+comment "ushare needs a toolchain w/ largefile, threads, dynamic library"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB
-- 
2.1.0

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

* [Buildroot] [PATCH 4/5] radvd: switch to new patch naming convention, use Git formatted patches
  2014-11-23 17:35 [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2014-11-23 17:36 ` [Buildroot] [PATCH 3/5] ushare: do not allow building in static lib situations Thomas Petazzoni
@ 2014-11-23 17:36 ` Thomas Petazzoni
  2014-11-23 18:22   ` Yann E. MORIN
  2014-11-23 17:36 ` [Buildroot] [PATCH 5/5] radvd: add a patch to fix build failure on architectures without sysctl() Thomas Petazzoni
  2014-11-24 21:06 ` [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
  5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 17:36 UTC (permalink / raw)
  To: buildroot

This commit renames the radvd patches to follow the new naming
convention, and reformats them to be Git patches.

Since the patches are renamed, we adjust the comment in the .mk file
explaining why we autoreconf the package.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...-check-requirement-we-don-t-do-unit-tests.patch | 29 ++++++++++++++++++++++
 ...-fstack-protector-the-toolchain-might-lac.patch | 27 ++++++++++++++++++++
 package/radvd/radvd-01-drop-check.patch            | 18 --------------
 package/radvd/radvd-02-drop-stack-protector.patch  | 15 -----------
 package/radvd/radvd.mk                             |  2 +-
 5 files changed, 57 insertions(+), 34 deletions(-)
 create mode 100644 package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch
 create mode 100644 package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch
 delete mode 100644 package/radvd/radvd-01-drop-check.patch
 delete mode 100644 package/radvd/radvd-02-drop-stack-protector.patch

diff --git a/package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch b/package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch
new file mode 100644
index 0000000..0bbbf28
--- /dev/null
+++ b/package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch
@@ -0,0 +1,29 @@
+From 2074114cef857f95104367c51ac9367082fc8060 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Sun, 23 Nov 2014 12:16:32 +0100
+Subject: [PATCH 1/3] Drop check requirement, we don't do unit tests
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 59b18a8..5dde3b2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -50,10 +50,6 @@ dnl Determine CC and preset CFLAGS
+ AC_PROG_CC_C99
+ AC_PROG_RANLIB
+ 
+-if test "$arch" = "linux" ; then
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
+-fi
+-
+ dnl Determine of netlink is available
+ AC_MSG_CHECKING(netlink)
+ AC_TRY_COMPILE([
+-- 
+2.1.0
+
diff --git a/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch b/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch
new file mode 100644
index 0000000..4476808
--- /dev/null
+++ b/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch
@@ -0,0 +1,27 @@
+From 324e1ebc7b86f68f49fb4f1c34a4de60d18dd3c1 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Sun, 23 Nov 2014 12:17:11 +0100
+Subject: [PATCH 2/3] Don't force -fstack-protector, the toolchain might lack
+ support for it
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 80633e7..8b5a2e4 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,7 +43,6 @@ DISABLE_WARNINGS = \
+ 
+ AM_CFLAGS = \
+ 	-fno-strict-aliasing \
+-	-fstack-protector \
+ 	$(ENABLE_WARNINGS) \
+ 	$(DISABLE_WARNINGS)
+ 
+-- 
+2.1.0
+
diff --git a/package/radvd/radvd-01-drop-check.patch b/package/radvd/radvd-01-drop-check.patch
deleted file mode 100644
index 670d5b2..0000000
--- a/package/radvd/radvd-01-drop-check.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Drop check requirement, we don't do unit tests.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura radvd-2.6.orig/configure.ac radvd-2.6/configure.ac
---- radvd-2.6.orig/configure.ac	2014-09-04 15:54:41.735038724 -0300
-+++ radvd-2.6/configure.ac	2014-09-04 15:54:53.106431815 -0300
-@@ -50,10 +50,6 @@
- AC_PROG_CC_C99
- AC_PROG_RANLIB
- 
--if test "$arch" = "linux" ; then
--PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
--fi
--
- dnl Determine of netlink is available
- AC_MSG_CHECKING(netlink)
- AC_TRY_COMPILE([
diff --git a/package/radvd/radvd-02-drop-stack-protector.patch b/package/radvd/radvd-02-drop-stack-protector.patch
deleted file mode 100644
index 532c1b6..0000000
--- a/package/radvd/radvd-02-drop-stack-protector.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Don't force -fstack-protector, the toolchain might lack support for it.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura radvd-2.1.orig/Makefile.am radvd-2.1/Makefile.am
---- radvd-2.1.orig/Makefile.am	2014-07-22 08:23:12.642260069 -0300
-+++ radvd-2.1/Makefile.am	2014-07-22 08:26:42.651380759 -0300
-@@ -43,7 +43,6 @@
- 
- AM_CFLAGS = \
- 	-fno-strict-aliasing \
--	-fstack-protector \
- 	$(ENABLE_WARNINGS) \
- 	$(DISABLE_WARNINGS)
- 
diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk
index e0d4f69..bd2086d 100644
--- a/package/radvd/radvd.mk
+++ b/package/radvd/radvd.mk
@@ -9,7 +9,7 @@ RADVD_SOURCE = radvd-$(RADVD_VERSION).tar.xz
 RADVD_SITE = http://www.litech.org/radvd/dist
 RADVD_DEPENDENCIES = host-bison flex host-flex host-pkgconf
 RADVD_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
-# For radvd-01-drop-check.patch & radvd-02-drop-stack-protector.patch
+# We're patching configure.ac/Makefile.am.
 RADVD_AUTORECONF = YES
 
 define RADVD_INSTALL_INITSCRIPT
-- 
2.1.0

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

* [Buildroot] [PATCH 5/5] radvd: add a patch to fix build failure on architectures without sysctl()
  2014-11-23 17:35 [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2014-11-23 17:36 ` [Buildroot] [PATCH 4/5] radvd: switch to new patch naming convention, use Git formatted patches Thomas Petazzoni
@ 2014-11-23 17:36 ` Thomas Petazzoni
  2014-11-23 18:25   ` Yann E. MORIN
  2014-11-24 21:06 ` [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
  5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 17:36 UTC (permalink / raw)
  To: buildroot

Modern architectures such as ARC do not provide the sysctl() system
call, since it is deprecated. However, uClibc still installs
<sys/sysctl.h> in such cases, which defeats radvd check for the
availability of sysctl(). This commit adds a patch to radvd which
improves the sysctl() checking.

Fixes:

  http://autobuild.buildroot.org/results/458/4581c4220adeaebbf6761e3b923088d8de8522d5/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...0003-Improve-check-of-the-sysctl-function.patch | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 package/radvd/0003-Improve-check-of-the-sysctl-function.patch

diff --git a/package/radvd/0003-Improve-check-of-the-sysctl-function.patch b/package/radvd/0003-Improve-check-of-the-sysctl-function.patch
new file mode 100644
index 0000000..3053f7b
--- /dev/null
+++ b/package/radvd/0003-Improve-check-of-the-sysctl-function.patch
@@ -0,0 +1,49 @@
+From 4c86b3cbf52f810615d92835e98d83e9555a4d88 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 23 Nov 2014 12:13:47 +0100
+Subject: [PATCH 3/3] Improve check of the sysctl() function
+
+Since sysctl is a deprecated system call, new architectures such as
+ARC don't implement it. In such cases, uClibc installs the
+<sys/sysctl.h> header, but dos not implement the sysctl()
+function. This has the annoying side effect of breaking the sysctl
+detection of radvd, which is purely based on the header file being
+present.
+
+To fix this, this commit adds a check based on the existence of the
+sysctl() function.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac   | 1 +
+ device-linux.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5dde3b2..5518f71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -161,6 +161,7 @@ AC_CHECK_HEADERS( \
+ 	time.h \
+ )
+ AC_HEADER_TIME
++AC_CHECK_FUNCS([sysctl])
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_MSG_CHECKING(whether struct sockaddr_in6 has sin6_scope_id)
+diff --git a/device-linux.c b/device-linux.c
+index 1ecaa6b..d9b56b8 100644
+--- a/device-linux.c
++++ b/device-linux.c
+@@ -183,7 +183,7 @@ int check_ip6_forwarding(void)
+ 		value = -1;
+ 	}
+ 
+-#ifdef HAVE_SYS_SYSCTL_H
++#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
+ 	int forw_sysctl[] = { SYSCTL_IP6_FORWARDING };
+ 	size_t size = sizeof(value);
+ 	if (!fp && sysctl(forw_sysctl, sizeof(forw_sysctl) / sizeof(forw_sysctl[0]), &value, &size, NULL, 0) < 0) {
+-- 
+2.1.0
+
-- 
2.1.0

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

* [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain
  2014-11-23 17:35 ` [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain Thomas Petazzoni
@ 2014-11-23 17:54   ` Yann E. MORIN
  2014-11-23 17:56     ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Yann E. MORIN @ 2014-11-23 17:54 UTC (permalink / raw)
  To: buildroot

On 2014-11-23 18:35 +0100, Thomas Petazzoni spake thusly:
> The Blackfin toolchain install some libtool .la files, which none of
> the other toolchains seem to do,

Well, with my crostool-NG toolchains, I have some, for example:

    ./armv6-rpi-linux-gnueabihf/libexec/gcc/armv6-rpi-linux-gnueabihf/4.9.1/liblto_plugin.la
    ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libitm.la
    ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libstdc++.la
    ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libsupc++.la
    ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libatomic.la

Or:

    ./x86_64-unknown-linux-uclibc/libexec/gcc/x86_64-unknown-linux-uclibc/4.9.1/liblto_plugin.la
    ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libitm.la
    ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libvtv.la
    ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libstdc++.la
    ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libsupc++.la
    ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libcilkrts.la
    ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libatomic.la

So, I'm not so sure...

Regards,
Yann E. MORIN.

> and those .la files confuse libtool
> down the road, causing build failures due to incorrect library
> paths. As an example, the thrift package has been constantly failing
> to build on Blackfin due to this.
> 
> To solve this issue, we simply remove the .la files installed by the
> toolchain from the staging directory.
> 
> Fixes:
> 
>   http://autobuild.buildroot.org/results/8ac/8ac073a4e9c3a228dd22d80ea02b9dc3fc739164/
> 
> And many similar occurences of the same problem.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  toolchain/toolchain-external/toolchain-external.mk | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index da3718c..72acb41 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -331,14 +331,17 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2012R2/2012R2-RC2/i386/
>  TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2012R2-RC2.i386.tar.bz2
>  TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2012R2-RC2.i386.tar.bz2
> +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2013R1/2013R1-RC1/i386/
>  TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2013R1-RC1.i386.tar.bz2
>  TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2013R1-RC1.i386.tar.bz2
> +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2014R1/2014R1-RC2/i386/
>  TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2014R1-RC2.i386.tar.bz2
>  TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
> +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://sources.buildroot.net/
>  TOOLCHAIN_EXTERNAL_SOURCE = lin32-microblazeel-unknown-linux-gnu_14.3_early.tar.xz
> @@ -666,6 +669,12 @@ define TOOLCHAIN_EXTERNAL_SANITIZE_KERNEL_HEADERS
>  		-e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @'
>  endef
>  
> +# Some toolchains have .la libtool files that actually confuse libtool
> +# down the road. Get rid of them.
> +define TOOLCHAIN_EXTERNAL_CLEANUP_LA_FILES
> +	find $(STAGING_DIR) -name '*.la' | xargs rm -f
> +endef
> +
>  define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
>  	if test -f $(TARGET_CROSS)gdb ; then \
>  		$(call gen_gdbinit_file) ; \
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain
  2014-11-23 17:54   ` Yann E. MORIN
@ 2014-11-23 17:56     ` Thomas Petazzoni
  2014-11-23 18:03       ` Yann E. MORIN
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 17:56 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Sun, 23 Nov 2014 18:54:30 +0100, Yann E. MORIN wrote:
> On 2014-11-23 18:35 +0100, Thomas Petazzoni spake thusly:
> > The Blackfin toolchain install some libtool .la files, which none of
> > the other toolchains seem to do,
> 
> Well, with my crostool-NG toolchains, I have some, for example:
> 
>     ./armv6-rpi-linux-gnueabihf/libexec/gcc/armv6-rpi-linux-gnueabihf/4.9.1/liblto_plugin.la
>     ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libitm.la
>     ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libstdc++.la
>     ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libsupc++.la
>     ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libatomic.la
> 
> Or:
> 
>     ./x86_64-unknown-linux-uclibc/libexec/gcc/x86_64-unknown-linux-uclibc/4.9.1/liblto_plugin.la
>     ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libitm.la
>     ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libvtv.la
>     ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libstdc++.la
>     ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libsupc++.la
>     ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libcilkrts.la
>     ./x86_64-unknown-linux-uclibc/x86_64-unknown-linux-uclibc/sysroot/lib/libatomic.la
> 
> So, I'm not so sure...

What do they contain?

At least, with the Blackfin toolchain, for some reason, libtool find it
smart to append the Buildroot sysroot path with the libdir value found
in the .la file.

Thanks,

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

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

* [Buildroot] [PATCH 2/5] mpdecimal: fix build on pure static library configurations
  2014-11-23 17:36 ` [Buildroot] [PATCH 2/5] mpdecimal: fix build on pure static library configurations Thomas Petazzoni
@ 2014-11-23 18:00   ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-11-23 18:00 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:
> This commit adds a patch to mpdecimal that makes it understand
> --enable-shared/--disable-shared and --enable-static/--disable-static,
> even if mpdecimal isn't using automake/libtool. It allows to build
> only the static variant of the mpdecimal library when needed.
> 
> Fixes:
> 
>   http://autobuild.buildroot.org/results/276/2764bd8c42ba659682760ffc6afa933b7530d06c/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  ...-support-for-enable-disable-shared-static.patch | 101 +++++++++++++++++++++
>  package/mpdecimal/mpdecimal.mk                     |   1 +
>  2 files changed, 102 insertions(+)
>  create mode 100644 package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
> 
> diff --git a/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
> new file mode 100644
> index 0000000..630bbd6
> --- /dev/null
> +++ b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
> @@ -0,0 +1,101 @@
> +From c349964887901848fb4cd5db53a5bcb6dae27aaa Mon Sep 17 00:00:00 2001
> +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +Date: Sun, 23 Nov 2014 10:16:33 +0100
> +Subject: [PATCH] Add minimal support for --{enable,disable}-{shared,static}
> +
> +mpdecimal uses autoconf, but not automake or libtool, so this commit
> +adds some basic handling of --{enable,disable}-{shared,static}, so
> +that building the shared library can be disabled in pure static
> +library contexts.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +---
> + Makefile.in          |  6 ++++++
> + configure.ac         | 13 +++++++++++++
> + libmpdec/Makefile.in | 11 ++++++++++-
> + 3 files changed, 29 insertions(+), 1 deletion(-)
> +
> +diff --git a/Makefile.in b/Makefile.in
> +index 2c91891..0c44f36 100644
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -9,6 +9,8 @@ LIBSTATIC = @LIBSTATIC@
> + LIBSONAME = @LIBSONAME@
> + LIBSHARED = @LIBSHARED@
> + INSTALL = @INSTALL@
> ++BUILD_SHARED = @BUILD_SHARED@
> ++BUILD_STATIC = @BUILD_STATIC@
> + 
> + prefix = @prefix@
> + exec_prefix = @exec_prefix@
> +@@ -32,9 +34,13 @@ install: FORCE
> + 	$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)
> + 	$(INSTALL) -m 644 libmpdec/mpdecimal.h $(DESTDIR)$(includedir)
> + 	$(INSTALL) -d -m 755 $(DESTDIR)$(libdir)
> ++ifeq ($(BUILD_STATIC),yes)
> + 	$(INSTALL) -m 644 libmpdec/$(LIBSTATIC) $(DESTDIR)$(libdir)
> ++endif
> ++ifeq ($(BUILD_SHARED),yes)
> + 	$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)
> + 	cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so
> ++endif
> + 	$(INSTALL) -d -m 755 $(DESTDIR)$(docdir)
> + 	cp -R doc/* $(DESTDIR)$(docdir)
> + 
> +diff --git a/configure.ac b/configure.ac
> +index 7ee8f86..2b3e505 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -88,6 +88,19 @@ CFLAGS="$saved_cflags"
> + AC_PROG_INSTALL
> + AC_SUBST(INSTALL)
> + 
> ++AC_ARG_ENABLE([shared],
> ++	[AS_HELP_STRING([--enable-shared], [build shared library])],
> ++	[BUILD_SHARED=$enableval],
> ++	[BUILD_SHARED=yes])
> ++
> ++AC_ARG_ENABLE([static],
> ++	[AS_HELP_STRING([--enable-static], [build static library])],
> ++	[BUILD_STATIC=$enableval],
> ++	[BUILD_STATIC=yes])
> ++
> ++AC_SUBST(BUILD_SHARED)
> ++AC_SUBST(BUILD_STATIC)
> ++
> + # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
> + # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
> + AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
> +diff --git a/libmpdec/Makefile.in b/libmpdec/Makefile.in
> +index d9619a3..985c73c 100644
> +--- a/libmpdec/Makefile.in
> ++++ b/libmpdec/Makefile.in
> +@@ -7,6 +7,8 @@
> + LIBSTATIC = @LIBSTATIC@
> + LIBSONAME = @LIBSONAME@
> + LIBSHARED = @LIBSHARED@
> ++BUILD_SHARED = @BUILD_SHARED@
> ++BUILD_STATIC = @BUILD_STATIC@
> + 
> + CC = @CC@
> + LD = @LD@
> +@@ -32,8 +34,15 @@ ifeq ($(MAKECMDGOALS), profile_use)
> +   MPD_LDFLAGS += $(MPD_PUSE)
> + endif
> + 
> ++ifeq ($(BUILD_SHARED),yes)
> ++TARGETS += $(LIBSHARED)
> ++endif
> ++
> ++ifeq ($(BUILD_STATIC),yes)
> ++TARGETS += $(LIBSTATIC)
> ++endif
> + 
> +-default: $(LIBSTATIC) $(LIBSHARED)
> ++default: $(TARGETS)
> + 
> + 
> + OBJS := basearith.o context.o constants.o convolute.o crt.o mpdecimal.o \
> +-- 
> +2.1.0
> +
> diff --git a/package/mpdecimal/mpdecimal.mk b/package/mpdecimal/mpdecimal.mk
> index fc5f855..8257c8d 100644
> --- a/package/mpdecimal/mpdecimal.mk
> +++ b/package/mpdecimal/mpdecimal.mk
> @@ -10,6 +10,7 @@ MPDECIMAL_INSTALL_STAGING = YES
>  MPDECIMAL_LICENSE = BSD-2c
>  MPDECIMAL_LICENSE_FILES = LICENSE.txt
>  MPDECIMAL_CONF_OPTS = LD="$(TARGET_CC)"
> +MPDECIMAL_AUTORECONF = YES
>  
>  # On i386, by default, mpdecimal tries to uses <fenv.h> which is not
>  # available in musl/glibc. So in this case, we tell mpdecimal to use
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain
  2014-11-23 17:56     ` Thomas Petazzoni
@ 2014-11-23 18:03       ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-11-23 18:03 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-11-23 18:56 +0100, Thomas Petazzoni spake thusly:
> On Sun, 23 Nov 2014 18:54:30 +0100, Yann E. MORIN wrote:
> > On 2014-11-23 18:35 +0100, Thomas Petazzoni spake thusly:
> > > The Blackfin toolchain install some libtool .la files, which none of
> > > the other toolchains seem to do,
> > 
> > Well, with my crostool-NG toolchains, I have some, for example:
[--SNIP--]
> What do they contain?

    $ cat ./armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot/lib/libstdc++.la
    # libstdc++.la - a libtool library file
    # Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
    #
    # Please DO NOT delete this file!
    # It is necessary for linking the library.

    # The name that we can dlopen(3).
    dlname='libstdc++.so.6'

    # Names of this library.
    library_names='libstdc++.so.6.0.20 libstdc++.so.6 libstdc++.so'

    # The name of the static archive.
    old_library='libstdc++.a'

    # Linker flags that can not go in dependency_libs.
    inherited_linker_flags=''

    # Libraries that this one depends upon.
    dependency_libs=' -lm'

    # Names of additional weak libraries provided by this library
    weak_library_names=''

    # Version information for libstdc++.
    current=6
    age=0
    revision=20

    # Is this an already installed library?
    installed=yes

    # Should we warn about portability when linking against -modules?
    shouldnotlink=no

    # Files to dlopen/dlpreopen
    dlopen=''
    dlpreopen=''

    # Directory that this library needs to be installed in:
    libdir='/home/ymorin/x-tools/armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/lib'

> At least, with the Blackfin toolchain, for some reason, libtool find it
> smart to append the Buildroot sysroot path with the libdir value found
> in the .la file.

What. Wait, did you say 'libtool' and 'smart' in the same sentence? ;-]

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 3/5] ushare: do not allow building in static lib situations
  2014-11-23 17:36 ` [Buildroot] [PATCH 3/5] ushare: do not allow building in static lib situations Thomas Petazzoni
@ 2014-11-23 18:18   ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-11-23 18:18 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:
> The ushare configure script is a custom shell script, and it is not
> designed to understand that the library order is important when doing
> static linking.
> 
> Fixes:
> 
>   http://autobuild.buildroot.org/results/32e/32ed2a521043f929cc290145c8a651e69042e104/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

However, see below...

> ---
>  package/ushare/Config.in | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/package/ushare/Config.in b/package/ushare/Config.in
> index 981f081..7f817d2 100644
> --- a/package/ushare/Config.in
> +++ b/package/ushare/Config.in
> @@ -4,6 +4,10 @@ config BR2_PACKAGE_USHARE
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp
>  	select BR2_PACKAGE_LIBUPNP
>  	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
> +	# ushare has a completely custom configure script that does
> +	# broken things with library ordering, which breaks static
> +	# linking.
> +	depends on !BR2_PREFER_STATIC_LIB
>  	help
>  	  uShare is a UPnP (TM) A/V & DLNA Media Server.
>  	  It implements the server component that provides UPnP media devices
> @@ -11,5 +15,5 @@ config BR2_PACKAGE_USHARE
>  
>  	  http://ushare.geexbox.org/
>  
> -comment "ushare needs a toolchain w/ largefile, threads"
> -	depends on !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS)
> +comment "ushare needs a toolchain w/ largefile, threads, dynamic library"
> +	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB

This line is now > 80 chars. Maybe it could be split?

Regards,
Yann E. MORIN.

> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 4/5] radvd: switch to new patch naming convention, use Git formatted patches
  2014-11-23 17:36 ` [Buildroot] [PATCH 4/5] radvd: switch to new patch naming convention, use Git formatted patches Thomas Petazzoni
@ 2014-11-23 18:22   ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-11-23 18:22 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:
> This commit renames the radvd patches to follow the new naming
> convention, and reformats them to be Git patches.
> 
> Since the patches are renamed, we adjust the comment in the .mk file
> explaining why we autoreconf the package.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

> ---
>  ...-check-requirement-we-don-t-do-unit-tests.patch | 29 ++++++++++++++++++++++
>  ...-fstack-protector-the-toolchain-might-lac.patch | 27 ++++++++++++++++++++
>  package/radvd/radvd-01-drop-check.patch            | 18 --------------
>  package/radvd/radvd-02-drop-stack-protector.patch  | 15 -----------
>  package/radvd/radvd.mk                             |  2 +-
>  5 files changed, 57 insertions(+), 34 deletions(-)
>  create mode 100644 package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch
>  create mode 100644 package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch
>  delete mode 100644 package/radvd/radvd-01-drop-check.patch
>  delete mode 100644 package/radvd/radvd-02-drop-stack-protector.patch

Did git did not detect a rename? Probaly my ~/.gitconfig is a bit more
lax on the similarity percentage...

Regards,
Yann E. MORIN.

> diff --git a/package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch b/package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch
> new file mode 100644
> index 0000000..0bbbf28
> --- /dev/null
> +++ b/package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch
> @@ -0,0 +1,29 @@
> +From 2074114cef857f95104367c51ac9367082fc8060 Mon Sep 17 00:00:00 2001
> +From: Gustavo Zacarias <gustavo@zacarias.com.ar>
> +Date: Sun, 23 Nov 2014 12:16:32 +0100
> +Subject: [PATCH 1/3] Drop check requirement, we don't do unit tests
> +
> +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +---
> + configure.ac | 4 ----
> + 1 file changed, 4 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 59b18a8..5dde3b2 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -50,10 +50,6 @@ dnl Determine CC and preset CFLAGS
> + AC_PROG_CC_C99
> + AC_PROG_RANLIB
> + 
> +-if test "$arch" = "linux" ; then
> +-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
> +-fi
> +-
> + dnl Determine of netlink is available
> + AC_MSG_CHECKING(netlink)
> + AC_TRY_COMPILE([
> +-- 
> +2.1.0
> +
> diff --git a/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch b/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch
> new file mode 100644
> index 0000000..4476808
> --- /dev/null
> +++ b/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch
> @@ -0,0 +1,27 @@
> +From 324e1ebc7b86f68f49fb4f1c34a4de60d18dd3c1 Mon Sep 17 00:00:00 2001
> +From: Gustavo Zacarias <gustavo@zacarias.com.ar>
> +Date: Sun, 23 Nov 2014 12:17:11 +0100
> +Subject: [PATCH 2/3] Don't force -fstack-protector, the toolchain might lack
> + support for it
> +
> +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +---
> + Makefile.am | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index 80633e7..8b5a2e4 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -43,7 +43,6 @@ DISABLE_WARNINGS = \
> + 
> + AM_CFLAGS = \
> + 	-fno-strict-aliasing \
> +-	-fstack-protector \
> + 	$(ENABLE_WARNINGS) \
> + 	$(DISABLE_WARNINGS)
> + 
> +-- 
> +2.1.0
> +
> diff --git a/package/radvd/radvd-01-drop-check.patch b/package/radvd/radvd-01-drop-check.patch
> deleted file mode 100644
> index 670d5b2..0000000
> --- a/package/radvd/radvd-01-drop-check.patch
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -Drop check requirement, we don't do unit tests.
> -
> -Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> -
> -diff -Nura radvd-2.6.orig/configure.ac radvd-2.6/configure.ac
> ---- radvd-2.6.orig/configure.ac	2014-09-04 15:54:41.735038724 -0300
> -+++ radvd-2.6/configure.ac	2014-09-04 15:54:53.106431815 -0300
> -@@ -50,10 +50,6 @@
> - AC_PROG_CC_C99
> - AC_PROG_RANLIB
> - 
> --if test "$arch" = "linux" ; then
> --PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
> --fi
> --
> - dnl Determine of netlink is available
> - AC_MSG_CHECKING(netlink)
> - AC_TRY_COMPILE([
> diff --git a/package/radvd/radvd-02-drop-stack-protector.patch b/package/radvd/radvd-02-drop-stack-protector.patch
> deleted file mode 100644
> index 532c1b6..0000000
> --- a/package/radvd/radvd-02-drop-stack-protector.patch
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -Don't force -fstack-protector, the toolchain might lack support for it.
> -
> -Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> -
> -diff -Nura radvd-2.1.orig/Makefile.am radvd-2.1/Makefile.am
> ---- radvd-2.1.orig/Makefile.am	2014-07-22 08:23:12.642260069 -0300
> -+++ radvd-2.1/Makefile.am	2014-07-22 08:26:42.651380759 -0300
> -@@ -43,7 +43,6 @@
> - 
> - AM_CFLAGS = \
> - 	-fno-strict-aliasing \
> --	-fstack-protector \
> - 	$(ENABLE_WARNINGS) \
> - 	$(DISABLE_WARNINGS)
> - 
> diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk
> index e0d4f69..bd2086d 100644
> --- a/package/radvd/radvd.mk
> +++ b/package/radvd/radvd.mk
> @@ -9,7 +9,7 @@ RADVD_SOURCE = radvd-$(RADVD_VERSION).tar.xz
>  RADVD_SITE = http://www.litech.org/radvd/dist
>  RADVD_DEPENDENCIES = host-bison flex host-flex host-pkgconf
>  RADVD_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
> -# For radvd-01-drop-check.patch & radvd-02-drop-stack-protector.patch
> +# We're patching configure.ac/Makefile.am.
>  RADVD_AUTORECONF = YES
>  
>  define RADVD_INSTALL_INITSCRIPT
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 5/5] radvd: add a patch to fix build failure on architectures without sysctl()
  2014-11-23 17:36 ` [Buildroot] [PATCH 5/5] radvd: add a patch to fix build failure on architectures without sysctl() Thomas Petazzoni
@ 2014-11-23 18:25   ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-11-23 18:25 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:
> Modern architectures such as ARC do not provide the sysctl() system
> call, since it is deprecated. However, uClibc still installs
> <sys/sysctl.h> in such cases, which defeats radvd check for the
> availability of sysctl(). This commit adds a patch to radvd which
> improves the sysctl() checking.
> 
> Fixes:
> 
>   http://autobuild.buildroot.org/results/458/4581c4220adeaebbf6761e3b923088d8de8522d5/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  ...0003-Improve-check-of-the-sysctl-function.patch | 49 ++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 package/radvd/0003-Improve-check-of-the-sysctl-function.patch
> 
> diff --git a/package/radvd/0003-Improve-check-of-the-sysctl-function.patch b/package/radvd/0003-Improve-check-of-the-sysctl-function.patch
> new file mode 100644
> index 0000000..3053f7b
> --- /dev/null
> +++ b/package/radvd/0003-Improve-check-of-the-sysctl-function.patch
> @@ -0,0 +1,49 @@
> +From 4c86b3cbf52f810615d92835e98d83e9555a4d88 Mon Sep 17 00:00:00 2001
> +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +Date: Sun, 23 Nov 2014 12:13:47 +0100
> +Subject: [PATCH 3/3] Improve check of the sysctl() function
> +
> +Since sysctl is a deprecated system call, new architectures such as
> +ARC don't implement it. In such cases, uClibc installs the
> +<sys/sysctl.h> header, but dos not implement the sysctl()
> +function. This has the annoying side effect of breaking the sysctl
> +detection of radvd, which is purely based on the header file being
> +present.
> +
> +To fix this, this commit adds a check based on the existence of the
> +sysctl() function.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +---
> + configure.ac   | 1 +
> + device-linux.c | 2 +-
> + 2 files changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 5dde3b2..5518f71 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -161,6 +161,7 @@ AC_CHECK_HEADERS( \
> + 	time.h \
> + )
> + AC_HEADER_TIME
> ++AC_CHECK_FUNCS([sysctl])
> + 
> + dnl Checks for typedefs, structures, and compiler characteristics.
> + AC_MSG_CHECKING(whether struct sockaddr_in6 has sin6_scope_id)
> +diff --git a/device-linux.c b/device-linux.c
> +index 1ecaa6b..d9b56b8 100644
> +--- a/device-linux.c
> ++++ b/device-linux.c
> +@@ -183,7 +183,7 @@ int check_ip6_forwarding(void)
> + 		value = -1;
> + 	}
> + 
> +-#ifdef HAVE_SYS_SYSCTL_H
> ++#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
> + 	int forw_sysctl[] = { SYSCTL_IP6_FORWARDING };
> + 	size_t size = sizeof(value);
> + 	if (!fp && sysctl(forw_sysctl, sizeof(forw_sysctl) / sizeof(forw_sysctl[0]), &value, &size, NULL, 0) < 0) {
> +-- 
> +2.1.0
> +
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 0/5] Misc autobuilder fixes
  2014-11-23 17:35 [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2014-11-23 17:36 ` [Buildroot] [PATCH 5/5] radvd: add a patch to fix build failure on architectures without sysctl() Thomas Petazzoni
@ 2014-11-24 21:06 ` Thomas Petazzoni
  5 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2014-11-24 21:06 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Nov 2014 18:35:58 +0100, Thomas Petazzoni wrote:

> Thomas Petazzoni (5):
>   toolchain-external: fix C++ build issues with the Blackfin toolchain

Not applied yet, investigation still on-going.

>   mpdecimal: fix build on pure static library configurations
>   ushare: do not allow building in static lib situations
>   radvd: switch to new patch naming convention, use Git formatted
>     patches
>   radvd: add a patch to fix build failure on architectures without
>     sysctl()

Patches applied. On the ushare patch, I've fixed the too long line
pointed out by Yann.

Thanks Yann for having reviewed the patches!

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

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

end of thread, other threads:[~2014-11-24 21:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-23 17:35 [Buildroot] [PATCH 0/5] Misc autobuilder fixes Thomas Petazzoni
2014-11-23 17:35 ` [Buildroot] [PATCH 1/5] toolchain-external: fix C++ build issues with the Blackfin toolchain Thomas Petazzoni
2014-11-23 17:54   ` Yann E. MORIN
2014-11-23 17:56     ` Thomas Petazzoni
2014-11-23 18:03       ` Yann E. MORIN
2014-11-23 17:36 ` [Buildroot] [PATCH 2/5] mpdecimal: fix build on pure static library configurations Thomas Petazzoni
2014-11-23 18:00   ` Yann E. MORIN
2014-11-23 17:36 ` [Buildroot] [PATCH 3/5] ushare: do not allow building in static lib situations Thomas Petazzoni
2014-11-23 18:18   ` Yann E. MORIN
2014-11-23 17:36 ` [Buildroot] [PATCH 4/5] radvd: switch to new patch naming convention, use Git formatted patches Thomas Petazzoni
2014-11-23 18:22   ` Yann E. MORIN
2014-11-23 17:36 ` [Buildroot] [PATCH 5/5] radvd: add a patch to fix build failure on architectures without sysctl() Thomas Petazzoni
2014-11-23 18:25   ` Yann E. MORIN
2014-11-24 21:06 ` [Buildroot] [PATCH 0/5] Misc autobuilder fixes 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.