As of GCC14 implicit-int has been upgraded to an error. While this is
generally a good idea it trips up some older code (particularly in
autoconf generated configure scripts). Add -Wno-implicit-int to CFLAGS
for glibc when using an old GLIBC with a new GCC.
Fixes#2208
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Versions of GNU make newer than 4.4 trigger a hang in versions of glibc
older than 2.31. In e63c40854c, this was
fixed when the host platform provided make >= 4.4. However, if the
host distro provides only an ancient version of make, crosstool-ng would
still build make 4.4 as a comp tool, which would fail to build glibc.
Extend the previous workaround to build make 4.3 when building old
glibc versions which require it.
See also: #1946
Signed-off-by: Charles Baylis <cbaylis@fishzet.co.uk>
Musl was marked experimental in commit 08d91d41 ("musl: config is broken
for !EXPERIMENTAL"). Most of the reasoning for that change no longer
applies and as it's been about 8 years it's time to let musl loose on
the world. Drop the `depends on EXPERIMENTAL` and update the sample
configs for aarch64 and x86_64.
For powerpc64 the ABI needs to be elfv2. Enforce this via the powerpc
config. Add a sample configuration for powerpc-unknown-linux-musl.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Current glibc versions don't compile without warnings with GCC14.
Disable -Werror for glibc when using GCC14.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Note: The 64-bit target lacks a glibc port and doesn't build. Also,
there is no uclibc support.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
As of glibc-2.38 libcrypt is not built by default. Add an option to
allow building libcrypt support into glibc.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This reverts commit 5427dac45c. The issues
that were causing this have been resolved with some updates so allow the
uclibc+gcc13 combination again.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Versions of GNU make newer than 4.4 trigger a hang in versions of glibc
older than 2.31. As distros update to the newer GNU make version we'll
start seeing more and more reports of this hang. Fortunately we already
carry GNU make as a comp tool so all we need to do is select the right
version when needed.
Fixes#1946, #1932, #1975
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Add the 4.3.0.20230120 and update the required patches. As of this
release the newlib-global-atexit is mandatory so set this to default y.
Included is an upstream patch to support older GCC versions.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
GCC13 picks up some new errors on older glibc versions. Disable -Werror
automatically when these combinations are selected.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Currently uclibc configurations fail to build with GCC13
src/gcc/libstdc++-v3/src/c++17/floating_from_chars.cc: In function 'std::from_chars_result std::from_chars(const char*, const char*, _Float128&, chars_format)':
src/gcc/libstdc++-v3/src/c++17/floating_from_chars.cc:1281:10: error: 'from_chars_strtod' was not declared in this scope
1281 | return from_chars_strtod(first, last, value, fmt);
| ^~~~~~~~~~~~~~~~~
make[6]: *** [Makefile:587: floating_from_chars.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
For now require GCC older than 13 when using uclibc.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
These values are used when constructing the default linker scripts
used with picolibc. Setting reasonable defaults allows simple test
applications to be compiled without additional configuration.
Signed-off-by: Keith Packard <keithp@keithp.com>
This moves the picolibc configuration values under C-library -> picolibc
so that they will be more easily discovered.
Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
Configuring the newlib with "--enable-newlib-nano-formatted-io" and
"--enable-newlib-io-pos-args" would cause built GCC cannot compile some
IO functions like "std::cout".
And I added additional notes at Nano Formatted I/O config.
Signed-off-by: Chen Tao <t.clydechen@gmail.com>
After building the cross toolchain and compile a simple C program,
objdump reports debug information even though -g modifier was not
used. These debug segments are in glibc library and CRT files. So
a new config entry: CT_GLIBC_ENABLE_DEBUG was added to control when
we want to add debug information to glibc, by default is enabled.
Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
Use `depends on` conditions to enable/disable building glibc with
-Werror. Using `depends on` instead of `default if` means that when the
GCC/GLIBC selection changes GLIBC_ENABLE_WERROR will automatically
become n.
Fixes#1729, fixes#1712
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Commit 6d5227b6 ("Remove obsolete glibc 2.12.1") removed supports for
the separate glibc-ports but also removed GLIBC_USE_PORTS_ADDON. Glibc
versions up to 2.20 bundled support from some architectures in the ports
directory so GLIBC_USE_PORTS_ADDON is required to support these older
glibc versions.
Fixes#1736
Signed-off-by: Chris Packham <judge.packham@gmail.com>
glibc 2.12.1 was marked as obsolete. Now that the 1.25.0 release is out
this version can be removed completely. As glibc 2.12.1 was the last
remaining version supported by glibc-ports support for glibc-ports is
also removed.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
The bionic libc support was out of date and relied on downloading
binaries from the internet. It was already marked as obsolete. Now that
the 1.25.0 release is out it can be completely removed.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Newer GCC versions trigger warnings on older GLIBC versions. GLIBC 2.29
is warning free with GCC9. GLIBC 2.31 is warning free with GCC10. GLIBC
2.34 is warning free with GCC11.
Add milestones for 2.31 and 2.34 and use those to set the default value
for GLIBC_ENABLE_WERROR based on the GCC version.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Support for bionic was dropped by GCC some time ago. There are patches
for older GCC versions but those are difficult to maintain and the
version of the android-ndk they support is of little use. Mark all of
the existing bionic support as obsolete so it can be removed after the
next release.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
With libc_headers step before pass-1, there is no need to distinguish
pass-1 and pass-2; they are configured identically (note that with the
current configuration, core pass-2 is only used for win32 - hence, uses
build_libgcc=yes and mode=static).
Signed-off-by: Alexey Neyman <stilor@att.net>
... and the code dependent on them, after the latest wave of obsolete
package removals. This concludes the glorious history of the original
uClibc (non-NG) with lots of kludges removed.
There was a choice here, whether to call the resulting libc "uClibc" or
"uClibc-ng". I opted in favor of giving uClibc-ng the recognition it
deserves, although it had some ripple effect in the ct-ng code.
Signed-off-by: Alexey Neyman <stilor@att.net>
Now that we have a 2-pass build it is no longer necessary to disable
-Werror in glibc.
This partially reverts commits 6ca5f91f ("Disable -Werror for GLIBC for
all ARCH for GCC11."), 215432d3 ("config/libc: Extend glibc 2.32
workaround to include sparc") and 645ee124 ("glibc: Don't build with
-Werror for powerpc64+glibc-2.32").
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Per https://github.com/crosstool-ng/crosstool-ng/issues/808 build static
libgcc in the first pass which lets us skip the second one. Building
mingw-w64 requires header files in order to build C++ support so mingw
builds core pass 2. This could probably be cleaned up by splitting
libc_start_files into a separate libc_header step. But for now having
core 2 for mingw-w64 and core 1 for the other libcs will have to do.
Anything that previously selected CC_CORE_PASSES_NEEDED now selects
CC_CORE_PASS_1_NEEDED. The same goes for CC_CORE_PASS_2_NEEDED with the
exception of mingw-w64.
Fixes#808Fixes#217
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Add a comment that is visible when the python3.4 prerequisite is not met
so that users can tell why they can't select a newer glibc version.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Issue #1535
GCC 10 changed the default to -fno-common, which leads to a linking error in GLibc older than 2.30.
This change adds -fcommon cflag for the target GLibc versions <=2.29 and GCC >=10.
This change also adds additional cflags for the target GLibc to disable
new GCC11 checks that lead to compilation errors.
Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
Make --enable-obsolete-rpc conditional on !GLIBC_2_32_or_later as
it's been removed from that version on.
Fixes: #1505
Fixes: commit 1ee44ab5 ("glibc: --enable-obsolete-rpc has been removed as of 2.32")
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This change replicates what GLIBC 2.23 has in the string/rawmemchr.c:
// #if __GNUC_PREREQ (11, 0)
// /* Likewise GCC 11, with a different warning option. */
// DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
// #endif
With -Werror multiple platforms failing on the string/rawmemchr.c:40 line.
Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
This commit adds support for the following Oracle products, in order
to target Oracle Linux 7.9:
Binutils 2.27-44.base.0.400
GCC 4.8.5-44.0.5
glibc 2.17-317.0.3
UEK5/u4 4.14.35-2025.400.8
Sample configuration files are provides for the following triplets:
arm-ol7u9-linux-gnueabi
arm-ol7u9-linux-gnueabihf
Signed-off-by: Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Make --enable-obsolete-rpc conditional on !CT_GLIBC_2_32_or_later as
it's been removed from that version on.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
When building powerpc64+glibc-2.32 we see the following error:
[ALL ] In file included from ../sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c:26,
[ALL ] from ../sysdeps/powerpc/powerpc64/multiarch/wordcopy-ppc64.c:18:
[ALL ] ../string/wordcopy.c: In function '_wordcopy_fwd_aligned':
[ERROR] ../string/wordcopy.c:98:26: error: 'a1' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[ALL ] 98 | ((op_t *) dstp)[0] = a1;
[ALL ] | ~~~~~~~~~~~~~~~~~~~^~~~
[ALL ] In file included from ../sysdeps/powerpc/powerpc64/power4/../../powerpc32/power4/memcopy.h:38,
[ALL ] from ../sysdeps/powerpc/powerpc64/power4/memcopy.h:1,
[ALL ] from ../string/wordcopy.c:23,
[ALL ] from ../sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c:26,
[ALL ] from ../sysdeps/powerpc/powerpc64/multiarch/wordcopy-ppc64.c:18:
[ALL ] ../string/wordcopy.c: In function '_wordcopy_fwd_dest_aligned':
[ERROR] ../sysdeps/generic/memcopy.h:72:61: error: 'a3' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[ALL ] 72 | #define MERGE(w0, sh_1, w1, sh_2) (((w0) << (sh_1)) | ((w1) >> (sh_2)))
[ALL ] | ^~
This seems to only trigger for powerpc64. Other architectures build
cleanly. For now avoid specifying -Werror for powerpc64+glibc-2.32.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This adds support for using picolibc instead of newlib on embedded
systems.
Signed-off-by: Keith Packard <keithp@keithp.com>
v2:
Add check for meson and ninja
Sync option default values with current picolibc defaults
Remove xtensa sys header file install as those aren't in picolibc
This commit adds support for the newlib configuration option
'--enable-newlib-retargetable-locking'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Fixes: #1210
Per the release notes for the GNU C library 2.28[1] make 4.0 or newer is
required. Previously the logic was applied to glibc 2.29 or newer.
[1] - https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
Signed-off-by: Chris Packham <judge.packham@gmail.com>
- Force building make as a companion tool if host make is older than
4.0 (CentOS 7 currently has 3.82)
- Disable 2.29 as a choice if host python is older than 3.4
(CentOS 7 has 2.6 unless python from EPEL is installed)
- Python2 emits its version information to STDERR. Ugh.
While there, also use the detected host Python for GDB configuration.
Signed-off-by: Alexey Neyman <stilor@att.net>
... while making use of the new tunables.
Also, unmark the moxie-elf as broken: the ld scripts installed by newlib
can be found by the compiler and can link the binaries. Why the default
script is broken is not ct-ng's problem...
Signed-off-by: Alexey Neyman <stilor@att.net>