Skip to contentSkip to conversation

Misc autobuilder fixes

PATCH New Thomas Petazzoni 2 participants 14 messages Nov 23, 2014 – Nov 24, 2014

lore
Share & tools
lore
#0 lore raw

cover Misc autobuilder fixes

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
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/5 toolchain-external: fix C++ build issues with the Blackfin toolchain

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.

---
 toolchain/toolchain-external/toolchain-external.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
toolchain/toolchain-external/toolchain-external.mk +9 -0
index da3718c..72acb41 100644
@@ -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) ; \
Signature · 1 line
2.1.0
#2 lore raw

PATCH 1/5 toolchain-external: fix C++ build issues with the Blackfin toolchain

On 2014-11-23 18:35 +0100, Thomas Petazzoni spake thusly:

Quoted 2 lines

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.

Quoted 61 lines

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.

---
 toolchain/toolchain-external/toolchain-external.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
toolchain/toolchain-external/toolchain-external.mk +9 -0
index da3718c..72acb41 100644
@@ -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) ; \
Signature · 6 lines
2.1.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/5 toolchain-external: fix C++ build issues with the Blackfin toolchain

Dear Yann E. MORIN,

Quoted 22 lines · Yann E. MORIN

On 2014-11-23 18:35 +0100, Thomas Petazzoni spake thusly:

Quoted 2 lines

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
Quoted 1 line

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/5 toolchain-external: fix C++ build issues with the Blackfin toolchain

Thomas, All,

On 2014-11-23 18:56 +0100, Thomas Petazzoni spake thusly:

Quoted 6 lines · Yann E. MORIN
Quoted 5 lines

On 2014-11-23 18:35 +0100, Thomas Petazzoni spake thusly:

Quoted 2 lines

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--]

Quoted 1 line

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'

Quoted 3 lines

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 2/5 mpdecimal: fix build on pure static library configurations

In reply to Thomas Petazzoni

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/

---
 ...-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
package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch new file +101 -0
new file mode 100644
index 0000000..630bbd6
@@ -0,0 +1,101 @@
+From c349964887901848fb4cd5db53a5bcb6dae27aaa Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+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 <[email protected]>
+---
+ 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
+
package/mpdecimal/mpdecimal.mk +1 -0
index fc5f855..8257c8d 100644
@@ -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
Signature · 1 line
2.1.0
#6 lore raw

PATCH 2/5 mpdecimal: fix build on pure static library configurations

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:

Quoted 10 lines

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/

Regards,
Yann E. MORIN.

Quoted 132 lines
---
 ...-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
package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch new file +101 -0
new file mode 100644
index 0000000..630bbd6
@@ -0,0 +1,101 @@
+From c349964887901848fb4cd5db53a5bcb6dae27aaa Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+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 <[email protected]>
+---
+ 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
+
package/mpdecimal/mpdecimal.mk +1 -0
index fc5f855..8257c8d 100644
@@ -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
Signature · 6 lines
2.1.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 3/5 ushare: do not allow building in static lib situations

In reply to Thomas Petazzoni

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/

---
 package/ushare/Config.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
package/ushare/Config.in +6 -2
index 981f081..7f817d2 100644
@@ -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
Signature · 1 line
2.1.0
#8 lore raw

PATCH 3/5 ushare: do not allow building in static lib situations

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:

Quoted 9 lines

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/

However, see below...

Quoted 20 lines
---
 package/ushare/Config.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
package/ushare/Config.in +4 -0
index 981f081..7f817d2 100644
@@ -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

package/ushare/Config.in config BR2_PACKAGE_USHARE · line 19

Quoted 7 lines
package/ushare/Config.in +2 -2
@@ -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.

Quoted 7 lines
Signature · 6 lines
2.1.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH 4/5 radvd: switch to new patch naming convention, use Git formatted patches

In reply to Thomas Petazzoni

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.

---
 ...-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
