aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/binutils/binutils.sh
Commit message (Collapse)AuthorAgeFilesLines
* 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-041-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>
* 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>
* binutils/elf2flt: restore the custom location functionalityYann E. MORIN"2014-05-111-3/+11
| | | | | | Somehow, it got lost when incorporating elf2flt in the binutils farmework. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* binutils/binutils: do not forget to extract elf2fltYann E. MORIN"2014-05-111-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>
* binutils/elf2flt: use alternate mirrorYann E. MORIN"2014-05-111-7/+3
| | | | | | | | The official elf2flt upstream has disapeared. Switch to a mirror. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* binutils: Added ranlib to tools listRay Donnelly2014-02-041-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
* binutils: introduce the infrastructure to support binutils alternativesYann Diorcet2012-11-191-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
* scripts: add BUILD/HOST extra cflags/ldflagsYann Diorcet2012-11-161-1/+7
| | | | | | | | | | | | | | | | On some hosts, and for certain toolchains (eg. toolchain targetting the upcoming Darwin), it may be necessary to pass arbitrary CFLAGS and/or LDFLAGS when building the components. And necessary infrastructure: - EXTRA_{CFLAGS,LDFLAGS}_FOR_{BUILD,HOST} as config options - pass those extra flags to components Fix-up a slight typo in elf2flt at the same time (misnamed cflags). Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com> Message-Id: <d24043276c9243a35421.1353077450@macbook-smorlat.local> Patchwork-Id: 199645
* binutils/binutils: Add CUSTOM version and CUSTOM_LOCATION config options and ↵David Holsgrove2012-10-111-3/+14
| | | | | | | | | | | | | GetCustom CUSTOM_LOCATION config options only presented in menuconfig if component CUSTOM version selected. Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com> [yann.morin.1998@free.fr: fix indentation, don't patch custom dir location] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <7a604b5df9c84a1e20c3.1349931195@localhost.localdomain> PatchWork-Id: 190788
* binutils/binutils: CT_BINUTILS_GOLD_THREADED should be CT_BINUTILS_GOLD_THREADSZhenqiang Chen2012-08-071-1/+1
| | | | Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
* binutils: add frontends for building to run on the build machineYann E. MORIN"2011-07-241-0/+20
| | | | | | | In canadian-cross, we need binutils running on the build machine to be able to build the target C library. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>