summaryrefslogtreecommitdiff
path: root/scripts/build/binutils/binutils.sh
AgeCommit message (Collapse)AuthorFilesLines
2022-02-23binutils: Disable libdebuginfod when producing a static toolchainChris Packham1-0/+3
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>
2021-09-21binutils: Remove obsolete versionsChris Packham1-26/+20
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>
2021-07-06Add EXTRA_CXXFLAGS_FOR_BUILD optionRaphael Catolino1-2/+2
Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>
2020-10-14binutils: Disable glob for better portabilityAlexey Brodkin1-0/+4
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>
2020-01-22Merge pull request #1257 from nolange/fix_binutils_typoAlexey Neyman1-1/+1
fixup typo in bitutils.sh
2019-10-15fix nonfunctional --enable-relro optionNorbert Lange1-1/+1
Signed-off-by: Norbert Lange <nolange79@gmail.com>
2019-10-10enable option for binutils deterministic-archivesNorbert Lange1-0/+3
Signed-off-by: Norbert Lange <nolange79@gmail.com>
2019-04-05Rename JOBSFLAGS -> CT_JOBSFLAGSAlexey Neyman1-5/+5
... so that it is saved/restored when restarting the build. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-11Add a symlink to LTO for binutilsAlexey Neyman1-0/+6
... so that ar can find the plugin even when invoked directly, not via the gcc-ar plugin. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-05Add configuration options for enabling SSPAlexey Neyman1-1/+1
... 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>
2018-12-04Add a config option for default RELRO settingAlexey Neyman1-0/+5
Fixes #656. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-01Add an ability to modify an exported variableAlexey Neyman1-3/+4
... 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>
2018-09-27Use 'chmod a-x' instead of 'chmod -x'Alexey Neyman1-1/+1
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>
2017-09-01config: Add package versioning flexibilityNathan Chancellor1-2/+2
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>
2017-08-21Save export status for environment varsAlexey Neyman1-1/+1
... and limit our modifications to our variables. Fixes #762. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08Separate the notions of package name/labelAlexey Neyman1-1/+0
Also, remove resolved TBDs. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08Allow for custom archive namesAlexey Neyman1-1/+1
... and directories therein. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08Fix the references to old config variablesAlexey Neyman1-35/+9
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-16Honor CFLAGS_FOR_BUILDAlexey Neyman1-1/+3
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-02Pass CC_FOR_BUILD to binutilsAlexey Neyman1-0/+2
Otherwise, it fails if 'gcc' is not available. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-01Fix symlinking to multiarch tools on CygwinAlexey Neyman1-20/+6
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>
2017-02-27Revert "Determine whether -E/-r option selects extended regexp"Alexey Neyman1-1/+1
This reverts commit 7bcf18bfab84374d3305c7a088f95ac1219ddf93.
2017-02-23Fix the build of elf2flt on CygwinAlexey Neyman1-1/+0
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>
2017-02-14Determine whether -E/-r option selects extended regexpAlexey Neyman1-1/+1
... 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>
2017-02-07elf2flt: use CT_ARCH to set target CPU, not CT_TARGETCarlos Santos1-1/+1
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>
2017-01-30Fix installation of manuals for binutilsAlexey Neyman1-2/+2
It was running 'make gas ld ...', which was succeeding, but didn't install anything. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-25Run all configure scripts using ${CONFIG_SHELL}Alexey Neyman1-0/+3
... as its help message says in menuconfig. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-13Unify fetching Linaro components.Alexey Neyman1-10/+10
Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-11-21Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.Alexey Neyman1-12/+12
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>
2016-09-20elf2flt: do not treat warnings as errorsKirill K. Smirnov1-0/+1
elf2flt is configured with -Werror flag by default. Disable it. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
2016-09-13binutils: make symlinks in a consistent wayKirill K. Smirnov1-1/+1
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>
2016-06-10Update elf2flt git repository locationMartin Lund1-1/+1
The elf2flt git repository has been moved to GitHub. Updated the script accordingly. Signed-off-by: Martin Lund <martin.lund@keep-it-simple.com>
2016-01-13elf2flt: Use openadk version of elf2fltBryan Hundven1-1/+1
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>
2016-01-02binutils: Fix installing libiberty for targetBryan Hundven1-0/+4
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>
2015-12-08scripts: Update usage of CT_GetCustomBryan Hundven1-15/+8
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>
2015-12-07binutils: Fix LDFLAGS for static toolchainBryan Hundven1-1/+1
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>
2015-12-05binutils: Fix binutils manuals_install variableBryan Hundven1-2/+2
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>
2015-11-25binutils/gdb: Fix configure options when building from binutils-gdb repoBryan Hundven1-0/+4
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>
2015-11-17consistency: Use exported variables of required toolsBryan Hundven1-12/+12
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>
2015-11-13xtensa: add support for the configurable Xtensa architecture.Chris Zankel1-0/+4
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>
2015-02-02scripts/*/*.sh: prioritize http downloadsBryan Hundven1-2/+2
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>
2015-01-16binutils: Add Linaro Binutils 2.25-2015.01 and 2.24-2014.11Cristoforo Cataldo1-3/+10
This commit allows to choose, download and build latest Linaro Binutils: - binutils-linaro-2.25.0-2015.01-2 - binutils-linaro-2.24.0-2014.11-2 Signed-off-by: Cristoforo Cataldo <cristoforo.cataldo@gmail.com>
2014-12-08scripts: Update download locationsBryan Hundven1-2/+2
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>
2014-12-05binutils: Fix elf2flt compile on more modern systemsSolomon Peachy1-0/+1
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>
2014-12-05binutils: Fixup the static toolchain build problemgoodmenlinux@gmail.com1-1/+1
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>
2014-05-11binutils/elf2flt: restore the custom location functionalityYann E. MORIN"1-3/+11
Somehow, it got lost when incorporating elf2flt in the binutils farmework. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-11binutils/binutils: do not forget to extract elf2fltYann E. MORIN"1-5/+3
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>
2014-05-11binutils/elf2flt: use alternate mirrorYann E. MORIN"1-7/+3
The official elf2flt upstream has disapeared. Switch to a mirror. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-02-04binutils: Added ranlib to tools listRay Donnelly1-3/+3
so that it is available to available to the core C compiler build because static libraries are built and ranlib is used on them. Signed-off-by: Ray Donnelly <mingw.android@gmail.com> Message-Id: <CAOYw7dt=+DdnKAHNShfs6a+=7sS+DLQYkyxnQMAwmw7E7zqvgA@mail.gmail.com> Patchwork-Id: 316477
2012-11-19binutils: introduce the infrastructure to support binutils alternativesYann Diorcet1-1/+91
Rework binutils in order to provide soon binutils alternative. Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com> [yann.morin.1998@free.fr: split up original patch for self-contained changes] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <d3d1d51f399e6d2c1163.1353320546@macbook-smorlat.local> Patchwork-Id: 199971