From 42555350b719d30066606f35e7b9cbff0409cda4 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 24 Nov 2021 15:15:19 +0000 Subject: [PATCH] install /usr/bin/llvm-ar as /usr/bin/ar directly without adding another binary to /usr/bin and do the same with the manpage as well and make sure that we only build llvm-ar on architectures where it is actually enabled discussed with deraadt@ --- gnu/usr.bin/clang/Makefile | 11 +++++++---- gnu/usr.bin/clang/llvm-ar/Makefile | 11 ++--------- gnu/usr.bin/clang/llvm-ar/{llvm-ar.1 => ar.1} | 0 3 files changed, 9 insertions(+), 13 deletions(-) rename gnu/usr.bin/clang/llvm-ar/{llvm-ar.1 => ar.1} (100%) diff --git a/gnu/usr.bin/clang/Makefile b/gnu/usr.bin/clang/Makefile index c69612b61d6..8de977504ea 100644 --- a/gnu/usr.bin/clang/Makefile +++ b/gnu/usr.bin/clang/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.16 2021/11/23 10:30:08 robert Exp $ +# $OpenBSD: Makefile,v 1.17 2021/11/24 15:15:19 robert Exp $ .include @@ -21,8 +21,6 @@ SUBDIR+=include/llvm/${arch} .endfor SUBDIR+=libLLVM -SUBDIR+=libLLVMDlltoolDriver -SUBDIR+=libLLVMLibDriver SUBDIR+=llvm-config SUBDIR+=clang-tblgen @@ -102,9 +100,14 @@ SUBDIR+=lldb SUBDIR+=lldb-server SUBDIR+=include/llvm-objcopy -SUBDIR+=llvm-ar SUBDIR+=llvm-objcopy SUBDIR+=llvm-objdump +.if ${AR_VERSION:L} == "llvm" +SUBDIR+=libLLVMDlltoolDriver +SUBDIR+=libLLVMLibDriver +SUBDIR+=llvm-ar +.endif + .include .include diff --git a/gnu/usr.bin/clang/llvm-ar/Makefile b/gnu/usr.bin/clang/llvm-ar/Makefile index 8c4e1eb64a9..9557d927fb5 100644 --- a/gnu/usr.bin/clang/llvm-ar/Makefile +++ b/gnu/usr.bin/clang/llvm-ar/Makefile @@ -1,19 +1,12 @@ -# $OpenBSD: Makefile,v 1.1 2021/11/23 10:30:08 robert Exp $ +# $OpenBSD: Makefile,v 1.2 2021/11/24 15:15:19 robert Exp $ -PROG= llvm-ar +PROG= ar BINDIR= /usr/bin .include SRCS= llvm-ar.cpp -.if ${AR_VERSION:L} == "llvm" -LINKS= ${BINDIR}/${PROG} ${BINDIR}/ar - -maninstall: - cd ${DESTDIR}${MANDIR}1 && rm -f ar.1 && ln llvm-ar.1 ar.1 -.endif - .PATH: ${.CURDIR}/../../../llvm/llvm/tools/llvm-ar LLVM_LIBDEPS= LLVM LLVMDlltoolDriver LLVMLibDriver diff --git a/gnu/usr.bin/clang/llvm-ar/llvm-ar.1 b/gnu/usr.bin/clang/llvm-ar/ar.1 similarity index 100% rename from gnu/usr.bin/clang/llvm-ar/llvm-ar.1 rename to gnu/usr.bin/clang/llvm-ar/ar.1 -- 2.20.1