381 Commits

Author SHA1 Message Date
Bernhard Reutner-Fischer
6687fc9276 buildsys: shorten abi dep-file names
certain crypto-layers encode required information in the
filename hence crippling NAME_MAX from 255 down to about 143
ascii chars.

Since the dependency files of libgcc_eh and libsupc encode the full
path to the corresponding libraries, the names of the dep files can
get quite large. Shorten them by some (arbitrary, short) hash.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2020-06-04 10:56:04 +02:00
Rosen Penev
cbaa5bd24d uClibc++: Make long long available to C++11
C++11 makes long long available. It is no longer a GNU extension.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-10-04 12:37:51 +02:00
Rosen Penev
3791a7b3b5 cstdio: Add undef for four functions
When compiling with uClibc-ng, these functions get defined as macros and
become unavailable for std.

Fixes programs that use the std versions of these functions.

This matches libstdcpp behavior.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-10-04 12:36:31 +02:00
Rosen Penev
c3ee60eca9 include: Replace C style casts with static_cast
Found with Clang's -Wold-style-cast

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-10-04 12:33:43 +02:00
Rosen Penev
3523d9461c include: Switch if to ifdef
Throws -Wundef warning in modern compilers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-10-04 12:32:54 +02:00
Rosen Penev
0dd45c2d76 iterator: Add missing parentheses
Clang warns:

warning: '&&' within '||' [-Wlogical-op-parentheses]
return sbuf == b.sbuf || is_eof() && b.is_eof();

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-10-04 12:31:46 +02:00
Rosen Penev
c165aee71f include: Remove unnecessary semicolons
Discovered with clang's -Wextra-semi

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-10-04 12:30:52 +02:00
Bernhard Reutner-Fischer
75186445c1 bump version to 0.2.6-git
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-04-06 17:37:09 +02:00
Bernhard Reutner-Fischer
6ff572f21e release 0.2.5
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
v0.2.5
2019-04-06 17:12:27 +02:00
Bernhard Reutner-Fischer
91be5a91ea tests: vector: silence -Wtautological-compare
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-04-06 14:32:15 +02:00
Bernhard Reutner-Fischer
a52285d2f1 wrapper: Fix handling arguments with spaces
g++-uc -DFOO="BAR BAZ" was not working properly.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-04-06 10:46:19 +02:00
Bernhard Reutner-Fischer
62238938ef ChangeLog: add recent items
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-04-05 12:06:25 +02:00
Rosen Penev
ca0176cce7 istream: Change mismatching float variable
Everywhere else in the file floats and doubles use an f variable.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-04-04 17:13:59 +02:00
Rosen Penev
b09ac05b68 stream: Add support for 64-bit integers
Many programs like gptfdisk or powertop try to use 64-bit integers with
streams. This adds support for them.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2019-04-04 16:59:48 +02:00
Bernhard Reutner-Fischer
698c84170e buildsys: fix typo around strip
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-08 18:56:34 +02:00
Bernhard Reutner-Fischer
3ee2e8c6ca buildsys: allow to pass in LDFLAGS
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-05 19:03:49 +02:00
Ben Kelly
da23783634 Fix erase() on derived __base_associative
When calling erase() on a containers derived from __base_associative
(e.g. multimap) and providing a pair of iterators a segfault will
occur.

Example code to reproduce:

	typedef std::multimap<int, int> testmap;
	testmap t;
	t.insert(std::pair<int, int>(1, 1));
	t.insert(std::pair<int, int>(2, 1));
	t.insert(std::pair<int, int>(3, 1));
	t.erase(t.begin(), t.end());

Signed-off-by: Ben Kelly <ben@benjii.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-05 16:03:24 +02:00
Bernhard Reutner-Fischer
e70370f315 buildsys: fix make V=2 install
need to call disp_install, not just expand it..

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-05 12:53:31 +02:00
Bernhard Reutner-Fischer
9166d27c6e include: remove CRLF line endings
no code changes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-05 10:53:59 +02:00
Bernhard Reutner-Fischer
6c800ded59 ChangeLog: add recent items
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-05 10:50:49 +02:00
Bernhard Reutner-Fischer
e3c783264d *: silence some warnings
in c++-98 mode as well as in c++-11 mode

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-03 17:28:40 +02:00
Bernhard Reutner-Fischer
f1f6d566c9 *: silence c++11 dynamic exception specification deprecation
warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-03 17:28:35 +02:00
Bernhard Reutner-Fischer
f7257ac41d tests: tweak utilitytest
in c++-11 and later, pair's move constructor makes d deleted so cannot
be used.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-03 17:28:31 +02:00
Bernhard Reutner-Fischer
8f6e975d03 tests: tweak algotest
Fix sort() test comparator template argument scope

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-03 17:28:12 +02:00
Bernhard Reutner-Fischer
68deb62883 buildsys: Do not strip library if DODEBUG
The logic was backwards, stripped for debug, did not strip if debug

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-01 19:51:04 +02:00
Bernhard Reutner-Fischer
f604b35ce2 .gitignore: ignore include/bits
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-01 17:46:30 +02:00
Bernhard Reutner-Fischer
26cf67ef53 cstdio: conditionalize tmpnam
GCC added a configure check for tmpnam() in
e1150b06d0409baf4b71121be0cafeab180f2858 (a.k.a svn r207009)

