CVS Repository/ src/ gnu/ usr.bin/ binutils-2.17/ Makefile.bsd-wrapper


OpenBSD release(s):
1.32 (79 78 77 76 75 74),  1.31 (73),  1.28 (72 71),  1.23 (70),  1.21 (69 68),  1.20 (67),  1.18 (66),  1.17 (65),  1.16 (64),  1.14 (63 62),  1.13 (61),  1.8 (60 59 58 57 56 55 54),  1.5 (53),  1.3 (52 51),  1.2 (50), 
Tags:
None
revision 1.32/ (Download) - annotate - Wed, 06 Sep 2023 12:15:30 UTC by jca
OpenBSD release(s): 79 78 77 76 75 74
Changes since 1.31: +2 -1 (diff)
Use -std=gnu89 to fix the build with clang-16

This is ancient GNU software that tends to break whenever clang adds
more warnings about deprecated features in new languages versions or
turns them into errors.  Using -std=gnu89 (the defaults for base-gcc)
for those packages means we'll probably avoid most new warnings, errors,
and possible miscompilations when updating clang.

ok robert@

revision 1.31/ (Download) - annotate - Fri, 27 Jan 2023 22:01:02 UTC by kettenis
OpenBSD release(s): 73
Changes since 1.30: +7 -3 (diff)
Recommit the switch to use llvm-strip on architectures that use ld.lld.

ok naddy@, sthen@

revision 1.30/ (Download) - annotate - Thu, 19 Jan 2023 22:54:45 UTC by kettenis
Changes since 1.29: +3 -7 (diff)
Revert previous commit (but leave the man page around); llvm-strip behaves
differently on files that are hardlinked and this is tripping up ports.

requested by naddy@

revision 1.29/ (Download) - annotate - Thu, 19 Jan 2023 00:18:19 UTC by kettenis
Changes since 1.28: +7 -3 (diff)
The binutils strip damages GNU_RELRO on binaries linked by ld.lld on at
least amd64.  Fix this by switching to the llvm strip on architectures
that use ld.lld.

ok deraadt@

revision 1.28/ (Download) - annotate - Wed, 23 Mar 2022 14:23:44 UTC by robert
OpenBSD release(s): 72 71
Changes since 1.27: +5 -6 (diff)
use llvm-ranlib where llvm-ar is used so that they are in line with each
other

revision 1.27/ (Download) - annotate - Thu, 17 Feb 2022 16:28:37 UTC by phessler
Changes since 1.26: +4 -2 (diff)
binutils-2.17 does not have ld or gas available for the aarch64, powerpc64, or
riscv64 family of platforms, so we don't try to build there.

However we mis-nested the arch check, causing some unintended side effects,
most notably installing binutils-2.17's ar(1) which overwrote the
intended llvm-ar(1).

Fix the if nesting so it only applies where intended.

tested on aarch64 by me, powerpc64 by gkoehler@, and riscv64 by jca@

OK miod@ robert@ gkoehler@ jca@

revision 1.26/ (Download) - annotate - Fri, 17 Dec 2021 17:06:39 UTC by jca
Changes since 1.25: +2 -4 (diff)
Avoid errors about clang13-only options here, to ease transition

As pointed out by deraadt@ we can do better than ask people to follow
instructions.  Note that you still need an up-to-date clang if you
update your kernel Makefiles, as those use clang13-only options.

Also -Werror doesn't bring much in binutils context.  It's an outdated
codebase with lots of warts, which frequently breaks due to -Werror
during clang updates.

"This is the right fix" deraadt@

revision 1.25/ (Download) - annotate - Fri, 17 Dec 2021 14:59:21 UTC by patrick
Changes since 1.24: +4 -1 (diff)
Disable a few warning flags that were introduced and enabled by default
with LLVM 13.

revision 1.24/ (Download) - annotate - Tue, 23 Nov 2021 10:30:08 UTC by robert
Changes since 1.23: +9 -2 (diff)
add llvm-ar(1) to the build with its two dependencies libLLVMDlltoolDriver
and libLLVMLibDriver;

