With gcc version 6, we get the following error when building logrotate:
logrotate.c: In function 'postrotateSingleLog':
logrotate.c:1784:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (!state->doRotate)
^~
logrotate.c:1787:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (!hasErrors && log->flags & LOG_FLAG_TMPFILENAME) {
^~
This is fixed by grabbing an upstream commit,
6a36c105587b07ad14fc937f3ee6e2eb402621a2. Once this is fixed, we get:
config.c: In function 'strndup':
config.c:87:10: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
if(!s)
^
cc1: all warnings being treated as errors
make[2]: *** [config.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[2]: *** [logrotate.o] Error 1
This is due to logrotate providing its own implementation of
strndup(). We could fix it, but it much better to simply use the one
provided by the C library, by fixing the detection method for strndup
availability. This is done in patch
0002-Use-autoconf-checks-for-strndup-and-asprintf.patch.
Fixes:
http://autobuild.buildroot.net/results/6dc2eb22104076920d77425b1e608ef9b9e01c94/
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
[Thomas: replace fix for the nonnull issue with a different one.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The imx-uuc source code uses fork(), so it can only be compiled and used
on MMU-capable platforms. This commit adds the necessary Config.in
dependencies to express this.
Fixes:
http://autobuild.buildroot.net/results/41602c20d4e6a833e72b507792a28b8db74a5f53/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Since 1273636fc6 applied patches are also
saved.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
On some platforms the command 'top -n1 | head' goes very often into an
infinite loop of SIGABRT and double free()s.
Fix by applying a patch from upstream Busybox.
For a detailed explanation of the bug, see
http://lists.busybox.net/pipermail/busybox/2016-August/084555.html
Thanks to Yann for the help in finding this bug.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
As tinycbor uses fopencookie() which is not available with the Blackfin
ADI external toolchain (UCLIBC_HAS_GLIBC_CUSTOM_STREAMS is not enabled),
add a dependency on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX.
This avoids the following build failure:
src/open_memstream.c: In function ‘open_memstream’:
src/open_memstream.c:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vtable’
src/open_memstream.c:105: error: ‘vtable’ undeclared (first use in this function)
src/open_memstream.c:105: error: (Each undeclared identifier is reported only once
src/open_memstream.c:105: error: for each function it appears in.)
src/open_memstream.c:105: error: expected expression before ‘{’ token
src/open_memstream.c:111: warning: implicit declaration of function ‘fopencookie’
src/open_memstream.c:111: warning: return makes pointer from integer without a cast
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
[Thomas: improve commit message.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
tinycbor 0.3.2 includes the buildroot patch that fixes the installation
with old Makefile used by targets such as blackfin, more details can be
found here: https://patchwork.ozlabs.org/patch/652187
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Latest musl release supports ppc64 architecture (both big endian and
little endian), so this commit adds support for this.
Since musl implements the ELFv2 ABI for both big-endian and
little-endian PowerPC64, we have to force using this ABI on PowerPC64
big endian (normally elfv1 is the default).
Also, only gcc 6.x has the necessary changes to support musl on PowerPC
64, so we restrict the gcc version selection accordingly.
Tested with Qemu for big endian and little endian configurations.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
[Thomas: add comment about the ABI flag in gcc.mk, rework commit log.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The ustr Makefile.in (as introduced by the Debian patch we apply), is
probably not parallel-safe:
402 install: install-opt install-dbg
403
404 install-opt: install-dirs install-opt-lib install-common
405
406 install-dbg: install-dirs install-dbg-lib install-common
407
408 install-opt-lib install-dbg-lib install-common: install-dirs
[--SNIP--]
424 install-opt-lib: $(OPT_LIB_STATIC) $(OPT_LIB_SHARED) ustr.pc
425 @echo Installing files
426 install -m 644 -t $(DESTDIR)$(libdir) $(OPT_LIB_STATIC)
427 install -m 755 -t $(DESTDIR)$(libdir) $(OPT_LIB_SHARED)
428 -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
429 ln -s $(OPT_LIB_SHARED) $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
430 -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
431 ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
432 -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV_BSO)
433 ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV_BSO)
434 $(LDCONFIG) -n $(DESTDIR)$(libdir)
435 install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc
436
437 install-dbg-lib: $(DBG_LIB_STATIC) $(DBG_LIB_SHARED) ustr-debug.pc
438 @echo Installing files
439 install -m 644 -t $(DESTDIR)$(libdir) $(DBG_LIB_STATIC)
440 install -m 755 -t $(DESTDIR)$(libdir) $(DBG_LIB_SHARED)
441 -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
442 ln -s $(DBG_LIB_SHARED) $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
443 -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
444 ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
445 -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV_BSO)
446 ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV_BSO)
447 $(LDCONFIG) -n $(DESTDIR)$(libdir)
448 install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr-debug.pc
As Thomas already noticed [0], the two interesting rules above are not
dependent one on the other, so can be run in parallel. So, while one is
doing its rm'n'ln dance, the other can be running an ldconfig, which has
the side effect of creating the missing symlinks. So, we can see this
sequence:
install-opt-lib: install-dbg-lib:
ldconfig
rm -f .../$(OPT_LIB_SHAREDEV) \
`-> symlink(..., .../$(OPT_LIB_SHAREDEV))
ln -s .../$(OPT_LIB_SHAREDEV)
In this case, ldconfig uses the opportunity-window between the rm and
the ln to create the link; so the ln does not work, as the target
already exist.
We fix that by not running ldconfig at all in Buildroot, we just pass
LDCONFIG=/bin/true .
Fixes (hopefully, since I was not even able to reproduce the failure):
http://autobuild.buildroot.org/?reason=ustr-1.0.4http://autobuild.buildroot.org/results/936/93626f55625ed7900c147bfd79ff7802366639b1/http://autobuild.buildroot.org/results/18b/18b6ec537da9e9055f58a8649c0719dc64df1bcf/
[...]
[0] http://lists.busybox.net/pipermail/buildroot/2016-May/161923.html
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We now always have a sys/cdefs.h, so we can drop this patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We now always have a sys/cdefs.h, so we can drop this patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We now always have a sys/cdefs.h, so we can drop this patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We now always have a sys/cdefs.h, so we can drop this patch.
Renumber remaining patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We now always have a sys/cdefs.h, so we no longer need to patch it out.
Simplify the patch by removing any hunk removing cdefs.h or the use of
__BEGIN_DECLS/__END_DECLS. However, it must be included when macros it
defines are being used.
Also, renumber patches to guarantee ordering (static patch was added
before big-endian one).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We now always have a sys/cdefs.h, so we can drop this patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
rpcbind uses the __P() macro defined in sys/cdefs.h but does not
includes it explicitly, relying on the glibc behaviour to include it
from its own headers.
But this macro does nothing but expands as its argument. In the past,
it did provide support for pre-ANSI compilers that did not support
function prototypes. Those are now gone, and glibc provides this macro
for legacy code.
Patch out the use of __P() altogether.
Fixes:
http://autobuild.buildroot.org/results/346/346c5b562c244ddb039db2f86f71d670a01ed9ce/http://autobuild.buildroot.org/results/d77/d77454265c45539178c008c5d92509c441447675/
and numerous such autobuild failures
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
musl provides neither sys/queue.h nor sys/cdefs.h. Those two headers are
however quite widely used in a lot of packages (though they should at
least not use cdefs.h which is only full of mostly-legacy macros, and
which is mostly an internal header of glibc and was never really meant to
be exposed to, and used by packages).
But we don't live in an ideal world, so a lot of packages break when
those two headers are missing.
We already took care of sys/queue.h with the netbsd-queue package. But
the need for cdefs.h is getting more and more pressing.
We rename the netbsd-queue package into musl-compat-headers, and we
make it install sys/queue.h (from NetBSD) and sys/cdefs.h (a minimalist
one we bundle in Buildroot). We can't use the cdefs.h from NetBSD
because it includes machine-dependent headers; instead we bundle a very
minimalistic one, that covers only what we need.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The cpupower linux tool needs gettext, always (even without locales).
We need to disable NLS, otherwise it tries to compile the .po files.
We also need to pass -lintl, otherwise it forgets to link with it
(because, the world is glibc-only, you did not know? And glibc does not
need we link with -lintl, so why would we? Oh, yes, we also reinvented
our super intelligent one-off Makefile rather than use one of the
standard buildsystems).
Fixes#9181:
CC utils/helpers/sysfs.o
In file included from utils/helpers/amd.c:9:0: ./utils/helpers/helpers.h:13:21: fatal error: libintl.h: No such file or directory
#include <libintl.h>
^
Without NLS=false (yes, we could depend on host-gettext):
MSGFMT po/de.gmo
make[3]: msgfmt: Command not found
Without LDFLAGS=-lintl:
CC cpupower
./utils/cpupower.o: In function `main':
cpupower.c:(.text.startup+0x1a4): undefined reference to `libintl_textdomain'
./utils/idle_monitor/cpupower-monitor.o: In function `list_monitors':
cpupower-monitor.c:(.text+0x5dc): undefined reference to `libintl_gettext'
./utils/cpupower-set.o: In function `cmd_set':
cpupower-set.c:(.text+0x38): undefined reference to `libintl_textdomain'
./utils/cpupower-info.o: In function `cmd_info':
cpupower-info.c:(.text+0x20): undefined reference to `libintl_textdomain'
collect2: error: ld returned 1 exit status
Reported-by: Joergen Pihlflyckt <Jorgen.Pihlflyckt@ajeco.fi>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Joergen Pihlflyckt <Jorgen.Pihlflyckt@ajeco.fi>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The dependency on kernel headers >= 3.14 was added by
b9fa6c00b1 since
librttest requires __NR_sched_setattr and
__NR_sched_getattr syscalls (rt-sched).
But these syscalls have just been added to kernel 4.8 for SH4.
Fixes:
http://autobuild.buildroot.net/results/67fc16366717f34df492683a14ecd23376e23110
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
When used with GCC 6 ABIv4 is used.
Missing this patch leads to numerous runtime errors.
The patch has already been accepted in uclibc-ng:
http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3e40f9669279f005f7154892539166f5081fbcb2
So the patch should be removed after update to a new version of uclibc-ng.
Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Elfutils program names collide with binutils' binaries. By default
applications provided by elfutils are prefixed with "eu-", but in
Buildroot that setting is overridden by pkg-autotools.
The option in pkg-autotools rules was added to avoid including a target
triple in some packages as a prefix, so restore elfutils default
behaviour by adding a "eu-" program-prefix.
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: add comment in the .mk file explaining why we have a custom
program prefix, as suggested by Arnout.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Since [1] <package>-reconfigure target is broken.
$ make elementary-reconfigure
Applying buildroot-libtool-v2.4.4.patch using patch:
Error: duplicate filename 'buildroot-libtool-v2.4.4.patch'
Conflicting files are:
already applied: buildroot/support/libtool/buildroot-libtool-v2.4.4.patch
to be applied : buildroot/support/libtool/buildroot-libtool-v2.4.4.patch
When a package uses AUTORECONF, the libtool patch can be applied a
second time on the same ltmain.sh in the same directory as the
<package>-reconfigure target is called. This is not a problem since
autoreconf will overwrite the previously patched files. But with the
check introduced by [1], apply-patches.sh throw an error when the
package is reconfigured since the libtool patch is already present in
.applied_patches_list.
In addition to this, the .applied_patches_list file generated by
apply-patches.sh while patching ltmain.sh is not in the top-level
package source directory. Instead a duplicated .applied_patches_list
is generated beside the patched ltmain.sh which can be in a
subdirectory.
As noticed by Arnout Vandecappelle [2], the apply-patches.sh script
doesn't bring anything for the libtool patches.
"apply_patches.sh does the following:
* It handles directories -> not needed here.
* It handles compressed patches and tarballs -> not needed.
* It handles series files -> not needed.
* It handles errors in case of multiple patches -> not needed since
it's only one patch.
* It detects errors based on *.rej files -> not needed since it's only
a single patch so patch exit code is OK.
* It writes the patch list -> for libtool, this is quite silly because
it will be written in the directory where ltmain.sh is found, not in the
top-level directory, so you have these patch lists spread over the
source tree."
So use patch directly rather than apply-patches.
[1] 1924159814
[2] http://lists.busybox.net/pipermail/buildroot/2016-August/169810.html
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
It uses PTHREAD_PRIO_INHERIT, which isn't available in Linuxthreads.
Fixes:
http://autobuild.buildroot.net/results/455465c332d291929c1612d18a9e7448d9c76e73/
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
[Thomas: drop comment about the NPTL dependency being related to
alsa-lib, as it's not the case. Suggested by Baruch.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
When available, libconfuse will use the libintl provided by the gettext
package.
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
[Thomas: make it really an optional dependency.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fixes:
CVE-2016-6489 - RSA code is vulnerable to cache sharing related attacks.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
check and valgrind are optional depenencies of lldpd, so we must depend
on them when either is enabled.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This change enforces the CMAKE_SYSROOT value set in the toolchainfile.cmake.
This fix overrides the CMake heuristics used to guess it, and turns off some
non-desirable behavior adding "-isystem ..." flags to the compiler command
line, misleading the compiler and making the build failed due to some
unfound standard headers.
Fixes:
http://autobuild.buildroot.net/results/f7e/f7e92678e91a6cb15ccf32d4a7d75b39f49d6000/defconfig
(and others)
Cc: Ben Boeckel <mathstuf@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fixes CVE-2016-6313: An attacker who obtains 580 bytes from the standard RNG
can trivially predict the next 20 bytes of output.
Add cryptographically secure sha256 hash.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fixes CVE-2016-6316: Bug in the mixing functions of Libgcrypt's random number
generator. An attacker who obtains 4640 bits from the RNG can trivially
predict the next 160 bits of output.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
In configure script there are some tests that are looking for
a suitable compiler. For this purpose script tries to compile
and link some C++ code that is hardcoded in the body of script.
The problem is that only linker flags ($LDFLAGS) are passed to the
compiler when the script is compiling test code. Therefore some
necessary command line options can be lost and this would lead to
errors.
This exactly happens to ARC:
1. -matomic option is lost as it compiler option,
2. test code compilation fails,
3. the script decides not to use arc-buildroot-linux-uclibc-g++,
4. scipt checks host compiler (x86_64-linux-gnu-g++ in your case),
5. package is being built for x86_64, not for ARC.
About last 2 steps - I don't know why configure script should try
to build stella for host machine. As for me an error should be
raised and a build should be stopped. But this is up to stella
developers.
Current patch adds compiler options ($CXXFLAGS) when compiling
test code in configure script.
Fixes stella build for ARC, e. g.:
http://autobuild.buildroot.net/results/c23/c23d655137b1c1825b1da69b18307c6a1d4b23b8//
[Peter: s/CPPFLAGS/CXXFLAGS/]
Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Greg Ungerer fixed recently a bug in the Linux kernel, which
allows to use one memory region again.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>