blob: bdaf4f8a3c7d4fe06c257ab5cd34aaabe2ecd23a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
--- Makefile.orig 2020-09-06 09:31:51 UTC
+++ Makefile
@@ -25,6 +25,9 @@
ifeq ($(shell uname -s),Darwin)
CONFIG_DARWIN=y
endif
+ifeq ($(shell uname -s),FreeBSD)
+CONFIG_FREEBSD=y
+endif
# Windows cross compilation from Linux
#CONFIG_WIN32=y
# use link time optimization (smaller and faster executables but slower build)
@@ -39,6 +42,12 @@ ifdef CONFIG_DARWIN
CONFIG_CLANG=y
CONFIG_DEFAULT_AR=y
endif
+ifdef CONFIG_FREEBSD
+# use clang instead of gcc
+CONFIG_CLANG=
+CONFIG_DEFAULT_AR=y
+CONFIG_LTO=
+endif
# installation directory
prefix=/usr/local
@@ -81,8 +90,8 @@ ifdef CONFIG_CLANG
endif
endif
else
- HOST_CC=gcc
- CC=$(CROSS_PREFIX)gcc
+ HOST_CC=gcc%%GCC_DEFAULT%%
+ CC=$(CROSS_PREFIX)gcc%%GCC_DEFAULT%%
CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d
CFLAGS += -Wno-array-bounds -Wno-format-truncation
ifdef CONFIG_LTO
|