[Bf-blender-cvs] [9f044cb422c] master: Remove MinGW support

Aaron Carlisle noreply at git.blender.org
Sat May 27 21:35:18 CEST 2017


Commit: 9f044cb422c1fc9ad79278092445f612342abb59
Author: Aaron Carlisle
Date:   Sat May 27 15:34:55 2017 -0400
Branches: master
https://developer.blender.org/rB9f044cb422c1fc9ad79278092445f612342abb59

Remove MinGW support

The Issue
=======

For a long time now MinGW has been unsupported and unmaintained and at this point,
it looks like something that we should just leave behind and move on.


Why Remove
==========

One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based.
However, now that this is no longer true we have basically stopped updating the need CMake files.
Along with the CMake files, there are several patches to the extern libs needed to make this work.  For example, see:
https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch

If we wanted to keep MinGW then we would need to make more custom patches to the external libs and
this is not something our platform maintainers are willing to do.

For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3

Fixes T51301

Differential Revision: https://developer.blender.org/D2648

===================================================================

M	build_files/buildbot/master_unpack.py
M	build_files/cmake/config/blender_full.cmake
M	build_files/cmake/config/blender_release.cmake
M	build_files/cmake/macros.cmake
M	build_files/cmake/platform/platform_win32.cmake
D	build_files/cmake/platform/platform_win32_mingw.cmake
M	build_files/cmake/platform/platform_win32_msvc.cmake
M	build_files/cmake/project_info.py
M	extern/carve/include/carve/win32.h
D	extern/carve/patches/mingw.patch
D	extern/carve/patches/mingw_w64.patch
M	extern/carve/patches/series
M	extern/carve/patches/win32.patch
M	intern/dualcon/intern/Projections.h
M	intern/dualcon/intern/dualcon_c_api.cpp
M	intern/elbeem/intern/mvmcoords.h
M	intern/ghost/intern/GHOST_Context.cpp
M	intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
M	intern/ghost/intern/GHOST_SystemPathsWin32.cpp
M	intern/ghost/intern/GHOST_SystemWin32.cpp
M	intern/ghost/intern/GHOST_SystemWin32.h
M	intern/ghost/intern/GHOST_TaskbarWin32.h
M	intern/guardedalloc/intern/mallocn_intern.h
M	intern/opencolorio/CMakeLists.txt
M	source/blender/blenkernel/BKE_global.h
M	source/blender/blenkernel/intern/writeframeserver.c
M	source/blender/blenlib/BLI_alloca.h
M	source/blender/blenlib/BLI_compiler_compat.h
M	source/blender/blenlib/BLI_fileops.h
M	source/blender/blenlib/BLI_fileops_types.h
M	source/blender/blenlib/BLI_sys_types.h
M	source/blender/blenlib/BLI_winstuff.h
M	source/blender/blenlib/intern/fileops.c
M	source/blender/blenlib/intern/path_util.c
M	source/blender/blenlib/intern/storage.c
M	source/blender/blenlib/intern/winstuff.c
M	source/blender/collada/MeshImporter.cpp
M	source/blender/collada/SkinInfo.cpp
M	source/blender/editors/space_file/fsmenu.c
M	source/blender/imbuf/intern/IMB_anim.h
M	source/blender/imbuf/intern/anim_movie.c
M	source/blender/imbuf/intern/dds/dds_api.cpp
M	source/blender/imbuf/intern/oiio/openimageio_api.cpp
M	source/blender/imbuf/intern/openexr/openexr_api.cpp
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/python/intern/bpy_app_handlers.c
M	source/blender/python/intern/bpy_rna.c
M	source/blenderplayer/CMakeLists.txt
M	source/creator/CMakeLists.txt
M	source/gameengine/Expressions/intern/HashedPtr.cpp
M	source/gameengine/Expressions/intern/InputParser.cpp
M	source/gameengine/Ketsji/KX_IPO_SGController.cpp
M	source/gameengine/Ketsji/KX_KetsjiEngine.cpp
M	source/gameengine/VideoTexture/ImageBase.cpp

===================================================================

diff --git a/build_files/buildbot/master_unpack.py b/build_files/buildbot/master_unpack.py
index 67b628f668a..157e244e210 100644
--- a/build_files/buildbot/master_unpack.py
+++ b/build_files/buildbot/master_unpack.py
@@ -49,7 +49,7 @@ def get_platform(filename):
     tokens = filename.split("-")
     platforms = ('osx', 'mac', 'bsd',
                  'win', 'linux', 'source',
-                 'irix', 'solaris', 'mingw')
+                 'irix', 'solaris')
     platform_tokens = []
     found = False
 
diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake
index ecde50ff156..62e2ce1636d 100644
--- a/build_files/cmake/config/blender_full.cmake
+++ b/build_files/cmake/config/blender_full.cmake
@@ -63,17 +63,10 @@ if(UNIX AND NOT APPLE)
 	set(WITH_OPENSUBDIV          ON  CACHE BOOL "" FORCE)
 elseif(WIN32)
 	set(WITH_JACK                OFF CACHE BOOL "" FORCE)
