GCC and Clang are able to check the format arguments given to a
function and warn the user if there is a error in the format arguments
or if there is a potential uncontrolled format string security problem
in the code. GCC does this automatically for some functions like
printf(), but it is also possible to annotate other functions in a way
that it will check them too. This feature is used by glibc for many
functions. This patch adds the attribute to the some functions of musl
expect for these functions where gcc automatically adds it.
GCC automatically adds checks for these functions: printf, fprintf,
sprintf, scanf, fscanf, sscanf, strftime, vprintf, vfprintf and
vsprintf.
The documentation from gcc is here:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
The documentation from Clang is here:
http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 48467
vdso support is available on mips starting with kernel 4.4, see kernel
commit a7f4df4e21 "MIPS: VDSO: Add implementations of gettimeofday()
and clock_gettime()" for details.
These are my micro benchmark results for 1.000.000 calls to
clock_gettime(CLOCK_MONOTONIC, &tp)
without vdso:
root@OpenWrt:/# time ./vdso-test
real 0m 0.95s
user 0m 0.24s
sys 0m 0.70s
with vdso:
root@OpenWrt:/# time /usr/bin/vdso-test
real 0m 0.35s
user 0m 0.34s
sys 0m 0.00s
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 48466
This will make adding future glibc versions easier because the
conditionals won't have to be modified again.
Signed-off-by: Michael Marley <michael@michaelmarley.com>
SVN-Revision: 48399
Fixes: commit f17e56eff5b9 ("gcc: remove version 4.6, it is no longer needed")
CC: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
SVN-Revision: 47965
With bump of upstream GDB from 7.9 to 7.10 at least
100-no_extern_inline.patch became incompatible with
ARC gdb (which is still based on upstream 7.9 branch).
So until ARC support is not completely upstreamed
(which we expect to happen in coming months) we'll need to have
separate patches for ARC gdb.
This time clean build-tested for Netgear WNDRMAC & AXS101.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Cc: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 47491
Current musl reports the peer (remote) address of a point-to-point
interface and does not store the local address at all.
Apply the same special treatment of IFA_LOCAL to musl's getifaddrs() which
is also used in glibc and uclibc.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47488
This includes binutils, gcc, gdb and uClibc-ng.
Latest release of ARC gcc (as of today it is "arc-2015.06")
is based on upstream gcc 4.8.4.
Sources are available on GitHub, see:
https://github.com/foss-for-synopsys-dwc-arc-processors/gcc
Latest release of ARC binutils (as of today it is "arc-2015.06")
is based on upstream binutils 2.23.
Sources are available on GitHub, see:
https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06
Latest release of ARC GDB (as of today this is "arc-2015.06-gdb")
is based on upstream gdb 7.9.1.
Sources are available on GitHub, see:
https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb
Note that for binutils and gdb that come from unified git repository
(which is the case for upstream binutils/gdb today) we need to disable
building of gdb in binutils and binutils in gdb hence in binutils:
------>8------
--disable-sim
--disable-gdb
------>8------
and in gdb:
------>8------
--disable-binutils
--disable-ld
--disable-gas
------>8------
Also in gdb we disable sim because if the following breakage while
building with it:
------------>8------------
/usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \
-mono -fast -pbb -switch sem5-switch.c \
-cpu a5f -infile ./mloop5.in \
-outfile-suffix 5
unknown option: bash
Makefile:699: recipe for target 'stamp-5mloop' failed
make[7]: *** [stamp-5mloop] Error 1
------------>8------------
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Cc: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
SVN-Revision: 47438
2 new architectures were added in between 1.0.6 and 1.0.8 in uClibc-ng,
these are:
* lm32
* or1k
Even thought both are not yet supported in OpenWRT it's important to
disable them both in default config file otherwise user prompt will
appear during uClibc configuration asking to select desired
architecture.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Waldemar Brodkorb <wbx@uclibc-ng.org>
Cc: Mathieu Olivari <mathieu@codeaurora.org>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
SVN-Revision: 47356
This patch fixes corner case in open_memstrem, when stream is created,
but nothing is written.
This case is present in tgtadm, tgtd management tool.
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
SVN-Revision: 47339
Size increase is about 3-4k: this is how big xattr.os in uClibc after stripping is.
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
SVN-Revision: 47271
uClibc-ng is a spin-off of original uClibc, see http://www.uclibc-ng.org/
We try to regularly add changes from uClibc to uClibc-ng.
We even sent patches and bug reports to the uClibc mailing list.
The config file is compatible between uClibc-ng 1.0 and uClibc git master.
This might change in the future.
Our main goal is to provide regularly a stable and tested release
to make embedded system developers happy.
The main advantage of uClibc-ng over olde good uClibc is regular releases
so there's no need to keep tons of patches on top of years old
0.9.33.2
Build-tested for
[1] ARM: Sunxi generic
[2] MIPS: Netgear WNDR3600/3700/3800
Run-tested for [yet out of the tree] Synopsys Designware ARC AXS101.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Waldemar Brodkorb <wbx@uclibc-ng.org>
Cc: Mathieu Olivari <mathieu@codeaurora.org>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
SVN-Revision: 47077
musl fails to build when compiled with gcc on sh3 (GCC target/#67260).
Work it around.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
SVN-Revision: 47012
The Binutils version 2.25.1 was not a Linaro version, but a normal
upstream Binutils version, fix the name.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
SVN-Revision: 46946