[ox/std] Add substitutes file with missing __cxa_pure_virtual handler
This commit is contained in:
		
							
								
								
									
										1
									
								
								deps/ox/src/ox/std/CMakeLists.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								deps/ox/src/ox/std/CMakeLists.txt
									
									
									
									
										vendored
									
									
								
							| @@ -6,6 +6,7 @@ add_library( | ||||
| 		memops.cpp | ||||
| 		new.cpp | ||||
| 		random.cpp | ||||
| 		substitutes.cpp | ||||
| 		stacktrace.cpp | ||||
| 		strops.cpp | ||||
| 		trace.cpp | ||||
|   | ||||
							
								
								
									
										29
									
								
								deps/ox/src/ox/std/substitutes.cpp
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								deps/ox/src/ox/std/substitutes.cpp
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| /* | ||||
|  * Copyright 2015 - 2018 gtalent2@gmail.com | ||||
|  * | ||||
|  * This Source Code Form is subject to the terms of the Mozilla Public | ||||
|  * License, v. 2.0. If a copy of the MPL was not distributed with this | ||||
|  * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||||
|  */ | ||||
|  | ||||
| #ifndef OX_USE_STDLIB | ||||
|  | ||||
| #include <cstdlib> | ||||
| #include <stdio.h> | ||||
|  | ||||
| // weak link panic to ensure that it exists, but allow it to be overriden by | ||||
| // platform specific code | ||||
| void __attribute__((weak)) panic(const char *msg) { | ||||
| 	printf("Unexpected state:\n%s", msg); | ||||
| 	std::abort(); | ||||
| } | ||||
|  | ||||
| extern "C" { | ||||
| 	 | ||||
| void __cxa_pure_virtual() {  | ||||
| 	panic("Missing virtual function"); | ||||
| } | ||||
|  | ||||
| } | ||||
|  | ||||
| #endif | ||||
		Reference in New Issue
	
	Block a user