-	if(NOT CMAKE_COMPILER_IS_GNUCC)
-		set(WITH_OPENSUBDIV          ON  CACHE BOOL "" FORCE)
-	else()
-		# MinGW exceptions
-		set(WITH_OPENSUBDIV          OFF CACHE BOOL "" FORCE)
-		set(WITH_CODEC_SNDFILE       OFF CACHE BOOL "" FORCE)
-		set(WITH_CYCLES_OSL          OFF CACHE BOOL "" FORCE)
-	endif()
+	set(WITH_OPENSUBDIV          ON  CACHE BOOL "" FORCE)
 elseif(APPLE)
 	set(WITH_JACK                ON  CACHE BOOL "" FORCE)
-	set(WITH_CODEC_QUICKTIME     OFF  CACHE BOOL "" FORCE)
+	set(WITH_CODEC_QUICKTIME     OFF CACHE BOOL "" FORCE)
 	set(WITH_OPENSUBDIV          OFF CACHE BOOL "" FORCE)
 
 #	include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake
index f7239559fb8..3e2e26e6a44 100644
--- a/build_files/cmake/config/blender_release.cmake
+++ b/build_files/cmake/config/blender_release.cmake
@@ -64,17 +64,10 @@ if(UNIX AND NOT APPLE)
 	set(WITH_OPENSUBDIV          ON  CACHE BOOL "" FORCE)
 elseif(WIN32)
 	set(WITH_JACK                OFF CACHE BOOL "" FORCE)
-	if(NOT CMAKE_COMPILER_IS_GNUCC)
-		set(WITH_OPENSUBDIV          ON  CACHE BOOL "" FORCE)
-	else()
-		# MinGW exceptions
-		set(WITH_OPENSUBDIV          OFF CACHE BOOL "" FORCE)
-		set(WITH_CODEC_SNDFILE       OFF CACHE BOOL "" FORCE)
-		set(WITH_CYCLES_OSL          OFF CACHE BOOL "" FORCE)
-	endif()
+	set(WITH_OPENSUBDIV          ON  CACHE BOOL "" FORCE)
 elseif(APPLE)
 	set(WITH_JACK                ON  CACHE BOOL "" FORCE)
-	set(WITH_CODEC_QUICKTIME     OFF  CACHE BOOL "" FORCE)
+	set(WITH_CODEC_QUICKTIME     OFF CACHE BOOL "" FORCE)
 	set(WITH_OPENSUBDIV          OFF CACHE BOOL "" FORCE)
 
 #	include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index f62e55941a7..6303119773d 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -1247,17 +1247,6 @@ endfunction()
 # hacks to override initial project settings
 # these macros must be called directly before/after project(Blender)
 macro(blender_project_hack_pre)
-	# ----------------
-	# MINGW HACK START
-	# ignore system set flag, use our own
-	# must be before project(...)
-	# if the user wants to add their own its ok after first run.
-	if(DEFINED CMAKE_C_STANDARD_LIBRARIES)
-		set(_reset_standard_libraries OFF)
-	else()
-		set(_reset_standard_libraries ON)
-	endif()
-
 	# ------------------
 	# GCC -O3 HACK START
 	# needed because O3 can cause problems but
@@ -1276,25 +1265,6 @@ endmacro()
 
 
 macro(blender_project_hack_post)
-	# --------------
-	# MINGW HACK END
-	if(_reset_standard_libraries)
-		# Must come after projecINCt(...)
-		#
-		# MINGW workaround for -ladvapi32 being included which surprisingly causes
-		# string formatting of floats, eg: printf("%.*f", 3, value). to crash blender
-		# with a meaningless stack trace. by overriding this flag we ensure we only
-		# have libs we define.
-		set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
-		set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
-		mark_as_advanced(
-			CMAKE_C_STANDARD_LIBRARIES
-			CMAKE_CXX_STANDARD_LIBRARIES
-		)
-	endif()
-	unset(_reset_standard_libraries)
-
-
 	# ----------------
 	# GCC -O3 HACK END
 	if(_reset_standard_cflags_rel)
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 631973b758b..2f5d41dac32 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -27,12 +27,10 @@ add_definitions(-DWIN32)
 
 if(MSVC)
 	include(platform_win32_msvc)
-elseif(CMAKE_COMPILER_IS_GNUCC)
-	include(platform_win32_mingw)
+else()
+	message(FATAL_ERROR "Compiler is unsupported")
 endif()
 
-# Things common to both mingw and MSVC  should go here
-
 set(WINTAB_INC ${LIBDIR}/wintab/include)
 
 if(WITH_OPENAL)
