From 0f031350f32b8760e0843a6476d67aa21116103b Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 2 Feb 2023 09:23:02 -0800 Subject: [PATCH] rescue: Fix link order of SSL libraries and fetch. ld.bfd requires libraries to be linked in order. libssl requires libcrypto. libfetch requires libssl. To fix the latter, move fetch up above tar rather than listing the ssl libraries twice. Reviewed by: delphij Fixes: ea34aa4780e5 rescue: Add fetch(1) to the rescue tool. Differential Revision: https://reviews.freebsd.org/D38304 --- rescue/rescue/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 6093cf6609d1..2360bf83b781 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -212,16 +212,16 @@ CRUNCH_PROGS_usr.bin+= zstd CRUNCH_ALIAS_zstd= unzstd zstdcat zstdmt CRUNCH_LIBS+= ${LDADD_zstd} +CRUNCH_PROGS_usr.bin+= fetch +CRUNCH_LIBS+= -lfetch + CRUNCH_PROGS_usr.bin+= tar CRUNCH_LIBS+= -larchive .if ${MK_OPENSSL} != "no" -CRUNCH_LIBS+= -lcrypto -lssl +CRUNCH_LIBS+= -lssl -lcrypto .endif CRUNCH_LIBS+= -lmd -CRUNCH_PROGS_usr.bin+= fetch -CRUNCH_LIBS+= -lfetch - .if ${MK_NETCAT} != "no" CRUNCH_PROGS_usr.bin+= nc .endif