summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils
AgeCommit message (Collapse)Author
2020-12-15Retire obsolete GDB 6.1.1Ed Maste
GDB 6.1.1 was released in June 2004 and is long obsolete. It does not support all of the architectures that FreeBSD does, and imposes limitations on the FreeBSD kernel build, such as the continued use of DWARF2 debugging information. It was kept (in /usr/libexec/) only for use by crashinfo(8), which extracts some basic information from a kernel core dump after a crash. Crashinfo already prefers gdb from port/package if installed. Future work may add kernel debug support to LLDB or find another path for crashinfo's needs, but in any case we do not want to ship the excessively outdated GDB in FreeBSD 13. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27610 Notes: svn path=/head/; revision=368667
2020-06-07Remove now-unused GNU as build infrastructureEd Maste
Notes: svn path=/head/; revision=361894
2020-06-07Retire BINUTILS and BINUTILS_BOOTSTRAP optionsEd Maste
As of r361857 all BINUTILS options are disabled by default - ports have been changed to depend on binutils if they require GNU as, and all base system assembly files have been switched to use Clang's integrated assembler. Relnotes: Yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=361880
2020-06-06Remove GNU objcopy and objdump build infrastructureEd Maste
We haven't used the GNU versions of these tools for some time. Notes: svn path=/head/; revision=361860
2020-05-30binutils: build as with BINUTILS || BINUTILS_BOOTSTRAPEd Maste
Previously we descended into as only if MK_BINUTILS was true, including during the bootstrap tool phase. BINUTILS is now disabled by default on all archs, and we failed to build it during amd64 bootstrap. Descend into as if either BINUTILS or BINUTILS_BOOTSTRAP is enabled. This is not quite correct: we should either have the test also depend on BOOTSTRAPPING, or set BINUTILS to the value of BINUTILS_BOOTSTRAP during the bootstrap phase. However, this simple change fixes the build and has been tested, and binutils will be removed completely in the near future. Notes: svn path=/head/; revision=361656
2020-05-06binutils: disconnect objdump from the buildEd Maste
The in-tree binutils is old and will not be updated. It does not support all archs supported by FreeBSD, and for the archs it does support not all CPU features are supported. Other tools have migrated to copyfree alternatives. Although llvm-objdump is nearly a drop-in replacement for GNU objdump it is missing a few options and has some differences in output format. For now just remove GNU objdump; ports and developers can use a contemporary, maintained version from ports or packages. We can revisit installing llvm-objdump as objdump in the future. PR: 212319 [exp-run] Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7338 Notes: svn path=/head/; revision=360698
2020-03-27remove binutils ld leftoversEd Maste
Notes: svn path=/head/; revision=359376
2020-03-27Now that there are no remaining users of ld.bfd, remove the ld subdir.Brandon Bergren
Notes: svn path=/head/; revision=359349
2020-03-27[PowerPC] Switch powerpc and powerpcspe to lldBrandon Bergren
Now that LLD 10 is out, and required patches have landed, we are now ready to finally switch away from the ancient in-tree ld.bfd. Special thanks to Fangrui Song for many hours of work on getting the 32-bit powerpc lld ready for prime-time. Reviewed by: emaste (earlier revision), jhibbits Relnotes: yes Differential Revision: https://reviews.freebsd.org/D24111 Notes: svn path=/head/; revision=359347
2020-01-19limit building GNU assembler (as) to x86Ed Maste
GNU as 2.17.50 is currently required by amd64 and i386 for at least one file that cannot be assembled by Clang's integrated assembler (IAS). Other supported CPU architectures either use Clang IAS for all assembly files, or rely on external toolchain. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23180 Notes: svn path=/head/; revision=356889
2020-01-14limit ld.bfd to powerpcEd Maste
All archs except powerpc either use lld or require external toolchain. powerpc still needs binutils ld to link 32-bit binaries. Reviewed by: jhibbits Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23107 Notes: svn path=/head/; revision=356736
2019-08-01as: add deprecation notice to the man pageEd Maste
In the future FreeBSD will ship without GNU binutils 2.17.50. Add a note advising users who require GNU as to install the binutils port or package. Note that on armv7, arm64, amd64, i386 we currently ship only two binutils tools (as and objdump). A deprecation notice was added to objdump's man page some time ago. PR: 233611 Discussed with: jhb MFC after: 1 week Relnotes: Yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350518
2019-08-01objdump: be explicit that GNU objdump that will be removedEd Maste
We may install llvm-objdump as objdump (see review D18307) or just provide no /usr/bin/objdump, but either way GNU objdump won't be installed in the future. MFC after: 3 days Notes: svn path=/head/; revision=350505
2019-08-01objdump: move deprecation notice to indended spot in the man pageEd Maste
r335217 added a deprecation notice to the source file for the objdump man page, and r335219 added it to the rendered objdump.1, but in the wrong spot. MFC after: 3 days Notes: svn path=/head/; revision=350503
2019-05-20[PPC] Enable build/install of ld.bfd on baseLeandro Lupori
When using LLVM+clang+lld on PowerPC64, ld.bfd is also needed, to link 32-bit binaries correctly, as lld support for 32-bit is still minimal. This change enables it to be built and installed when lld is used. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20259 Notes: svn path=/head/; revision=347992
2019-03-25Apply WITH_PIE changes to other binutils componentsEd Maste
Followon to r345489, explicitly specified bare .a libraries need ${PIE_SUFFIX} (although these still built). MFC with: r345489 Notes: svn path=/head/; revision=345490
2019-03-25Fix GNU objdump build under WITH_PIEEd Maste
Explicitly specified bare .a libraries need ${PIE_SUFFIX}. Reported by: David E. Cross, on twitter Notes: svn path=/head/; revision=345489
2019-03-06Divorce MK_GDB from MK_BINUTILS.John Baldwin
This permits legacy GDB to still be built and installed if WITHOUT_BINUTILS is set (e.g. if base/binutils is installed). Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19480 Notes: svn path=/head/; revision=344854
2019-01-09Avoid bsd.files.mk duplicate rule warning for bfd ldscriptsAlex Richardson
Without this change I get lots of warning: duplicate script for target "_FILESINS_ldscripts/elf64btsmip_fbsd.xw" ignored message for every tree walk. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D18783 Notes: svn path=/head/; revision=342882
2018-11-26Do not install GNU ld if lld is /usr/bin/ldEd Maste
GNU binutils ld.bfd 2.17.50 does not support ifuncs and produces broken binaries when ifuncs are in use. When LLD_IS_LD is default we have an ifunc-capable system linker and can just avoid installing ld.bfd. Reported by: theraven Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18340 Notes: svn path=/head/; revision=340984
2018-09-21Disable sbrk() use in GNU tools.Brooks Davis
We're studing the possibility of deprecating sbrk(). To make it easier we're removing unnecessicary uses in the base system. None of these tools require sbrk(), but they agressively prefer it for no good reason. Reviewed by: andrew Approved by: re (kib) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16141 Notes: svn path=/head/; revision=338860
2018-07-06Teach binutils that arm64 is a 64bit architecture. This is needed to crossAndrew Turner
build from arm64 to other architectures that use binutils. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=336027
2018-06-20Rework how the ld link is handled in WORLDTMP from r322811.Bryan Drewery
LLD_BOOTSTRAP (build) is independent of LLD_IS_LD (installed) so they should not be based on each other. This is related to upcoming WITH_SYSTEM_LINKER work. Reviewed by: emaste Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D15836 Notes: svn path=/head/; revision=335447
2018-06-15objdump.1: manually apply r229046 to the rendered man pageEd Maste
Notes: svn path=/head/; revision=335219
2018-03-04When lld is ld, install bfd's man page as ld.bfd.1Ed Maste
When WITH_LLD_IS_LD is set, lld's man page is installed as ld.1.gz, as was GNU BFD's man page prior to this change. Reported by: Tobias Kortkamp Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=330366
2017-10-31Rename RELTOP since it will mean something else globally.Bryan Drewery
Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325189
2017-10-31DIRDEPS_BUILD: Update dependencies.Bryan Drewery
Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
2017-10-05Support armv7 builds for userlandWarner Losh
Make armv7 as a new MACHINE_ARCH. Copy all the places we do armv6 and add armv7 as basically an alias. clang appears to generate code for armv7 by default. armv7 hard float isn't supported by the the in-tree gcc, so it hasn't been updated to have a new default. Support armv7 as a new valid MACHINE_ARCH (and by extension TARGET_ARCH). Add armv7 to the universe build. Differential Revision: https://reviews.freebsd.org/D12010 Notes: svn path=/head/; revision=324340
2017-09-09Remove redundant source and object files.Jonathan Anderson
Reviewed by: bdrewery, ngie MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D12208 Notes: svn path=/head/; revision=323365
2017-08-14Convert all the arm big endian tests into a regexp rather than a list.Warner Losh
Suggested by: emaste@ Notes: svn path=/head/; revision=322521
2017-08-12Make _TO_CPUARCH macro for ARCH to CPUARCH conversionsWarner Losh
Consolidate all the regular expressions to convert from MACHINE_ARCH to MACHINE_CPUARCH into a variable and use that variable in preference to the almost identical copies in the tree (which should have been identical). Differential Revision: https://reviews.freebsd.org/D11986 Notes: svn path=/head/; revision=322429
2017-01-27Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CCEd Maste
Reported by: Dan McGregor <dan.mcgregor usask.ca> Notes: svn path=/head/; revision=312855
2017-01-06Enable /usr/lib32 for o32 binaries on mips64.John Baldwin
Build and install an o32 set of libraries on mips64 suitable for running o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 in MALTA64. Reviewed by: jmallett, imp Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D9032 Notes: svn path=/head/; revision=311567
2016-11-25Add WITH_LLD_AS_LD build knobEd Maste
If set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is not capable of linking the world and kernel, but can self-host and link many substantial applications. GNU ld continues to be used for the world and kernel build, regardless of how this knob is set. It is on by default for arm64, and off for all other CPU architectures. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=309142
2016-10-31Add full softfloat and hardfloat support for MIPS.Ruslan Bukin
This adds new target architectures for hardfloat: mipselhf mipshf mips64elhf mips64hf. Tested in QEMU only. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D8376 Notes: svn path=/head/; revision=308130
2016-10-22Create a new MACHINE_ARCH for Freescale PowerPC e500v2Justin Hibbits
Summary: The Freescale e500v2 PowerPC core does not use a standard FPU. Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor unit, which doubles as a FPU. The PowerPC SPE ABI is incompatible with the stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this. Additionaly, the SPE opcodes overlap with Altivec, so these are mutually exclusive. Taking advantage of this fact, a new file, powerpc/booke/spe.c, was created with the same function set as in powerpc/powerpc/altivec.c, so it becomes effectively a drop-in replacement. setjmp/longjmp were modified to save the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by the SPE). Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not support double-precision floating point. Also, without a new MACHINE_ARCH it would be impossible to provide binary packages which utilize the SPE. Additionally, no work has been done to support ports, work is needed for this. This also means no newer gcc can yet be used. However, gcc's powerpc support has been refactored which would make adding a powerpcspe-freebsd target very easy. Test Plan: This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222 (P1022-based) board, compiled against the new ABI. Base system utilities (/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot multiuser. Reviewed By: bdrewery, imp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D5683 Notes: svn path=/head/; revision=307761
2016-10-03Retire WITHOUT_ELFCOPY_AS_OBJCOPY optionEd Maste
In FreeBSD 11 ELF Tool Chain's elfcopy is installed as objcopy by default, with the option to switch back to GNU objcopy by setting WITHOUT_ELFCOPY_AS_OBJCOPY in make.conf. We plan to remove the outdated in-tree binutils in FreeBSD 12, so remove the temporary transition aid. Reviewed by: brooks, imp Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7337 Notes: svn path=/head/; revision=306649
2016-07-13Revert r302670 and r302671 for now.Bryan Drewery
MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 which has it backwards. Notes: svn path=/head/; revision=302690
2016-07-12Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.Bryan Drewery
This also adds missing s/aarch64/arm64 to the sys.mk version and also adds back armv6hf for universe since it was added to the sys.mk version in r300438. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7159 Notes: svn path=/head/; revision=302670
2016-05-18Make armv6 hard float abi by default. Kill armv6hf.Warner Losh
Allow CPUTYPE=soft to build the current soft-float abi libraries. Add UPDATING entry to announce this. Approved by: re@ (gjb) Notes: svn path=/head/; revision=300119
2016-03-02MFHGlen Barber
Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
2016-02-24DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery
These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
2016-01-07MFHGlen Barber
Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=293336
2016-01-07Switch GNU ld to be installed as ld.bfd and linked as ldEd Maste
We intend to replace GNU ld with LLVM's lld, and on the path to there we'll experiment with having lld installed or linked as /usr/bin/ld. Thus, make ld.bfd the primary install target for GNU ld, to later facilitate making the ld link optional. Reviewed by: davide, dim Differential Revision: https://reviews.freebsd.org/D4790 Notes: svn path=/head/; revision=293285
2016-01-04MFH r289384-r293170Glen Barber
Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=293172
2015-12-23Install ld also as ld.bfd, for use with cc -fuse-ld=bfdEd Maste
PR: 205409 [exp-run] MFC after: 1 week Relnotes: Yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=292658
2015-11-25META MODE: Don't create .meta files when symlinking sources into the obj ↵Bryan Drewery
directory. Tracking these leads to situations where meta mode will consider the file to be out of date if /bin/sh or /bin/ln are newer than the source file. There's no reason for meta mode to do this as make is already handling the rebuild dependency fine. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291320
2015-11-24Fix ld not respecting --sysroot.Bryan Drewery
ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in the default search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. These need to be prefixed by '=' so that the --sysroot flag is respected. This is not a problem with buildworld since the TOOLS_PREFIX is baked into the cross-ld. However it is a problem when trying to use ld(1) with --sysroot anywhere else as it ends up still reading /lib and /usr/lib despite --sysroot. The default --sysroot (TARGET_SYSTEM_ROOT) is '/' for /usr/bin/ld. I found this while building with META MODE with uses only --sysroot with /usr/bin/ld, and found that libraries that I had not built in its sysroot directory were leaking in. This didn't happen with ports binutils either. This would also impact external compiler support. Reviewed by: bapt, brooks MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4262 Notes: svn path=/head/; revision=291226
2015-10-16Avoid warning race with creating 'ldscripts' directory during build.Bryan Drewery
In r204548 the 'rm -f ldscripts' was added likely due to reading the conditional as 'else it is a file'. That seems unlikely though and the more likely case is just that the directory hasn't been created yet. Because this races with ,ssother scripts, use 'mkdir -p' which is a minimal modification vs upstream to avoid the warning of 'File exists' if another script creates it first. This could replace the 'test -d' as well but then it's more unneeded change to the upstream script. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289410
2015-10-09Merge from headBaptiste Daroussin
Notes: svn path=/projects/release-pkg/; revision=289092