LTO is broken on GCC < 4.9.0, disable it.
References: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038 - https://github.com/Project-OSRM/node-osrm/pull/112
This commit is contained in:
		
							parent
							
								
									3f7afd47d2
								
							
						
					
					
						commit
						119fb63576
					
				| @ -155,6 +155,11 @@ if(CMAKE_BUILD_TYPE MATCHES Release) | ||||
|       set(CMAKE_AR     "/usr/bin/gcc-ar") | ||||
|       set(CMAKE_RANLIB "/usr/bin/gcc-ranlib") | ||||
|     endif() | ||||
| 
 | ||||
|     if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0") | ||||
|       message(STATUS "Disabling LTO on GCC < 4.9.0 since it is broken, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038") | ||||
|       set(CMAKE_CXX_FLAGS "${OLD_CXX_FLAGS}") | ||||
|     endif() | ||||
|   endif() | ||||
| endif() | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user