POSIX.1-2008 (SUSv4) marks tmpnam() as obsolescent. As such it is not
available in uClibc unless SUSv4 legacy stuff is enabled.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-10-01 17:46:08 +02:00
Bernhard Reutner-Fischer
c2fd3e7bac list: fix splice to empty list from other.begin()
Fixes bug 11361

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2018-09-30 20:42:31 +02:00
Bernhard Reutner-Fischer
2b58f77ee2 add refcounted exceptions
Fixes bugzilla #8741

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-09-23 16:00:14 +02:00
Bernhard Reutner-Fischer
e2bc49d576 tests: Allow to run tests via a simulator
SIM="my-simulator --param foo" make check

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-09-23 15:50:00 +02:00
Bernhard Reutner-Fischer
adb1d35582 algorithm: Fix decl of stable_sort
Moritz Warning reported that stable_sort needs to be declared before sort.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-09-23 15:49:54 +02:00
Bernhard Reutner-Fischer
26deb1776d string: assign(): fix two bugs
std::string a.assign(10, '+');
did not work (now checkAssignFillChar).

assign(iterator::begin(), iterator::end()) relied on permissive
(checkAssignIterator).

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-03-07 02:05:50 +01:00
Bernhard Reutner-Fischer
d841ce2fdf istream, ostream: Fix building with g++ >= 5
include/ostream:298:50: error: default argument for template parameter for class enclosing ‘class std::basic_ostream<charT, traits>::sentry’
include/istream:343:107: error: default argument for template parameter for class enclosing ‘class std::basic_istream<charT, traits>::sentry’

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-03-06 00:33:24 +01:00
Bernhard Reutner-Fischer
288302797b C++14 sized allocation
Fixes linking with gcc-6.0

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-03-06 00:28:56 +01:00
Bernhard Reutner-Fischer
86d442a589 cstdio: gets was removed from C11, LWG 2249
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-03-06 00:20:12 +01:00
Bernhard Reutner-Fischer
5e90212ff2 buildsys: check CXXFLAGS with CXX compiler
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-03-06 00:20:12 +01:00
Bernhard Reutner-Fischer
29ac958678 buildsys: avoid superfluous rebuilds with make-4.1
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-03-06 00:20:05 +01:00
Bernhard Reutner-Fischer
c731e85714 buildsys: tidy realclean
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2016-03-05 20:28:52 +01:00
Bernhard Reutner-Fischer
868109383c tests: diff testoutput as binary
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-07-03 11:18:36 +02:00
Per Øyvind Karlsen
7c90261eb9 iostream: fix string getline to set noskipws
Signed-off-by: Per Øyvind Karlsen <proyvind@moondrake.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-01 16:22:32 +02:00
Per Øyvind Karlsen
0b09938d5d istream: add missing operator >> implementation
Signed-off-by: Per Øyvind Karlsen <proyvind@moondrake.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-01 16:13:52 +02:00
Bernhard Reutner-Fischer
46f0c32b25 tests/valarray: reduce precision
Print reduced precision for long double tests to avoid noise imposed by
different math implementations in libc's.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-01 16:05:27 +02:00
Bernhard Reutner-Fischer
0422e53160 buildsys: prettify V=1 2013-07-26 12:57:16 +02:00
Bernhard Reutner-Fischer
57e3652aec string: Silence warning
include/string:85:3: warning: ordered comparison of pointer with integer
zero [-Wextra]

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-07-19 12:58:28 +02:00
Bernhard Reutner-Fischer
03028c2b51 buildsys: restructure
Restructure the buildsys in order to add proper dependencies.
- no superfluous re-linking with 'make;make;'
- proper relinking with 'make CXX=g++-4.8.mine;make CXX=g++-4.7'

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-08 21:22:49 +01:00
Bernhard Reutner-Fischer
6f69d33c05 buildsys: prevent make from searching for .config
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-08 12:38:55 +01:00
Bernhard Reutner-Fischer
afec012791 buildsys: tweak WARNINGS config name
uClibc uses WARNINGS too so use UCLIBCXX_WARNINGS here to avoid
redefinition warnings on setups using both libs.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-18 10:25:16 +02:00
Bernhard Reutner-Fischer
8100f081cc basic_definitions: avoid redefinition warnings
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-18 10:21:27 +02:00
Felix Fietkau
cf73cb907c unwind: Fix ARM EABI build failure
uClibc++ current does not build using an ARM EABI toolchain with the
following build failure:
eh_alloc.cpp
In file included from ../include/basic_definitions:21:0,
                 from ../include/cstdlib:20,
                 from eh_alloc.cpp:20:
../include/system_configuration.h:17:0: warning: "__WARNINGS__" redefined [enabled by default]
/opt/toolchains/armeabi-uclibc-std-0.9.30.2-gcc-4.6.0-binutils-2.20.1/arm-linux-uclibcgnueabi/sysroot/usr/include/bits/uClibc_config.h:223:0: note: this is the location of the previous definition
In file included from eh_alloc.cpp:25:0:
../include/unwind-cxx.h:176:36: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:177:36: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:178:35: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:179:41: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:180:40: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:181:39: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:182:38: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:183:37: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
make[1]: *** [eh_alloc.o] Error 1
make[1]: Leaving directory `/home/florian/dev/uclibcxx/uClibc++/src'

Workaround this by direclty using the string "GNUCC++".

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-14 13:02:14 +02:00
Bernhard Reutner-Fischer
531d6f7a04 buildsys: fix setting MAKE
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-31 17:49:10 +02:00