mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Avoid build errors with -O0 due to assembly
This commit is contained in:
		
							parent
							
								
									3551901cd1
								
							
						
					
					
						commit
						25caaf36a6
					
				@ -8,6 +8,11 @@ Bugfix
 | 
				
			|||||||
     Follath. #309
 | 
					     Follath. #309
 | 
				
			||||||
   * Fix issue in Makefile that prevented building using armar. #386
 | 
					   * Fix issue in Makefile that prevented building using armar. #386
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Changes
 | 
				
			||||||
 | 
					   * On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5,
 | 
				
			||||||
 | 
					     don't use the optimized assembly for bignum multiplication. This removes
 | 
				
			||||||
 | 
					     the need to pass -fomit-frame-pointer to avoid a build error with -O0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
= mbed TLS 2.2.1 released 2016-01-05
 | 
					= mbed TLS 2.2.1 released 2016-01-05
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Security
 | 
					Security
 | 
				
			||||||
 | 
				
			|||||||
@ -563,7 +563,23 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#endif /* TriCore */
 | 
					#endif /* TriCore */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__arm__)
 | 
					/*
 | 
				
			||||||
 | 
					 * gcc -O0 by default uses r7 for the frame pointer, so it complains about our
 | 
				
			||||||
 | 
					 * use of r7 below, unless -fomit-frame-pointer is passed. Unfortunately,
 | 
				
			||||||
 | 
					 * passing that option is not easy when building with yotta.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * On the other hand, -fomit-frame-pointer is implied by any -Ox options with
 | 
				
			||||||
 | 
					 * x !=0, which we can detect using __OPTIMIZE__ (which is also defined by
 | 
				
			||||||
 | 
					 * clang and armcc5 under the same conditions).
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * So, only use the optimized assembly below for optimized build, which avoids
 | 
				
			||||||
 | 
					 * the build error and is pretty reasonable anyway.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#if defined(__GNUC__) && !defined(__OPTIMIZE__)
 | 
				
			||||||
 | 
					#define CANNOT_USE_R7
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if defined(__arm__) && !defined(CANNOT_USE_R7)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__thumb__) && !defined(__thumb2__)
 | 
					#if defined(__thumb__) && !defined(__thumb2__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user