mirror of
https://git.freebsd.org/ports.git
synced 2025-06-04 20:36:30 -04:00
This introduces flang-driver, a clang6-derived driver / companion compiler, and uses math/libpgmath as the math library backend. Notably, the latter currently limits us to 12-CURRENT. Patches are a combination of carry-over and adapted OpenBSD ones. While there, pet portlint. Reviewed by: zeising (mentor), mat Approved by: zeising (mentor) Obtained from: Brian Callahan (bcallah@openbsd.org) with adaptations Differential Revision: https://reviews.freebsd.org/D17036
41 lines
1.5 KiB
Text
41 lines
1.5 KiB
Text
--- CMakeLists.txt.orig 2018-09-03 06:03:48 UTC
|
|
+++ CMakeLists.txt
|
|
@@ -49,6 +49,19 @@ if( ${TARGET_OS} STREQUAL "Linux" )
|
|
message("Unsupported architecture: ${TARGET_ARCHITECTURE}" )
|
|
return()
|
|
endif()
|
|
+elseif( ${TARGET_OS} STREQUAL "FreeBSD" )
|
|
+ set(OS "FREEBSD")
|
|
+ set(OSNAME "FreeBSD")
|
|
+ # this is very hacky!
|
|
+ if( ${TARGET_ARCHITECTURE} STREQUAL "amd64" )
|
|
+ set(ARCHNAME x86-64)
|
|
+ set(ARCH X86)
|
|
+ set(WRDSZ 64)
|
|
+ set(TARGET_ARCHITECTURE x86_64)
|
|
+ else()
|
|
+ message("Unsupported architecture: ${TARGET_ARCHITECTURE}" )
|
|
+ return()
|
|
+ endif()
|
|
else()
|
|
message("Unsupported OS: ${TARGET_OS}" )
|
|
return()
|
|
@@ -57,7 +70,8 @@ endif()
|
|
# The cmake documentation states that these are set. They are not so we
|
|
# set them here
|
|
set(CMAKE_HOST_SYSTEM_NAME ${TARGET_OS})
|
|
-set(CMAKE_HOST_SYSTEM_PROCESSOR ${TARGET_ARCHITECTURE})
|
|
+# also a hack
|
|
+set(CMAKE_HOST_SYSTEM_PROCESSOR "x86-64")
|
|
|
|
# If we are not building as a part of LLVM, build Flang as an
|
|
# standalone project, using LLVM as an external library:
|
|
@@ -289,7 +303,7 @@ endif()
|
|
# Add appropriate flags for GCC
|
|
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
|
|
- option(WITH_WERROR "Compile with '-Werror' C compiler flag" ON)
|
|
+ option(WITH_WERROR "Compile with '-Werror' C compiler flag" OFF)
|
|
if (WITH_WERROR)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
|
endif ()
|