aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/binutils
Commit message (Collapse)AuthorAgeFilesLines
* binutils: Allow gold to be statically linkedChris Packham2024-07-291-0/+17
| | | | | | | | | | | gold uses g++ to link which doesn't recognise -all-static. It appears as if -static should work for both libtool and g++ but for some reason it doesn't. Remove the restriction that gold can't be included in a static toolchain. When a static toolchain is requested pass --with-gold-ldflags=--static to configure. Finally build gold separately so it does not get the extra_make_flags which may contain -all-static. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Revert "binutils: Disable glob for better portability"Chris Packham2024-03-011-4/+0
| | | | | | | | | | | | | | This reverts commit 57f59092852dff18fbda68fdbf23f850ad182c40. This was originally added so that a toolchain could be built on a newer system but run on an older one. With the benefit of hindsight that is probably the wrong approach. The best way of achieving that goal would be to use docker/podman container to provide an environment that is the same as the oldest supported system and build inside that. The resulting toolchain should be compatible with the old system and the new one. Closes #2094 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* scripts/build/binutils: Update path for libbfdChris Packham2023-12-081-1/+1
| | | | | | | | | As of binutils 2.41 libbfd.a is not placed directly in the output directory. Fortunately the libtool .libs location seems to have been in place for some time so we can update the path without worrying about backwards compatibility. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* binutils: Add binutils 2.40Chris Packham2023-03-081-0/+6
| | | | | | https://sourceware.org/pipermail/binutils/2023-January/125671.html Signed-off-by: Chris Packham <judge.packham@gmail.com>
* binutils: add option to build libopcodes for targetDries Deschout2022-10-021-2/+3
| | | | | | It provides functionality to disassemble executable binaries. Signed-off-by: Dries Deschout <dries.deschout@dodeco.eu>
* binutils: Disable libdebuginfod when producing a static toolchainChris Packham2022-02-231-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>
* binutils: Remove obsolete versionsChris Packham2021-09-211-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>
* Add EXTRA_CXXFLAGS_FOR_BUILD optionRaphael Catolino2021-07-061-2/+2
| | | | Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>
* binutils: Disable glob for better portabilityAlexey Brodkin2020-10-141-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>
* Merge pull request #1257 from nolange/fix_binutils_typoAlexey Neyman2020-01-211-1/+1
|\ | | | | fixup typo in bitutils.sh
| * fix nonfunctional --enable-relro optionNorbert Lange2019-10-151-1/+1
| | | | | | | | Signed-off-by: Norbert Lange <nolange79@gmail.com>
* | enable option for binutils deterministic-archivesNorbert Lange2019-10-101-0/+3
|/ | | | Signed-off-by: Norbert Lange <nolange79@gmail.com>
* Rename JOBSFLAGS -> CT_JOBSFLAGSAlexey Neyman2019-04-041-5/+5
| | | | | | ... so that it is saved/restored when restarting the build. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add a symlink to LTO for binutilsAlexey Neyman2018-12-111-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>
* Add configuration options for enabling SSPAlexey Neyman2018-12-042-12/+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>
* Add a config option for default RELRO settingAlexey Neyman2018-12-031-0/+5
| | | | | | Fixes #656. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add an ability to modify an exported variableAlexey Neyman2018-11-011-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>
* Use 'chmod a-x' instead of 'chmod -x'Alexey Neyman2018-09-261-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>
* config: Add package versioning flexibilityNathan Chancellor2017-09-011-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>
* Save export status for environment varsAlexey Neyman2017-08-211-1/+1
| | | | | | | | ... and limit our modifications to our variables. Fixes #762. Signed-off-by: Alexey Neyman <stilor@att.net>
* Separate the notions of package name/labelAlexey Neyman2017-07-081-1/+0
| | | | | | Also, remove resolved TBDs. Signed-off-by: Alexey Neyman <stilor@att.net>
* Allow for custom archive namesAlexey Neyman2017-07-081-1/+1
| | | | | | ... and directories therein. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix the references to old config variablesAlexey Neyman2017-07-081-35/+9
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Honor CFLAGS_FOR_BUILDAlexey Neyman2017-06-151-1/+3
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Pass CC_FOR_BUILD to binutilsAlexey Neyman2017-04-021-0/+2
| | | | | | Otherwise, it fails if 'gcc' is not available. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix symlinking to multiarch tools on CygwinAlexey Neyman2017-04-011-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>
* Revert "Determine whether -E/-r option selects extended regexp"Alexey Neyman2017-02-261-1/+1
| | | | This reverts commit 7bcf18bfab84374d3305c7a088f95ac1219ddf93.
* Fix the build of elf2flt on CygwinAlexey Neyman2017-02-221-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>
* Determine whether -E/-r option selects extended regexpAlexey Neyman2017-02-131-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>
* elf2flt: use CT_ARCH to set target CPU, not CT_TARGETCarlos Santos2017-02-061-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>
* Fix installation of manuals for binutilsAlexey Neyman2017-01-301-2/+2
| | | | | | | It was running 'make gas ld ...', which was succeeding, but didn't install anything. Signed-off-by: Alexey Neyman <stilor@att.net>
* Run all configure scripts using ${CONFIG_SHELL}Alexey Neyman2017-01-251-0/+3
| | | | | | ... as its help message says in menuconfig. Signed-off-by: Alexey Neyman <stilor@att.net>
* Unify fetching Linaro components.Alexey Neyman2017-01-121-10/+10
| | | | | | Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib. Signed-off-by: Alexey Neyman <stilor@att.net>
* Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.Alexey Neyman2016-11-201-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>
* elf2flt: do not treat warnings as errorsKirill K. Smirnov2016-09-201-0/+1
| | | | | | elf2flt is configured with -Werror flag by default. Disable it. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
* binutils: make symlinks in a consistent wayKirill K. Smirnov2016-09-131-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>
* Update elf2flt git repository locationMartin Lund2016-06-101-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>
* elf2flt: Use openadk version of elf2fltBryan Hundven2016-01-131-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>
* binutils: Fix installing libiberty for targetBryan Hundven2016-01-021-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>
* scripts: Update usage of CT_GetCustomBryan Hundven2015-12-081-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>
* binutils: Fix LDFLAGS for static toolchainBryan Hundven2015-12-071-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>
* binutils: Fix binutils manuals_install variableBryan Hundven2015-12-051-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>
* binutils/gdb: Fix configure options when building from binutils-gdb repoBryan Hundven2015-11-241-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>
* consistency: Use exported variables of required toolsBryan Hundven2015-11-171-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>
* xtensa: add support for the configurable Xtensa architecture.Chris Zankel2015-11-131-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>
* scripts/*/*.sh: prioritize http downloadsBryan Hundven2015-02-011-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>
* binutils: Add Linaro Binutils 2.25-2015.01 and 2.24-2014.11Cristoforo Cataldo2015-01-161-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>
* scripts: Update download locationsBryan Hundven2014-12-081-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>
* binutils: Fix elf2flt compile on more modern systemsSolomon Peachy2014-12-051-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>
* binutils: Fixup the static toolchain build problemgoodmenlinux@gmail.com2014-12-051-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>