git: 4028a1e7dd9d - 2021Q4 - comms/hcidump: Fix a link error

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 07 Oct 2021 17:24:14 UTC
The branch 2021Q4 has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4028a1e7dd9d5e4876d50c719fb576abca3f06c2

commit 4028a1e7dd9d5e4876d50c719fb576abca3f06c2
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-10-05 20:54:44 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-10-07 17:23:43 +0000

    comms/hcidump: Fix a link error
    
    Fix the following by adding -fPIE to CFLAGS:
    
    /usr/local/bin/x86_64-unknown-freebsd14.0-ld: ../parser/libparser.a(hidp.o):
    relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making
    a PIE object; recompile with -fPIE
    /usr/local/bin/x86_64-unknown-freebsd14.0-ld: final link failed:
    nonrepresentable section on output
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    *** [hcidump] Error code 1
    
    (cherry picked from commit b581f84ea517c22d023ccff2150e15d5d68332c8)
---
 comms/hcidump/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/comms/hcidump/Makefile b/comms/hcidump/Makefile
index ba1a2d912fd5..881d20bcee27 100644
--- a/comms/hcidump/Makefile
+++ b/comms/hcidump/Makefile
@@ -16,7 +16,7 @@ USES=		uidfix
 WRKSRC=		${WRKDIR}/${PORTNAME}
 INSTALL_WRKSRC=	${WRKSRC}/${PORTNAME}
 
-CFLAGS+=	-DL2CAP_SOCKET_CHECKED=yes
+CFLAGS+=	-DL2CAP_SOCKET_CHECKED=yes -fPIE
 
 PLIST_FILES=	bin/hcidump man/man1/hcidump.1.gz