switch LLD_ARCHs to llvm-ar(1) by skipping the installation of binutils' ar(1)
and linking llvm-ar(1) to ar(1)

tested on amd64, i386, arm64 and mips64

ok patrick@, kettenis@

revision 1.23/ (Download) - annotate - Mon, 21 Jun 2021 14:20:20 UTC by deraadt
OpenBSD release(s): 70
Changes since 1.22: +3 -2 (diff)
correct riscv64 blocks
discussion with espie kettenis jsg

revision 1.22/ (Download) - annotate - Wed, 05 May 2021 04:52:39 UTC by drahn
Changes since 1.21: +6 -5 (diff)
riscv64 binutils 'support'
Enable just enough of binutils to be a functional compilation system
with llvm doing the heavy lifting.
With corrections suggested by reviewers.
ok jsg@ kettenis@

revision 1.21/ (Download) - annotate - Sat, 30 May 2020 19:22:00 UTC by drahn
OpenBSD release(s): 69 68
Changes since 1.20: +3 -3 (diff)
Initial set of changes to build powerpc64 toolchain.

Disable PIC/PIE for powerpc64 for now.

revision 1.20/ (Download) - annotate - Fri, 03 Jan 2020 03:50:44 UTC by espie
OpenBSD release(s): 67
Changes since 1.19: +7 -3 (diff)
avoid build race condition: our make has an "expensive job" heuristic
which means we do stop creating other jobs as soon as we run something looking
like "make" to avoid unwanted recursion, so you would never hit that.

But in binutils-2.17, the developers changed all/info to do recursive makes
with some of the same dependencies.  Calling both at the same time becomes
an obvious race, and should be fixed for no other reason than correctness.

okay guenther@

revision 1.19/ (Download) - annotate - Sat, 21 Dec 2019 21:40:00 UTC by espie
Changes since 1.18: +1 -4 (diff)
a few depend:-related thingies that were still in.

okay millert@, tb@

revision 1.18/ (Download) - annotate - Fri, 17 May 2019 14:47:03 UTC by schwarze
OpenBSD release(s): 66
Changes since 1.17: +3 -2 (diff)
stop using the moribund MLINKS bsd.man.mk feature;
no functional change intended;
OK millert@

revision 1.17/ (Download) - annotate - Sun, 24 Feb 2019 12:57:13 UTC by kn
OpenBSD release(s): 65
Changes since 1.16: +2 -2 (diff)
Remove -S from install commands

As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.

Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.

revision 1.16/ (Download) - annotate - Fri, 14 Sep 2018 13:37:52 UTC by naddy
OpenBSD release(s): 64
Changes since 1.15: +5 -3 (diff)
Pass CC/CFLAGS/LDFLAGS to the configure script.  ok millert@

revision 1.15/ (Download) - annotate - Thu, 26 Jul 2018 13:20:53 UTC by kettenis
Changes since 1.14: +11 -3 (diff)
Add infrastructure to install lld as the default linker.  The old GNU linker
will be installed as /usr/bin/ld.bfd on supported systems.  This allows
users to fall back on the old linker by using the -fuse-ld=bfd option on
systems where lld is the default linker.

Switch armv7 to use lld as the default linker.  On arm64 we already use lld
as the default linker.  Other platforms will keep using the GNU linker for
now.

ok patrick@, deraadt@, phessler@

revision 1.14/ (Download) - annotate - Mon, 12 Jun 2017 18:49:34 UTC by espie
OpenBSD release(s): 63 62
Changes since 1.13: +1 -4 (diff)
destroy lint remnants.
okay millert@ deraadt@

revision 1.13/ (Download) - annotate - Sun, 05 Mar 2017 00:26:08 UTC by jsg
OpenBSD release(s): 61
Changes since 1.12: +5 -1 (diff)
Go back to only specifying --target when building cross.

The OpenBSD triple includes the OpenBSD version.  When this recently
changed binutils started building prefixed tools when moving to a new
OpenBSD version which isn't what we want.

ok kettenis@

