Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix error when compiling on FreeBSD
Keve committed 1 year ago
commit 07ca3e850ecaf32869e419b53e3c58be6f82fd96
parent f57c738
3 files changed +6 -2
modified auto.def
@@ -101,6 +101,7 @@ cc-with { -libs { -llzma }} {
	}
}
if {[string match *-freebsd* [get-define host]]} {
+
	define pkg_freebsd
	cc-with { -libs { -lmd }} {
		if {![cc-check-functions SHA256_Data]} {
			user-error "Unable to find libmd"
modified libpkg/Makefile.autosetup
@@ -129,9 +129,12 @@ LOCAL_LDFLAGS+= -L$(top_builddir)/external/libmachista -lmachista_pic \
SRCS+=		pkg_macho.c
@else
SRCS+=		pkg_elf.c
+
@if pkg_freebsd
+
LOCAL_LDFLAGS+=	-Wl,--version-script=$(top_srcdir)/libpkg/libpkg.ver,--undefined-version 
+
@else
# --undefined-version is a FreeBSD ld option
LOCAL_LDFLAGS+=	-Wl,--version-script=$(top_srcdir)/libpkg/libpkg.ver
-
#LOCAL_LDFLAGS+=	-Wl,--version-script=$(top_srcdir)/libpkg/libpkg.ver,--undefined-version 
+
@endif
@endif

@if libelf-internal
modified libpkg/pkg_macho.c
@@ -332,7 +332,7 @@ pkg_arch_to_legacy(const char *arch, char *dest, size_t sz)
	/* Map the architecture name to its CPU type */
	ai = NXGetArchInfoFromName(arch + i);
	if (ai == NULL) {
-
		// pkg_emit_error("could not find architecture info for %s", arch + i);
+
		pkg_emit_error("could not find architecture info for %s", arch + i);
		return EPKG_FATAL;
	}