games/fs2open: fix build when lld is present
Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D20268
This commit is contained in:
parent
4842639ea0
commit
1a34cf5e28
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=503749
@ -3,6 +3,7 @@
|
||||
PORTNAME= fs2open
|
||||
DISTVERSIONPREFIX= release_
|
||||
DISTVERSION= 3_8_0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= games
|
||||
|
||||
MAINTAINER= pkubaj@FreeBSD.org
|
||||
@ -17,6 +18,7 @@ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \
|
||||
libpng16.so:graphics/png
|
||||
|
||||
USES= cmake compiler:c++11-lang lua:51 jpeg openal pkgconfig sdl
|
||||
LLD_UNSAFE= yes
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= scp-fs2open
|
||||
GH_PROJECT= fs2open.github.com
|
||||
|
@ -1,5 +1,16 @@
|
||||
--- cmake/toolchain-clang.cmake.orig 2018-06-24 19:14:21 UTC
|
||||
--- cmake/toolchain-clang.cmake.orig 2017-08-22 16:56:27 UTC
|
||||
+++ cmake/toolchain-clang.cmake
|
||||
@@ -8,8 +8,8 @@ option(CLANG_ENABLE_LEAK_CHECK "Enable -fsanitize=leak
|
||||
option(CLANG_ENABLE_ADDRESS_SANITIZER "Enable -fsanitize=address" OFF)
|
||||
|
||||
# These are the default values
|
||||
-set(C_BASE_FLAGS "-march=native -pipe")
|
||||
-set(CXX_BASE_FLAGS "-march=native -pipe")
|
||||
+set(C_BASE_FLAGS "${CMAKE_C_FLAGS_RELEASE}")
|
||||
+set(CXX_BASE_FLAGS "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
|
||||
# For C and C++, the values can be overwritten independently
|
||||
if(DEFINED ENV{CXXFLAGS})
|
||||
@@ -80,7 +80,7 @@ if(SUPPORTS_SHIFT_NEGATIVE_VALUE)
|
||||
set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-shift-negative-value")
|
||||
endif()
|
||||
@ -9,3 +20,13 @@
|
||||
|
||||
set(COMPILER_FLAGS_DEBUG "-O0 -g -Wshadow")
|
||||
|
||||
@@ -93,9 +93,6 @@ set(CMAKE_C_FLAGS_RELEASE ${COMPILER_FLAGS_RELEASE})
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
|
||||
set(CMAKE_C_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
|
||||
-
|
||||
-
|
||||
-set(CMAKE_EXE_LINKER_FLAGS "")
|
||||
|
||||
if (SANITIZE_FLAGS)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SANITIZE_FLAGS}")
|
||||
|
@ -1,6 +1,17 @@
|
||||
--- cmake/toolchain-gcc.cmake.orig 2018-06-24 19:15:11 UTC
|
||||
--- cmake/toolchain-gcc.cmake.orig 2017-08-22 16:56:27 UTC
|
||||
+++ cmake/toolchain-gcc.cmake
|
||||
@@ -87,7 +87,7 @@ set(COMPILER_FLAGS "${COMPILER_FLAGS} -W
|
||||
@@ -10,8 +10,8 @@ option(GCC_ENABLE_ADDRESS_SANITIZER "Enable -fsanitize
|
||||
option(GCC_ENABLE_SANITIZE_UNDEFINED "Enable -fsanitize=undefined" OFF)
|
||||
|
||||
# These are the default values
|
||||
-set(C_BASE_FLAGS "-march=native -pipe")
|
||||
-set(CXX_BASE_FLAGS "-march=native -pipe")
|
||||
+set(C_BASE_FLAGS "${CMAKE_C_FLAGS_RELEASE}" )
|
||||
+set(CXX_BASE_FLAGS "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
|
||||
# For C and C++, the values can be overwritten independently
|
||||
if(DEFINED ENV{CFLAGS})
|
||||
@@ -87,7 +87,7 @@ set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-deprecated
|
||||
|
||||
set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-unused-parameter")
|
||||
|
||||
@ -9,3 +20,12 @@
|
||||
|
||||
set(COMPILER_FLAGS_DEBUG "-O0 -g -Wshadow")
|
||||
|
||||
@@ -100,8 +100,6 @@ set(CMAKE_C_FLAGS_RELEASE ${COMPILER_FLAGS_RELEASE})
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
|
||||
set(CMAKE_C_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
|
||||
-
|
||||
-set(CMAKE_EXE_LINKER_FLAGS "")
|
||||
|
||||
IF (MINGW)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++ -Wl,--enable-auto-import")
|
||||
|
Loading…
Reference in New Issue
Block a user