Fixes: #887
On some systems the file command identifies a pie executable as a shared
object. Update do_finish() to handle this case so that they are stripped
as well.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
From GCC's standpoint ARC's multilib items are defined by "mcpu" values
which we have quite a few and for all of them might be built optimized
cross-toolchain.
From Glibc's standpoint multilib is just multi-ABI [1] and so very limited
versions are supposed to co-exist (e.g. arc700 & archs).
Here we force Glibc to install libraries in GCC's multilib folder to create
a universal cross-toolchain that has libs optimized for multiple CPU types.
But note we only need to mess with installation paths in case of real
multilib, otherwise we keep default "lib/" paths so that GCC finds default
(the one and only) libs where it expects them to be.
Also here we add a sample which allows to build universal Glibc Linux
toolchain for ARC.
[1] https://sourceware.org/ml/libc-alpha/2019-06/msg00018.html
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
... resulted in an attempt to build libinproctrace.so whenever any
of the {gdbserver, native gdb} was enabled.
Signed-off-by: Alexey Neyman <stilor@att.net>
uclibc_backend_once tries to build dummy shared libraries regardless of
whether shared libraries support for target is enabled or not, resulting
in build failure in noMMU bFLT configuration.
Only build dummy shared libraries when shared library support for target
is enabled.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
scripts/build/kernel/linux.sh only provides suffix to known
architectures when building toolchain targeting noMMU linux.
Add support for xtensa and assign uclinux suffix to it.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
... when it is compiled without the native GDB.
Also, fix the gdbserver to be installed without a program prefix in this
case, as it was before the unification of the GDB backend.
Signed-off-by: Alexey Neyman <stilor@att.net>
- 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>
This fixes following build error on Debian 9:
configure: error: Your local docbook2man was found to work with SGML rather
than XML. Please install docbook2X and use variable DOCBOOK_TO_MAN to point
configure to command docbook2x-man of docbook2X.
Or use DOCBOOK_TO_MAN="xmlto man --skip-validation" if you have xmlto around.
You can also configure using --without-docbook if you can do without a man
page for xmlwf.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
uClibc-ng 1.0.31 enabled FDPIC as an option for ARM/no-MMU
configurations and defaults to that option if not set explicitly.
Signed-off-by: Alexey Neyman <stilor@att.net>
... in the backend function with ${CFLAGS_FOR_HOST}. The caller either
supplies them already, or (in case of pass-1/2 of the canadian cross)
passes ${CFLAGS_FOR_BUILD} there.
Signed-off-by: Alexey Neyman <stilor@att.net>
Otherwise, glibc 2.29 tries to use it - but we haven't built libstdc++ yet.
We really need to implement #808... Until now, pass empty CXX to make.
Signed-off-by: Alexey Neyman <stilor@att.net>
... by filtering the messages that contain a *word* "warning" or
"error", i.e. is preceded by a space or is at the beginning of the line.
This improves the output from new uClibc-ng releases - which produce a
warning about an unused label, `mprot_error`.
Signed-off-by: Alexey Neyman <stilor@att.net>
- Switch to two-pass reading of the config file to track both (a) the
option's value and (b) if the option has been explicitly called out in
the .config being processed.
- Split off per-version functions into separate files.
- Add a README with some guidelines on writing new upgrade scripts.
Signed-off-by: Alexey Neyman <stilor@att.net>
... coverage not complete, but pretty diverse and covers most
non-trivial conversions. PRs with better coverage for 1.23.o options
welcome.
Signed-off-by: Alexey Neyman <stilor@att.net>
Slightly rework config version detector to catch the case where neither
CONFIG_VERSION/CONFIG_VERSION_CURRENT is defined in the config file.
Add olddefconfig and use it after the upgrade.
Signed-off-by: Alexey Neyman <stilor@att.net>
... which, after a recent change, is not reflected into CT_ALL_TARGET_CFLAGS
for non-multilib configurations.
Signed-off-by: Alexey Neyman <stilor@att.net>
... parts of the config tuple. While here, remove parts that are
setting portions of the target tuple to a value that's already
the default.
Signed-off-by: Alexey Neyman <stilor@att.net>
... in uClibc and glibc.
Fixes#681.
While here, relocate additional "sources" for uClibc/binutils into packages/
directory.
Signed-off-by: Alexey Neyman <stilor@att.net>
This required some rework of the libc selection, as moxiebox is a layer on
top of another libc - newlib.
Also, moxiebox'es host VM (`sandbox`) needs a libcrypto on the host. We will
not have it if we're cross-compiling a canadian cross. Fortunately, all moxiebox
needs from libcrypto is SHA256, and it already includes a standalone implementation
of SHA256 in its runtime. Provide a little wrapper that allows moxiebox use
that implementation for the host binary, too.
Also, automate collecting/printing the list of all packages in a given category
(e.g. LIBC or COMP_TOOLS), generate a list of all Kconfig symbols for a given
category.
Signed-off-by: Alexey Neyman <stilor@att.net>
... for ct-ng configured without --enable-local. Also, install
licenses in subdirectories of the components.
Also, ct-ng configured with --enable-local removed the scripts directory
upon `ct-ng distclean`.
Also, misspelled CT_WGET/CT_CURL variables prevented use of
`ct-ng updatetools`.
Fixes#1091.
Signed-off-by: Alexey Neyman <stilor@att.net>
... and use that ability to permanently set CTNG_LD_IS in case gold is default linker
and we're building glibc.
Fixes#988. This was a long-standing breakage in crosstool-NG (at least since it began
to run each step in a sub-shell).
Signed-off-by: Alexey Neyman <stilor@att.net>
The function is called from a conditional and therefore, the CT_OnError
handler is not invoked on failures. Need to return an error and check
for the error return in the caller.
Also, while here, fix the issue that was causing the failure -
move can fail if it crosses a filesystem, so fall back to 'cp+rm' in
that case.
Signed-off-by: Alexey Neyman <stilor@att.net>
It should be possible if fetching a tag/branch, and it may be possible
if fetching a changeset if a server is configured to allow it.
Fixes#986
Signed-off-by: Alexey Neyman <stilor@att.net>
There is a subtle difference when executable bit is a part of the umask.
And at least some versions (Debian/stretch) fail if the resulting mode
would've been different if not for the umask setting.
Fixes#998.
Although, with such chmods/umasks it is likely that some package installation
will break anyway. But I'll leave it until somebody complains.
Signed-off-by: Alexey Neyman <stilor@att.net>
It is much, much better to *first* make the directory writable and *then*
do a test for case-sensitivity (which requires writing in that directory).
Fixes#1033.
Signed-off-by: Alexey Neyman <stilor@att.net>
Modify CT_TARGET_CFLAGS (which are passed to GCC's FOR_TARGET flags) rather
than CT_ALL_TARGET_CFLAGS.
Fixes#1006.
Signed-off-by: Alexey Neyman <stilor@att.net>
They're written in ARM dialect, and `ldmia r14, {r14, pc}` is not accepted in T2
encoding. GCC8 changed the list of multilibs for arm-*, which now includes a
variant with CPU that supports T2 but not A1 encoding.
Signed-off-by: Alexey Neyman <stilor@att.net>
In case we build for ARC core which has no support of atomic ops among
other things we need to configure libc to use Linux kernel helper to emulate
HS atomic ops. This is done with disabling of CONFIG_ARC_HAS_ATOMICS in uClibc.
Currently we __remove__ this option from .config but this makes no sense as
its default state is "y" so we need to explicitly disable it instead.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Synopsys' DesignWare ARC Processors are a family of 32-bit CPUs
that SoC designers can optimize for a wide range of uses,
from deeply embedded to high-performance host applications in a variety
of market segments.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
- Incompatible function type for ifunc alias
- Multiple statements macro expansion in strftime
- if_nametoindex size checking
Signed-off-by: Alexey Neyman <stilor@att.net>
... in the corresponding /lib directory. Mingw-w64 installs it to /bin,
so multiple variants in a multilib configuration override each other.
Signed-off-by: Alexey Neyman <stilor@att.net>
... which now defaults to --enable-mpers=yes, which attempts to
invoke aarch64-*-gcc with -m32 and fails.
Signed-off-by: Alexey Neyman <stilor@att.net>
... see the comment for the reason. Defer aborting until the result of
CT_Mirrors is actually used (if it is used).
Signed-off-by: Alexey Neyman <stilor@att.net>
This fixes gccs LIMITS_H_TEST detection for baremetal targets
so limits.h will be installed correctly.
Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
- Update to 20180129
- Throw in --disable-db-install if database is disabled; otherwise
'make install' tries to run tic which is not built.
- Select appropriate strip utility for the host; otherwise non-x86
architectures fail to install (unless --disable-stripping is also
added)
Signed-off-by: Alexey Neyman <stilor@att.net>
These changes mainly fix static linking errors when building static
native gdb and gdbserver (tested with gcc 7.2.0 + uClibc-ng 1.0.27 +
binutils 2.29.1 for MIPS):
[ALL ] .../lib/libstdc++.a(eh_throw.o): In function `__cxa_throw':
[ALL ] (.text.__cxa_throw+0x64): undefined reference to `_Unwind_RaiseException'
[ALL ] (.text.__cxa_throw+0x6c): undefined reference to `_Unwind_RaiseException'
[ALL ] .../lib/libstdc++.a(eh_throw.o): In function `__cxa_rethrow':
[ALL ] (.text.__cxa_rethrow+0x78): undefined reference to `_Unwind_Resume_or_Rethrow'
[ALL ] (.text.__cxa_rethrow+0x80): undefined reference to `_Unwind_Resume_or_Rethrow'
...
The problem is in mixing of CPP, CC, CXX, and LD with CPPFLAGS, CFLAGS,
CXXFLAGS, and LDFLAGS before passing to configure scripts.
gcc is sensitive to argument order and the scripts are normally responsible
to combine the variables in a proper way.
Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
This allows us to include the component-to-package relation in the
generated kconfig files and make use of that information in the
show-config.sh script.
Signed-off-by: Alexey Neyman <stilor@att.net>
- Use fork's name, not the master package name
- Allow to use a choice selector when printing a package
- Consider complibs always present (they are, gcc does require gmp/...)
Signed-off-by: Alexey Neyman <stilor@att.net>
... when using musl to compile strace.
Also, honor CT_TARGET_CFLAGS in scripts compiling target libs/binaries.
Signed-off-by: Alexey Neyman <stilor@att.net>
Also fix test-packages: it was saving the output from CT_DoLog into
the checksum file. Also use one file per version.
Signed-off-by: Alexey Neyman <stilor@att.net>
- Glibc configure args and tuple need adjustment on SuperH
- Only allow "both endian" and "with CPU" for unspecified arch
variant. May reconsider endianness (was breaking things before
adjusting glibc tuple)
- Retire non-multilib sample, it should be a subset of the
multilib one now.
Signed-off-by: Alexey Neyman <stilor@att.net>
1. On SuperH, configuring GCC with explicit variant of the CPU
(like "sh4") limits the default set of multilibs to just that CPU
and requires --with-multilib-list to change. Allow for "unspecified"
variant, so that we can defer to GCC to determine the list.
2. Support toolchains with both endiannesses at the same time.
3. Add a SuperH/newlib sample
4. Add more flags processing for uClibc
Signed-off-by: Alexey Neyman <stilor@att.net>
Some users (like myself) may want to omit the crosstool-NG version
from the binaries' versioning output, as it can be incredibly long
and not too helpful. Add a config option to disable it. The possible
combinations are as follows:
- crosstool-NG version (default)
- crosstool-NG version - custom toolchain ID
- Custom toolchain ID
- No crosstool-NG version OR custom toolchain ID
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
While here, also consider patched by anything other than "bundled patches"
as per-target sources. Add scary warnings in case of a failure.
Signed-off-by: Alexey Neyman <stilor@att.net>
... because there the symbols were constructer part by part.
Also, remove cc.sh and source $(CT_CC).sh directly - we only build
a single compiler at a time.
Signed-off-by: Alexey Neyman <stilor@att.net>
It fails to compile with the only locale version available (030818)
(on master too, with exactly the same error).
uClibc-ng does not use pregenerated locales.
Signed-off-by: Alexey Neyman <stilor@att.net>
- Need GDB8.0 milestone
- Make uClibc "master" package
- Rename bionic -> android-ndk to match the package name and
support suffixes for archives
Signed-off-by: Alexey Neyman <stilor@att.net>
... fails on DUMA because it cannot be compiled by newer C++, and patches
are not applied to checkouts from VCS.
Signed-off-by: Alexey Neyman <stilor@att.net>
Also disable per-arch patch application: this doesn't play well with the
reuse of the sources in .build/src
Signed-off-by: Alexey Neyman <stilor@att.net>
Must have eabi suffix for GCC to accept it. Also:
- We only have one glibc now, no need to account for eglibc.
- Rename aarch64 samples, eabi suffix does not apply to them
(and ct-ng saveconfig was saving them into a different directory).
Fixes#772.
Signed-off-by: Alexey Neyman <stilor@att.net>
Fixes#731
CT_BUILD_DIR is used in CT_DoExecLog. We need to ensure that it is
set before the first call to CT_DoExecLog.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
- Update .gitignore, do not place .gitignore into directories installed
in bulk
- Remove executable permissions and shebangs from the scripts that are
supposed to be invoked only via ct-ng frontent; prepend them with $(bash).
Despite what showSamples.sh said, it already has some bashisms.
- Remove --with autotools-dev and override dh_update_autotools_config
to avoid having config.{sub,guess} clobbered with older versions
- Install bash completion where Debian (now) expects it
- Update man page to use .\" as the comment delimiter, instead of
undefined macro (."); also, minor text edits.
- Install kconfig.mk without execute permission.
- Remove shell wrappers from 170-localedef-fix-trampoline.patch, we
do not use that for applying patches
- Revoke execute permissions on 210-expat.sh
- Get flags from dpkg-buildflags if available
Signed-off-by: Alexey Neyman <stilor@att.net>
Make this behavior default in case the core gcc backend is used
for final compiler (i.e., for baremetal configurations). Not
setting this option breaks canadian baremetal configurations,
and not setting it makes little sense at all in any baremetal
configuration (since in baremetal we don't have any libc to begin
with).
Signed-off-by: Alexey Neyman <stilor@att.net>
zlib refuses to run configure with mingw32 host and insists that
win32/Makefile.gcc is used instead.
This requires a change in this Makefile to support static-only builds.
Fixes#694.
Signed-off-by: Alexey Neyman <stilor@att.net>
The generated sysnum.h is different for o32/n32/64 ABIs.
This needs to be revisited; either do this for all architecutres or
perhaps, compare the headers for various multilibs and combine them
if the are identical.
Signed-off-by: Alexey Neyman <stilor@att.net>