From 16b34a8fc758f64fd6ad69d3f6b77bc810db35c8 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Wed, 27 Dec 2017 23:05:50 -0500 Subject: [PATCH] Fix FreeBSD build. - Recent changes to the build system appear to make the assumption that the GNU regex APIs are universally available. This isn't the case on FreeBSD, which requires libgnuregex to provide that functionality. This broke the host keymap build. --- build/jam/BuildSetup | 2 +- src/tools/keymap/Jamfile | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index d9f8c7d330..44a6620fcd 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -573,7 +573,7 @@ HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host $(HOST_PLATFORM) ] ; if $(HOST_PLATFORM) = freebsd { # FreeBSD's gcc doesn't include /usr/local/* in its search paths, # though that's where most things from ports wind up being installed. - HOST_HDRS += /usr/local/include ; + HOST_HDRS += /usr/local/include /usr/include/gnu ; HOST_LINKFLAGS += -L/usr/local/lib ; } diff --git a/src/tools/keymap/Jamfile b/src/tools/keymap/Jamfile index b14ee7e2f2..0e4fa30a8c 100644 --- a/src/tools/keymap/Jamfile +++ b/src/tools/keymap/Jamfile @@ -7,6 +7,7 @@ SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin keymap ] ; USES_BE_API on keymap = true ; local regexSources ; +local regexLib ; if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos { UseHeaders [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ; @@ -14,11 +15,16 @@ if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos { regexSources = regex.c ; } +# FreeBSD isolates the GNU-style functions and structures into their own library. +if $(HOST_PLATFORM) = freebsd { + regexLib = gnuregex ; +} + BuildPlatformMain keymap : main.cpp Keymap.cpp $(regexSources) - : libshared_build.a $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) + : libshared_build.a $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) $(regexLib) ; LinkAgainst keymap : $(HOST_LIBBE) ;