From 78dd36e7cbc0e3fc3fef9c1db0a009de6eb04695 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 1 Feb 2025 16:48:11 -0500 Subject: [PATCH] Some build fixes for FreeBSD. * Drop endian.h; no longer needed as FreeBSD provides its own (and this conflicts with some other things later in the build.) * Needs libgnuregex; enable and adjust paths. Doesn't fully work yet. The fixes in the next commit for fat_shell plus some other build system tweaks are still needed. --- headers/build/host/freebsd/endian.h | 16 ---------------- src/build/Jamfile | 2 +- src/build/libgnuregex/Jamfile | 2 ++ src/tools/keymap/Jamfile | 13 ++----------- 4 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 headers/build/host/freebsd/endian.h diff --git a/headers/build/host/freebsd/endian.h b/headers/build/host/freebsd/endian.h deleted file mode 100644 index 2a7e4bdfe8..0000000000 --- a/headers/build/host/freebsd/endian.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN -#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN - - -// There's no in FreeBSD, but . And the macro naming -// differs. - -#include - - -#define __LITTLE_ENDIAN _LITTLE_ENDIAN -#define __BIG_ENDIAN _BIG_ENDIAN -#define __PDP_ENDIAN _PDP_ENDIAN -#define BYTE_ORDER _BYTE_ORDER - -#endif // _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN diff --git a/src/build/Jamfile b/src/build/Jamfile index ea21ddaaa9..b4fec86ec7 100644 --- a/src/build/Jamfile +++ b/src/build/Jamfile @@ -8,6 +8,6 @@ SubInclude HAIKU_TOP src build libshared ; SubInclude HAIKU_TOP src build libsolv ; SubInclude HAIKU_TOP src build libuuid ; -if $(HOST_PLATFORM) = darwin { +if $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = freebsd { SubInclude HAIKU_TOP src build libgnuregex ; } diff --git a/src/build/libgnuregex/Jamfile b/src/build/libgnuregex/Jamfile index ac52ac84ea..f0c880f50e 100644 --- a/src/build/libgnuregex/Jamfile +++ b/src/build/libgnuregex/Jamfile @@ -1,5 +1,7 @@ SubDir HAIKU_TOP src build libgnuregex ; +MakeLocate libgnuregex_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ; + BuildPlatformSharedLibrary libgnuregex_build.so : regex.c printchar.c diff --git a/src/tools/keymap/Jamfile b/src/tools/keymap/Jamfile index 80e0705578..a2f112e4d4 100644 --- a/src/tools/keymap/Jamfile +++ b/src/tools/keymap/Jamfile @@ -6,25 +6,16 @@ SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin keymap ] ; USES_BE_API on keymap = true ; -local regexSources ; local regexLib ; - -if $(HOST_PLATFORM) = freebsd { - # FreeBSD isolates the GNU regex functions into their own library. - regexLib = gnuregex ; -} else if $(HOST_PLATFORM) = darwin { - # Darwin does not have them at all, so we use the bundled version. +if $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = freebsd { + UseHeaders [ FDirName $(HAIKU_TOP) src build libgnuregex ] : true ; regexLib = libgnuregex_build.so ; } BuildPlatformMain keymap : main.cpp Keymap.cpp - $(regexSources) : libshared_build.a $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) $(regexLib) ; LinkAgainst keymap : $(HOST_LIBBE) ; - -SEARCH on [ FGristFiles $(regexSources) ] - = [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ;