[Core] Squeeze AVR some more with -mrelax and -mcall-prologues (#16269)
				
					
				
			This commit is contained in:
		
							parent
							
								
									cb8528c33c
								
							
						
					
					
						commit
						156f0561f2
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -18,6 +18,13 @@ COMPILEFLAGS += -ffunction-sections
 | 
			
		|||
COMPILEFLAGS += -fdata-sections
 | 
			
		||||
COMPILEFLAGS += -fpack-struct
 | 
			
		||||
COMPILEFLAGS += -fshort-enums
 | 
			
		||||
COMPILEFLAGS += -mcall-prologues
 | 
			
		||||
 | 
			
		||||
# Linker relaxation is only possible if
 | 
			
		||||
# link time optimizations are not enabled.
 | 
			
		||||
ifeq ($(strip $(LTO_ENABLE)), no)
 | 
			
		||||
	COMPILEFLAGS += -mrelax
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ASFLAGS += $(AVR_ASFLAGS)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -28,7 +35,7 @@ CFLAGS += -fno-strict-aliasing
 | 
			
		|||
CXXFLAGS += $(COMPILEFLAGS)
 | 
			
		||||
CXXFLAGS += -fno-exceptions -std=c++11
 | 
			
		||||
 | 
			
		||||
LDFLAGS +=-Wl,--gc-sections
 | 
			
		||||
LDFLAGS += -Wl,--gc-sections
 | 
			
		||||
 | 
			
		||||
OPT_DEFS += -DF_CPU=$(F_CPU)UL
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue