libdebuginfod is incompatible with static linking so pass
--without-debuginfod when CT_STATIC_TOOLCHAIN is selected.
Fixes#1683
Signed-off-by: Chris Packham <judge.packham@gmail.com>
The following versions were marked obsolete in crosstool-ng-1.24.0,
remove them.
- binutils-linaro-2.23.2-2013.10-4
- binutils-linaro-2.24.0-2014.11-2
- binutils-linaro-2.25.0-2015.01-2
- binutils-2.23.2
- binutils-2.24
- binutils-2.25.1
Adjust the milestones now that the old versions have been removed.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Since glibc 2.27 glob interface was changed [1] and so
"glob" & "glob64" symbols require glibc 2.27+.
For us that means if we build Binutils on a machine with glibc 2.27+
produced binaries won't be any longer usable on machines with older
glibc.
As an example [2]: build on Ubuntu 18.04 (with glibc 2.27) and try to run
on CentOS 7.x (with glibc 2.17), you'll see this:
---------------------->8-------------------
ldd ld
ld: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by ld)
---------------------->8-------------------
Now given glob is not really used by Binutils itself (only needed by GDB)
and we build Binutils & GDB separately let's make at least Binutils
more portable.
In theory we may even try to do the same hack for GDB forcing it to use
imported glob implementation. But since GDB is now built strictly by C++
compiler we'll get waaay to many incompatibilities due to multiple changes
of C++ ABI in between GCC 7.5 of Ubuntu 18.04 and GCC 4.8.5 of CentOS 7.x,
so there's no point to even try.
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=ccf970c7a77e86f4f5ef8ecc5e637114b1c0136a
[2] https://github.com/zephyrproject-rtos/sdk-ng/issues/280
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
... 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>
... 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>
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>
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>
On cygwin, creating both "foo.exe" and "foo" results in 'ln -sf'
returning an error ("File exists"). However, ln silently removes
the "foo.exe" in this case, so an attempt to re-run the same command
manually then succeeds.
Hence, make binutils.sh also create symlinks with .exe prefix,
using the new & shiny routine.
Signed-off-by: Alexey Neyman <stilor@att.net>
The -lcygwin -lc actually breaks the build: elf2flt picks up the symbols for getopt/optarg via
<getopt.h> in binutils-X.Y/include, where optarg is declared without dllimport attribute.
Therefore it pulls in getopt() from libc/libcygwin, but since optarg is not prefixed with
_imp__, it is pulled from libiberty. But the object file in libiberty also contains getopt()
thus resulting in multiple definitions thereof.
While there, kill extraneous -ldl passed into configure - configure detects -ldl successfully.
Upstream: https://github.com/uclinux-dev/elf2flt/pull/6
Signed-off-by: Alexey Neyman <stilor@att.net>
... and then use the right option. See the note in scripts/functions
on where we should use ${foo} and where just 'foo'; this boils down to
whether we can expect the build tools override to be in effect (e.g. in
the actual build scripts) or not (i.e. outside of scripts/build).
While running in scripts/functions, or in scripts/crosstool-NG.sh the
build tools override directory (.build/tools/bin) may have not been
set up (yet, or at all).
Also, modify the installed scripts (populate, xldd) accordingly.
Signed-off-by: Alexey Neyman <stilor@att.net>
CT_TARGET is composed as "${CT_ARCH}${CT_ARCH_SUFFIX}", so CT_TARGET may
become something like "armv7", for example. This is used by the configure
script to set the "CPU" variable in the Makefile, leading to a commad line
containing
-DTARGET_armv7 -DTARGET_CPU="armv7"
In this case the compilation of elf2flt.c fails with "Don't know how to
support your CPU architecture??". Passsing "CPU=${CT_ARCH}" in the make
command line overrides the configured value and solves the problem.
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
The referenced commit replaced 'make' with '${make}' everywhere. This is
wrong for at least the utilities that we may build as companion tools
(make, libtool): this will always invoke the version detected by configure
by supplying the absolute path. In other words, the wrappers in
.build/tools/bin are not fallbacks - they are either temporary (in case
a respective companion tool is built) or permanent redirectors.
This is the reason why the PATH= has .build/*/buildtools/bin at higher
precedence than .build/tools/bin; the latter has the versions detected by
configure and the former has the versions built as companion tools.
Revert the rest of the gang (grep/sed/...) for consistency. After all,
we may decide to supply some of them as well (awk, for instance).
Signed-off-by: Alexey Neyman <stilor@att.net>
On the stage "core gcc pass-2" the following layout is created:
1) buildtools/bin/TARGET-{ar,as,elf2flt,flthdr,ld,ld.bfd,ranlib,strip}
2) buildtools/TARGET/bin/{ar,as,elf2flt,flthdr,ld,ld.bfd,ranlib,strip}
3) x-tools/TARGET/bin/TARGET-{ar,as,elf2flt,flthdr,ld,ld.bfd,ranlib,strip}
4) x-tools/TARGET/TARGET/bin{ar,as,elf2flt,flthdr,ld,ld.bfd,ranlib,strip}
where both (1) and (2) are symlinks to (3). This effectively renders
core pass-2 gcc with elf2flt linker unusable.
Related elf2flt discussion:
https://github.com/crosstool-ng/crosstool-ng/pull/443
Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
elf2flt is now hosted on github here:
https://github.com/uclinux-dev/elf2flt
But, until arm support is upstream, we'll switch to Waldemar Brodkorb
version of elf2flt.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
If CT_BINUTILS_FOR_TARGET_IBERTY is set, then it seems that we also must
set `--enable-install-libiberty` for configure to pickup that it needs
to be installed.
This closes#302
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This commit updates the build scripts to match the new usage of
CT_GetCustom from the previous change.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
If building a static toolchain, the ldflags option passed to
do_binutils_backend is overridden when we set `LDFLAGS=-all-static`.
We should pass `LDFLAGS=${ldflags} -all-static` in this case.
This fixes#297
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
In commit: 74d555b2
A regex in a parameter subsitution replaces a '#' hash symbol, but it is
not made literal '\#', so from the hash to the end of the line is a
comment.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
When building from:
{git,http}://sourceware.org/git/binutils-gdb.git
and setting BINUTILS_CUSTOM or GDB_CUSTOM, they could be the same
source.
These config options should not affect normal released versions.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
We check for apps:
* make
* sed
* grep
* awk
* libtool/libtoolize
* install
* patch
* and more
...during configure. Our scripts should be consistent about using the
variables that define where the found tool was found.
Of course, we do hard-link these tools in buildtools, but that should be
a backup for the components we are building. Our scripts should always
use the tools we find.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
The Xtensa processor architecture is a configurable, extensible,
and synthesizable 32-bit RISC processor core. Processor and SOC vendors
can select from various processor options and even create customized
instructions in addition to a base ISA to tailor the processor for
a particular application.
Because of the configurability, the build process requires one additional
step for gcc, binutils, and gdb to update the default configuration.
These configurations are packed into an 'overlay' tar image, and are
simply untarred on top of the default configuration during the build.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Prirotize http downloads before ftp downloads.
By having http download first, those using proxy will work with the
current download mechnism.
This tells me that that mechnism needs to be updated.
(proxy support and/or kconfig toggles)
closes#3
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This change updates the download locations to default to the official
download site.
For gcc and gdb, also separate out the linaro download locations so that
if you are downloading the linaro variant, it skips trying to download
from the official gcc mirror.
This commit closes#3
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Without this fix, elf2flt will blow up complaining that it can't resolve
dlopen() and friends. One has to explicitly pass '-ldl' on the final
linking command line, because the system linker is not resolving
indirect dependent shared libraries.
I've needed to this patch for several years on Fedora systems.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
When try to build the static toolchain, binutils failed.
I have checked the libtool script, and found that the following option
-all-static
-static
-static-libtool-libs
are processed in a strange way. If any one of those three options
appears firstly in the cmdline, all others will be neglected. Our
LDFLAGS is ".... -static -all-static -o", so the -static option
takes the real effect, and the -all-static has no useage actually!
that is the cause of the failure.
Signed-off-by: Brock Zheng <goodmenlinux@gmail.com>
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
In case we're using a custom (aka local) binutils source, we still
need to extract and patch elf2flt.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>