v: building on NetBSD (#9953)

pull/9992/head
Rhialto The M 2021-05-03 18:50:54 +02:00 committed by GitHub
parent 1d045e5496
commit c21df2d44c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -40,6 +40,11 @@ TCCOS := freebsd
LDFLAGS += -lexecinfo
endif
ifeq ($(_SYS),NetBSD)
TCCOS := netbsd
LDFLAGS += -lexecinfo
endif
ifdef ANDROID_ROOT
ANDROID := 1
undefine LINUX
@ -94,10 +99,11 @@ clean:
rm -rf $(TMPTCC)
rm -rf $(VC)
latest_vc: $(VC)/.git/config
ifndef local
latest_vc: $(VC)/.git/config
cd $(VC) && $(GITCLEANPULL)
else
latest_vc:
@echo "Using local vc"
endif
@ -105,11 +111,12 @@ fresh_vc:
rm -rf $(VC)
$(GITFASTCLONE) $(VCREPO) $(VC)
latest_tcc: $(TMPTCC)/.git/config
ifndef ANDROID
ifndef local
latest_tcc: $(TMPTCC)/.git/config
cd $(TMPTCC) && $(GITCLEANPULL)
else
latest_tcc:
@echo "Using local tcc"
endif
endif

View File

@ -386,8 +386,8 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
if v.pref.os == .linux {
ccoptions.linker_flags << '-ldl'
}
if v.pref.os == .freebsd {
// FreeBSD: backtrace needs execinfo library while linking
if v.pref.os in [.freebsd, .netbsd] {
// Free/NetBSD: backtrace needs execinfo library while linking
ccoptions.linker_flags << '-lexecinfo'
}
}