package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch new file +29 -0
new file mode 100644
index 0000000..0bbbf28
@@ -0,0 +1,29 @@
+From 2074114cef857f95104367c51ac9367082fc8060 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>
+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 <[email protected]>
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ 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
+
package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch new file +27 -0
new file mode 100644
index 0000000..4476808
@@ -0,0 +1,27 @@
+From 324e1ebc7b86f68f49fb4f1c34a4de60d18dd3c1 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>
+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 <[email protected]>
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ 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
+
package/radvd/radvd-01-drop-check.patch deleted +0 -18
deleted file mode 100644
index 670d5b2..0000000
@@ -1,18 +0,0 @@
-Drop check requirement, we don't do unit tests.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-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([
package/radvd/radvd-02-drop-stack-protector.patch deleted +0 -15
deleted file mode 100644
index 532c1b6..0000000
@@ -1,15 +0,0 @@
-Don't force -fstack-protector, the toolchain might lack support for it.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-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)
- 
package/radvd/radvd.mk +1 -1
index e0d4f69..bd2086d 100644
@@ -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
Signature · 1 line
2.1.0
#10 lore raw

PATCH 4/5 radvd: switch to new patch naming convention, use Git formatted patches

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:

Quoted 7 lines

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.

Quoted 11 lines
---
 ...-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.

Quoted 133 lines
package/radvd/0001-Drop-check-requirement-we-don-t-do-unit-tests.patch new file +29 -0
new file mode 100644
index 0000000..0bbbf28
@@ -0,0 +1,29 @@
+From 2074114cef857f95104367c51ac9367082fc8060 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>
+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 <[email protected]>
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ 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
+
package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch new file +27 -0
new file mode 100644
index 0000000..4476808
@@ -0,0 +1,27 @@
+From 324e1ebc7b86f68f49fb4f1c34a4de60d18dd3c1 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>
+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 <[email protected]>
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ 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
+
package/radvd/radvd-01-drop-check.patch deleted +0 -18
deleted file mode 100644
index 670d5b2..0000000
@@ -1,18 +0,0 @@
-Drop check requirement, we don't do unit tests.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-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([
package/radvd/radvd-02-drop-stack-protector.patch deleted +0 -15
deleted file mode 100644
index 532c1b6..0000000
@@ -1,15 +0,0 @@
-Don't force -fstack-protector, the toolchain might lack support for it.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-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)
- 
package/radvd/radvd.mk +1 -1
index e0d4f69..bd2086d 100644
@@ -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
Signature · 6 lines
2.1.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH 5/5 radvd: add a patch to fix build failure on architectures without sysctl()

In reply to Thomas Petazzoni

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/

---
 ...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
package/radvd/0003-Improve-check-of-the-sysctl-function.patch new file +49 -0
new file mode 100644
index 0000000..3053f7b
@@ -0,0 +1,49 @@
+From 4c86b3cbf52f810615d92835e98d83e9555a4d88 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+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 <[email protected]>
+---
+ 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
+
Signature · 1 line
2.1.0
#12 lore raw

PATCH 5/5 radvd: add a patch to fix build failure on architectures without sysctl()

Thomas, All,

On 2014-11-23 18:36 +0100, Thomas Petazzoni spake thusly:

Quoted 11 lines

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/

Regards,
Yann E. MORIN.

Quoted 67 lines
---
 ...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
package/radvd/0003-Improve-check-of-the-sysctl-function.patch new file +49 -0
new file mode 100644
index 0000000..3053f7b
@@ -0,0 +1,49 @@
+From 4c86b3cbf52f810615d92835e98d83e9555a4d88 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+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 <[email protected]>
+---
+ 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
+
Signature · 6 lines
2.1.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

cover Misc autobuilder fixes

In reply to Thomas Petazzoni

Hello,

Quoted 2 lines · Thomas Petazzoni

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

Not applied yet, investigation still on-going.

Quoted 6 lines

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

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