mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-30 05:42:37 +00:00 
			
		
		
		
	Kernel/aarch64: Add -mstrict-align flag to Kernel build
The ARM CPU is set up to trap on unaligned accesses, however the compiler will still generate them if this flag is not set. We also need the -Wno-cast-align as there are some files in AK that don't build without the flag.
This commit is contained in:
		
							parent
							
								
									0226390b21
								
							
						
					
					
						commit
						a473cfd71b
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -671,6 +671,10 @@ endif() | ||||||
| 
 | 
 | ||||||
| if ("${SERENITY_ARCH}" STREQUAL "aarch64") | if ("${SERENITY_ARCH}" STREQUAL "aarch64") | ||||||
|     add_compile_options(-fno-threadsafe-statics) |     add_compile_options(-fno-threadsafe-statics) | ||||||
|  | 
 | ||||||
|  |     # Unaligned memory access will cause a trap, so to make sure the compiler doesn't generate | ||||||
|  |     # those unaligned accesses, this flag is added. | ||||||
|  |     add_compile_options(-mstrict-align -Wno-cast-align) | ||||||
| endif() | endif() | ||||||
| 
 | 
 | ||||||
| add_compile_definitions(KERNEL) | add_compile_definitions(KERNEL) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timon Kruiper
						Timon Kruiper