MFS r352754: Add WITH_PIE knob to build Position Independent ExecutablesMFC r344179: Add WITH_PIE knob to build Position Independent ExecutablesBuilding binaries as PIE allows the executable itse
MFS r352754: Add WITH_PIE knob to build Position Independent ExecutablesMFC r344179: Add WITH_PIE knob to build Position Independent ExecutablesBuilding binaries as PIE allows the executable itself to be loaded at arandom address when ASLR is enabled (not just its shared libraries).With this change PIE objects have a .pieo extension and INTERNALLIBlibraries libXXX_pie.a.MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, asthey explicitly reference .a libraries in their Makefiles. These canbe addressed on an individual basis later. MK_PIE is also disabled forrtld-elf because it is already position-independent using bespokeMakefile rules.Currently only dynamically linked binaries will be built as PIE.MFC r344181: Fix Makefile conditional after r344179MFC r344182: Use make's :tl instead of checking "no" and "NO"MFC r344189: Fixup bsd.prog.mk after r344182MFC r344211: wlandebug: disable PIE to fix build failurelibifconfig is built as a static-only PRIVATELIB (and there is no _pie.aversion) so disable PIE in libifconfig's consumer.r345489: Fix GNU objdump build under WITH_PIEExplicitly specified bare .a libraries need ${PIE_SUFFIX}.r345490: Apply WITH_PIE changes to other binutils componentsFollowon to r345489, explicitly specified bare .a libraries need${PIE_SUFFIX} (although these still built).r345778: Fix gdb/kgdb build under WITH_PIEExplicitly specified bare .a libraries need ${PIE_SUFFIX}.Approved by: re (gjb)Sponsored by: The FreeBSD Foundation
show more ...
Disable sbrk() use in GNU tools.We're studing the possibility of deprecating sbrk(). To make it easierwe're removing unnecessicary uses in the base system. None of thesetools require sbrk(), bu
Disable sbrk() use in GNU tools.We're studing the possibility of deprecating sbrk(). To make it easierwe're removing unnecessicary uses in the base system. None of thesetools require sbrk(), but they agressively prefer it for no good reason.Reviewed by: andrewApproved by: re (kib)Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D16141
Rework how the ld link is handled in WORLDTMP from r322811.LLD_BOOTSTRAP (build) is independent of LLD_IS_LD (installed) so theyshould not be based on each other.This is related to upcoming WITH
Rework how the ld link is handled in WORLDTMP from r322811.LLD_BOOTSTRAP (build) is independent of LLD_IS_LD (installed) so theyshould not be based on each other.This is related to upcoming WITH_SYSTEM_LINKER work.Reviewed by: emasteSponsored by: Dell EMCDifferential Revision: https://reviews.freebsd.org/D15836
When lld is ld, install bfd's man page as ld.bfd.1When WITH_LLD_IS_LD is set, lld's man page is installed as ld.1.gz, aswas GNU BFD's man page prior to this change.Reported by: Tobias KortkampS
When lld is ld, install bfd's man page as ld.bfd.1When WITH_LLD_IS_LD is set, lld's man page is installed as ld.1.gz, aswas GNU BFD's man page prior to this change.Reported by: Tobias KortkampSponsored by: The FreeBSD Foundation
Rename RELTOP since it will mean something else globally.Sponsored by: Dell EMC Isilon
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Convert all the arm big endian tests into a regexp rather than a list.Suggested by: emaste@
Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CCReported by: Dan McGregor <dan.mcgregor usask.ca>
Enable /usr/lib32 for o32 binaries on mips64.Build and install an o32 set of libraries on mips64 suitable forrunning o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 inMALTA64.Reviewe
Enable /usr/lib32 for o32 binaries on mips64.Build and install an o32 set of libraries on mips64 suitable forrunning o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 inMALTA64.Reviewed by: jmallett, impSponsored by: DARPA / AFRLDifferential Revision: https://reviews.freebsd.org/D9032
Add WITH_LLD_AS_LD build knobIf set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is notcapable of linking the world and kernel, but can self-host and link manysubstantial applications
Add WITH_LLD_AS_LD build knobIf set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is notcapable of linking the world and kernel, but can self-host and link manysubstantial applications. GNU ld continues to be used for the world andkernel 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
Add full softfloat and hardfloat support for MIPS.This adds new target architectures for hardfloat:mipselhf mipshf mips64elhf mips64hf.Tested in QEMU only.Sponsored by: DARPA, AFRLSponsored b
Add full softfloat and hardfloat support for MIPS.This adds new target architectures for hardfloat:mipselhf mipshf mips64elhf mips64hf.Tested in QEMU only.Sponsored by: DARPA, AFRLSponsored by: HEIF5Differential Revision: https://reviews.freebsd.org/D8376
DIRDEPS_BUILD: Regenerate without local dependencies.These are no longer needed after the recent 'beforebuild: depend' changesand hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
DIRDEPS_BUILD: Regenerate without local dependencies.These are no longer needed after the recent 'beforebuild: depend' changesand hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supportsskipping 'make depend'.Sponsored by: EMC / Isilon Storage Division
Switch GNU ld to be installed as ld.bfd and linked as ldWe intend to replace GNU ld with LLVM's lld, and on the path to therewe'll experiment with having lld installed or linked as /usr/bin/ld.Th
Switch GNU ld to be installed as ld.bfd and linked as ldWe intend to replace GNU ld with LLVM's lld, and on the path to therewe'll experiment with having lld installed or linked as /usr/bin/ld.Thus, make ld.bfd the primary install target for GNU ld, to laterfacilitate making the ld link optional.Reviewed by: davide, dimDifferential Revision: https://reviews.freebsd.org/D4790
Install ld also as ld.bfd, for use with cc -fuse-ld=bfdPR: 205409 [exp-run]MFC after: 1 weekRelnotes: YesSponsored by: The FreeBSD Foundation
META MODE: Don't create .meta files when symlinking sources into the obj directory.Tracking these leads to situations where meta mode will consider thefile to be out of date if /bin/sh or /bin/ln
META MODE: Don't create .meta files when symlinking sources into the obj directory.Tracking these leads to situations where meta mode will consider thefile to be out of date if /bin/sh or /bin/ln are newer than the sourcefile. There's no reason for meta mode to do this as make is alreadyhandling the rebuild dependency fine.Sponsored by: EMC / Isilon Storage Division
Fix ld not respecting --sysroot.ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in thedefault search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. Theseneed to be pref
Fix ld not respecting --sysroot.ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in thedefault search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. Theseneed to be prefixed by '=' so that the --sysroot flag is respected. Thisis not a problem with buildworld since the TOOLS_PREFIX is baked into thecross-ld. However it is a problem when trying to use ld(1) with --sysrootanywhere 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 sysrootdirectory were leaking in. This didn't happen with ports binutils either. Thiswould also impact external compiler support.Reviewed by: bapt, brooksMFC after: 2 weeksSponsored by: EMC / Isilon Storage DivisionDifferential Revision: https://reviews.freebsd.org/D4262
Avoid warning race with creating 'ldscripts' directory during build.In r204548 the 'rm -f ldscripts' was added likely due to reading theconditional as 'else it is a file'. That seems unlikely tho
Avoid warning race with creating 'ldscripts' directory during build.In r204548 the 'rm -f ldscripts' was added likely due to reading theconditional as 'else it is a file'. That seems unlikely though andthe 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 minimalmodification vs upstream to avoid the warning of 'File exists' if anotherscript creates it first. This could replace the 'test -d' as well butthen it's more unneeded change to the upstream script.Sponsored by: EMC / Isilon Storage Division
Updated depends
Fix subdir -j build after r287983 by adding missing dependencies.Sponsored by: EMC / Isilon Storage Division
Fix emulation ldscripts not being installed since r131832.For example, 32bit scripts on 64bit host.MFC after: 2 weeksSponsored by: EMC / Isilon Storage Division
Use SHAREOWN/SHAREMODE/SHAREGRP rather than LIB* as these are plain ASCIIscripts that the linker can load rather than binary library objects.Effectively no change.Suggested by: hrs
Replace afterinstall: hack with FILES mechanism.Sponsored by: EMC / Isilon Storage Division
new depends
dirdeps.mk now sets DEP_RELDIR
Fix rendering with mandoc
123456