diff --git a/build_files/cmake/platform/platform_win32_mingw.cmake b/build_files/cmake/platform/platform_win32_mingw.cmake
deleted file mode 100644
index 216568bd069..00000000000
--- a/build_files/cmake/platform/platform_win32_mingw.cmake
+++ /dev/null
@@ -1,302 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2016, Blender Foundation
-# All rights reserved.
-#
-# Contributor(s): Sergey Sharybin.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-# Libraries configuration for Windows when compiling with MinGW.
-
-# keep GCC specific stuff here
-include(CheckCSourceCompiles)
-# Setup 64bit and 64bit windows systems
-CHECK_C_SOURCE_COMPILES("
-	#ifndef __MINGW64__
-	#error
-	#endif
-	int main(void) { return 0; }
-	"
-	WITH_MINGW64
-)
-
-if(NOT DEFINED LIBDIR)
-	if(WITH_MINGW64)
-		message(STATUS "Compiling for 64 bit with MinGW-w64.")
-		set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
-	else()
-		message(STATUS "Compiling for 32 bit with MinGW-w32.")
-		set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
-
-		if(WITH_RAYOPTIMIZATION)
-			message(WARNING "MinGW-w32 is known to be unstable with 'WITH_RAYOPTIMIZATION' option enabled.")
-		endif()
-	endif()
-else()
-	message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
-endif()
-if(NOT EXISTS "${LIBDIR}/")
-	message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
-endif()
-
-list(APPEND PLATFORM_LINKLIBS
-	-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32
-	-lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp
-)
-
-if(WITH_INPUT_IME)
-	list(APPEND PLATFORM_LINKLIBS -limm32)
-endif()
-
-set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
-
-if(WITH_MINGW64)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
-	list(APPEND PLATFORM_LINKLIBS -lpthread)
-
-	add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
-endif()
-
-add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
-
-add_definitions(-DFREE_WINDOWS)
-
-set(PNG "${LIBDIR}/png")
-set(PNG_INCLUDE_DIRS "${PNG}/include")
-set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
-
-if(WITH_MINGW64)
-	set(JPEG_LIBRARIES jpeg)
-else()
-	set(JPEG_LIBRARIES libjpeg)
-endif()
-set(PNG_LIBRARIES png)
-
-set(ZLIB ${LIBDIR}/zlib)
-set(ZLIB_INCLUDE_DIRS ${ZLIB}/include)
-set(ZLIB_LIBPATH ${ZLIB}/lib)
-set(ZLIB_LIBRARIES z)
-
-set(JPEG "${LIBDIR}/jpeg")
-set(JPEG_INCLUDE_DIR "${JPEG}/include")
-set(JPEG_LIBPATH ${JPEG}/lib) # not cmake defined
-
-# comes with own pthread library
-if(NOT WITH_MINGW64)
-	set(PTHREADS ${LIBDIR}/pthreads)
-	#set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
-	set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-	set(PTHREADS_LIBRARIES pthreadGC2)
-endif()
-
-set(FREETYPE ${LIBDIR}/freetype)
-set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-set(FREETYPE_LIBPATH ${FREETYPE}/lib)
-set(FREETYPE_LIBRARY freetype)
-
-if(WITH_FFTW3)
-	set(FFTW3 ${LIBDIR}/fftw3)
-	set(FFTW3_LIBRARIES fftw3)
-	set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
-	set(FFTW3_LIBPATH ${FFTW3}/lib)
-endif()
-
-if(WITH_OPENCOLLADA)
-	set(OPENCOLLADA ${LIBDIR}/opencollada)
-	set(OPENCOLLADA_INCLUDE_DIRS
-		${OPENCOLLADA}/include/opencollada/COLLADAStreamWriter
-		${OPENCOLLADA}/include/opencollada/COLLADABaseUtils
-		${OPENCOLLADA}/include/opencollada/COLLADAFramework
-		${OPENCOLLADA}/include/opencollada/COLLADASaxFrameworkLoader
-		${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
-	)
-	set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada)
-	set(OPENCOLLADA_LIBRARIES
-		OpenCOLLADAStreamWriter
-		OpenCOLLADASaxFrameworkLoader
-		OpenCOLLADAFramework
-		OpenCOLLADABaseUtils
-		GeneratedSaxParser
-		UTF MathMLSolver buffer ftoa xml
-	)
-	set(PCRE_LIBRARIES pcre)
-endif()
-
-if(WITH_CODEC_FFMPEG)
-	set(FFMPEG ${LIBDIR}/ffmpeg)
-	set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
-	if(WITH_MINGW64)
-		set(FFMPEG_LIBRARIES avcodec.dll avformat.dll avdevice.dll avutil.dll swscale.dll swresample.dll)
-	else()
-		set(FFMPEG_LIBRARIES avcodec-55 avformat-55 avdevice-55 avutil-52 swscale-2)
-	endif()
-	set(FFMPEG_LIBPATH ${FFMPEG}/lib)
-endif()
-
-if(WITH_IMAGE_OPENEXR)
-	set(OPENEXR ${LIBDIR}/openexr)
-	set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
-	set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
-	set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
-	set(OPENEXR_LIBPATH ${OPENEXR}/lib)
-endif()
-
-if(WITH_IMAGE_TIFF)
-	set(TIFF ${LIBDIR}/tiff)
-	set(TIFF_LIBRARY tiff)
-	set(TIFF_INCLUDE_DIR ${TIFF}/include)
-	set(TIFF_LIBPATH ${TIFF}/lib)
-endif()
-
-if(WITH_JACK)
-	set(JACK ${LIBDIR}/jack)
-	set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
-	set(JACK_LIBRARIES jack)
-	set(JAC

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list