Added support for building with Clang on OpenBSD. (#10028)

This commit is contained in:
Frederic Cambus 2022-07-03 19:54:58 +02:00 committed by GitHub
parent 174e6bdf44
commit 624793eac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View file

@ -1490,6 +1490,23 @@ openbsd_x86: generate $(PROJECTDIR)/$(MAKETYPE)-openbsd/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd config=$(CONFIG)32 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd config=$(CONFIG)32
#-------------------------------------------------
# gmake-openbsd-clang
#-------------------------------------------------
$(PROJECTDIR)/$(MAKETYPE)-openbsd-clang/Makefile: makefile $(SCRIPTS) $(GENIE)
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=openbsd-clang --gcc_version=$(CLANG_VERSION) $(MAKETYPE)
.PHONY: openbsd_x64_clang
openbsd_x64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang config=$(CONFIG)64 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang config=$(CONFIG)64
.PHONY: openbsd_x86_clang
openbsd_x86_clang: generate $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang config=$(CONFIG)32 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang config=$(CONFIG)32
#-------------------------------------------------
# Clean/bootstrap
#-------------------------------------------------

View file

@ -30,6 +30,7 @@ newoption {
{ "netbsd", "NetBSD" },
{ "netbsd-clang", "NetBSD (clang compiler)"},
{ "openbsd", "OpenBSD" },
{ "openbsd-clang", "OpenBSD (clang compiler)"},
{ "osx", "OSX (GCC compiler)" },
{ "osx-clang", "OSX (Clang compiler)" },
{ "solaris", "Solaris" },
@ -136,6 +137,10 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-openbsd")
end
if "openbsd-clang" == _OPTIONS["gcc"] then
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-openbsd-clang")
end
if "linux-gcc" == _OPTIONS["gcc"] then
-- Force gcc-4.2 on ubuntu-intrepid
if _OPTIONS["distro"]=="ubuntu-intrepid" then