revision 1.12/ (Download) - annotate - Wed, 25 Jan 2017 08:56:07 UTC by kettenis
Changes since 1.11: +18 -10 (diff)
Stub out aarch64 support and avoid building gas and ld on this architecture.

ok mpi@, patrick@

revision 1.11/ (Download) - annotate - Mon, 03 Oct 2016 21:24:40 UTC by natano
Changes since 1.10: +3 -1 (diff)
Fix ownership for install on a noperm filesystem.
joint work with tb

revision 1.10/ (Download) - annotate - Sun, 18 Sep 2016 08:58:13 UTC by natano
Changes since 1.9: +3 -3 (diff)
Use ${INSTALL} instead of install, like in all the other Makefile's.
ok guenther

revision 1.9/ (Download) - annotate - Sun, 11 Sep 2016 07:42:02 UTC by guenther
Changes since 1.8: +3 -2 (diff)
Install programs with ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
Install info and data files with -o ${DOCOWN} -g ${DOCGRP} -m ${NONBINMODE}

Prompted by natano@
Tweaks and oks deraadt@ natano@

revision 1.8/ (Download) - annotate - Fri, 05 Jul 2013 21:29:51 UTC by miod
OpenBSD release(s): 60 59 58 57 56 55 54
Changes since 1.7: +1 -18 (diff)
ELF_TOOLCHAIN bye bye.

revision 1.7/ (Download) - annotate - Sun, 10 Mar 2013 21:07:23 UTC by miod
Changes since 1.6: +5 -3 (diff)
Sync to ../binutils/Makefile.bsd-wrapper rev. 1.75:
eplace a comment asking for a particular order to build stuff in
by actual make rules to enforce that order.
While here, correct the MANDIR which must no more contain "cat".

revision 1.6/ (Download) - annotate - Sun, 10 Mar 2013 21:06:23 UTC by miod
Changes since 1.5: +4 -5 (diff)
Let platforms configured to use binutils 2.17 still recurse into the binutils
2.15 directory, but only to build gdb.
ok deraadt@ espie@

revision 1.5/ (Download) - annotate - Sat, 05 Jan 2013 20:03:06 UTC by miod
OpenBSD release(s): 53
Changes since 1.4: +6 -14 (diff)
Replace the list of platforms enabled (or not) to build the whole binutils
with a test of ELF_TOOLCHAIN provided by bsd.own.mk.
No functional change.

revision 1.4/ (Download) - annotate - Tue, 28 Aug 2012 18:59:28 UTC by pascal
Changes since 1.3: +2 -1 (diff)
Add support for PIE-by-default in both ld and gcc.  This is a completely
different approach than the one taken in kurt@'s original diff, but deemed
better after discussion and diff exchange with kettenis@ and matthew@.

Lots of feedback by kettenis@ and matthew@, prodding and encouragement by
deraadt@.

ok kettenis@ matthew@

revision 1.3/ (Download) - annotate - Wed, 16 Nov 2011 18:57:54 UTC by schwarze
OpenBSD release(s): 52 51
Changes since 1.2: +6 -6 (diff)
Sync to ../binutils/Makefile.bsd-wrapper rev. 1.76:
Always install addr2line(1), objcopy(1), and readelf(1) manuals,
even on architectures with !ELF_TOOLCHAIN && !USING_NEW_BINUTILS.
Such architectures do not yet exist, but both symmetry
and fixing potential future issues early  are good ideas.
ok jsing@

revision 1.2/ (Download) - annotate - Mon, 04 Jul 2011 23:58:26 UTC by drahn
OpenBSD release(s): 50
Changes since 1.1: +19 -20 (diff)
My merges of miod's binutils-2.17 WIP code with my changed necessary to get
somewhere with it building on arm/ia64. much pressure pirofti@ deraadt@

revision 1.1/ (Download) - annotate - Sun, 24 Apr 2011 20:19:23 UTC by miod
A first attempt at merging our local changes and fixes into the 2.17 codebase.
ld(1) needs a lot more work, as the upstream code evolved significantly since
2.15, mostly due to changes in PIE binaries layout, and we had already
diverged significantly to implement W^X.