From 39b6b59b81aa4600e025bd1bf23ebe7f765b43f4 Mon Sep 17 00:00:00 2001
From: Fred Gilham <fred@sunbot.homedns.org>
Date: Tue, 21 Mar 2017 18:16:45 -0700
Subject: [PATCH] Changes to allow building CMUCL under FreeBSD 10 and later.

---
 src/lisp/Config.x86_freebsd     | 2 ++
 src/motif/server/Config.FreeBSD | 2 ++
 src/tools/linker.sh             | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lisp/Config.x86_freebsd b/src/lisp/Config.x86_freebsd
index cf8089f44..5b1760fe1 100644
--- a/src/lisp/Config.x86_freebsd
+++ b/src/lisp/Config.x86_freebsd
@@ -1,5 +1,7 @@
 # -*- Mode: makefile -*-
 include Config.x86_common
+# Set the path to your 32-bit verison of GCC here.
+CC=gcc
 
 CPPFLAGS += -march=pentium4 -mfpmath=sse
 
diff --git a/src/motif/server/Config.FreeBSD b/src/motif/server/Config.FreeBSD
index 87041ba3e..02de22a95 100644
--- a/src/motif/server/Config.FreeBSD
+++ b/src/motif/server/Config.FreeBSD
@@ -1,3 +1,5 @@
+## Path to 32-bit GCC compiler.
+CC=gcc
 CFLAGS = -pthread -O2 -I/usr/local/include -I. -I$(VPATH)
 LDFLAGS = -L/usr/local/lib
 LIBS = -lXm -lXt -lX11
diff --git a/src/tools/linker.sh b/src/tools/linker.sh
index 0006b4afc..cc6960c36 100755
--- a/src/tools/linker.sh
+++ b/src/tools/linker.sh
@@ -70,7 +70,7 @@ case $uname_s in
       # See Config.x86_${uname_s}
       case $uname_s in
 	Linux) OS_LIBS=-ldl;;
-	FreeBSD) OS_LIBS=-lutil;;
+	FreeBSD) OS_LIBS="-B/usr/lib32 -lutil";;
       esac
       ;;
   Darwin)
-- 
GitLab