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.
This commit is contained in:
Rene Gollent
2017-12-27 23:06:56 -05:00
parent 73159ec931
commit 16b34a8fc7
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -573,7 +573,7 @@ HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host $(HOST_PLATFORM) ] ;
if $(HOST_PLATFORM) = freebsd { if $(HOST_PLATFORM) = freebsd {
# FreeBSD's gcc doesn't include /usr/local/* in its search paths, # FreeBSD's gcc doesn't include /usr/local/* in its search paths,
# though that's where most things from ports wind up being installed. # 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 ; HOST_LINKFLAGS += -L/usr/local/lib ;
} }
+7 -1
View File
@@ -7,6 +7,7 @@ SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin keymap ] ;
USES_BE_API on <build>keymap = true ; USES_BE_API on <build>keymap = true ;
local regexSources ; local regexSources ;
local regexLib ;
if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos { if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos {
UseHeaders [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ; UseHeaders [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ;
@@ -14,11 +15,16 @@ if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos {
regexSources = regex.c ; regexSources = regex.c ;
} }
# FreeBSD isolates the GNU-style functions and structures into their own library.
if $(HOST_PLATFORM) = freebsd {
regexLib = gnuregex ;
}
BuildPlatformMain <build>keymap : BuildPlatformMain <build>keymap :
main.cpp main.cpp
Keymap.cpp Keymap.cpp
$(regexSources) $(regexSources)
: libshared_build.a $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) : libshared_build.a $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) $(regexLib)
; ;
LinkAgainst <build>keymap : $(HOST_LIBBE) ; LinkAgainst <build>keymap : $(HOST_LIBBE) ;