Overview
Comment: | Pass ObjFWRTBase from the app to ObjFW .library |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | amiga-library |
Files: | files | file ages | folders |
SHA3-256: |
f56bb21f661e17d0cc206ca805cb5a1c |
User & Date: | js on 2022-12-16 20:27:14 |
Other Links: | branch diff | manifest | tags |
Context
2022-12-18
| ||
08:48 | amiga-library.xml: Fix register double use check-in: cee2c04176 user: js tags: amiga-library | |
2022-12-16
| ||
20:27 | Pass ObjFWRTBase from the app to ObjFW .library check-in: f56bb21f66 user: js tags: amiga-library | |
18:51 | Copy Amiga .library instead of symlinking it check-in: 2ce550435b user: js tags: amiga-library | |
Changes
Modified src/amiga-glue.h from [be6bd62ab2] to [effea05928].
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + | register type reg##name __asm__(#reg); \ type name = reg##name; #else # define PPC_PARAMS(...) (__VA_ARGS__) # define M68K_ARG(...) #endif |
︙ |
Modified src/amiga-glue.m from [edf7296f72] to [3e5ca453ed].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + + - + | "__restore_r13:\n" " lwz %r13, 44(%r12)\n" " blr\n" ); #endif bool __saveds |
︙ |
Modified src/amiga-library.h from [85a01bf187] to [2f42cb2fe9].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + + | * file. */ #import "macros.h" #import "OFPBKDF2.h" #import "OFScrypt.h" #include <exec/libraries.h> #ifdef OF_MORPHOS # include <ppcinline/macros.h> # define OF_M68K_ARG(type, name, reg) type name = (type)REG_##reg; #else # define OF_M68K_ARG(type, name, reg) \ register type reg_##name __asm__(#reg); \ type name = reg_##name; |
︙ | |||
105 106 107 108 109 110 111 | 107 108 109 110 111 112 113 114 115 116 117 118 | - + + | void *_Null_unspecified), void *_Null_unspecified); #ifdef OF_MORPHOS int (*_Nonnull setjmp)(jmp_buf); void __dead2 (*_Nonnull longjmp)(jmp_buf, int); #endif }; |
Modified src/amiga-library.m from [530b254cbd] to [ec8f0c881c].
︙ | |||
77 78 79 80 81 82 83 84 85 86 87 88 89 90 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | + | #endif #ifdef OF_MORPHOS const ULONG __abox__ = 1; #endif struct ExecBase *SysBase; struct OFLibC libC; struct Library *ObjFWRTBase; #if defined(OF_AMIGAOS_M68K) __asm__ ( ".text\n" ".globl ___restore_a4\n" ".align 1\n" "___restore_a4:\n" |
︙ | |||
323 324 325 326 327 328 329 330 331 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | + + + + + + + + + + + + + + + - + - + | } static void * libNull(void) { return NULL; } static void __saveds OFInitPart2(uintptr_t *iter0, struct Library *RTBase) { uintptr_t *iter; ObjFWRTBase = RTBase; for (iter = iter0; *iter != 0; iter++); while (iter > iter0) { void (*ctor)(void) = (void (*)(void))*--iter; ctor(); } } bool |
︙ | |||
364 365 366 367 368 369 370 | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - - + - - - - | "la %1, __CTOR_LIST__@l(%1)\n\t" : "=r"(frame), "=r"(iter0) ); libC.__register_frame(frame); #endif |
︙ |
Modified src/amiga-library.xml from [31286c8139] to [25a1fc30c8].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + | <amiga-library version='1.0' base='ObjFWBase'> <include>amiga-library.h</include> <!-- The following function is only for the linklib. --> <function name='OFInit' return-type='bool'> <argument name='version' type='unsigned int' m68k-reg='d0'/> <argument name='libc' type='struct OFLibC *_Nonnull' m68k-reg='a0'/> <argument name='RTBase' type='struct Library *_Nonnull' m68k-reg='a0'/> </function> <include>OFObject.h</include> <function name='OFAllocMemory' return-type='void *_Nullable'> <argument name='count' type='size_t' m68k-reg='d0'/> <argument name='size' type='size_t' m68k-reg='d1'/> </function> <function name='OFAllocZeroedMemory' return-type='void *_Nullable'> |
︙ |
Modified src/linklib/Makefile from [e3799cef78] to [33cfe89605].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + | include ../../extra.mk STATIC_LIB = libobjfw.library.a STATIC_AMIGA_LIB = libobjfw.library.amigalib.a SRCS = init.m \ linklib.m include ../../buildsys.mk CPPFLAGS += -I.. -I../.. -I../exceptions -I../runtime \ -DOBJFW_AMIGA_LIB=\"${OBJFW_AMIGA_LIB}\" \ -DOBJFW_LIB_MINOR=${OBJFW_LIB_MINOR} AMIGA_LIB_CFLAGS += -DOF_AMIGA_LIB |
Modified src/linklib/init.m from [5a87af71c9] to [59e1e80ea6].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - - + | #import "macros.h" #import "amiga-library.h" #define USE_INLINE_STDARG #include <proto/exec.h> #include <proto/intuition.h> |
︙ | |||
271 272 273 274 275 276 277 278 279 280 281 282 283 284 | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | + + + | void *__objc_class_name_OFMapTableSet; void *__objc_class_name_OFMutableMapTableSet; void *__objc_class_name_OFMutableUTF8String; void *__objc_class_name_OFRangeCharacterSet; void *__objc_class_name_OFSelectKernelEventObserver; void *__objc_class_name_OFUTF8String; #ifndef OF_AMIGA_LIB struct Library *ObjFWBase; static void error(const char *string, ULONG arg) { struct Library *IntuitionBase = OpenLibrary("intuition.library", 0); if (IntuitionBase != NULL) { struct EasyStruct easy = { |
︙ | |||
366 367 368 369 370 371 372 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | - + - + - + + | if (initialized) return; if ((ObjFWBase = OpenLibrary(OBJFW_AMIGA_LIB, OBJFW_LIB_MINOR)) == NULL) error("Failed to open " OBJFW_AMIGA_LIB " version %lu!", OBJFW_LIB_MINOR); |
︙ |
Modified src/linklib/linklib.m from [0835c2a6e1] to [862b2e6a2f].
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + - + - + | extern struct Library *ObjFWBase; #if OF_GCC_VERSION >= 1100 # pragma GCC diagnostic ignored "-Warray-parameter" #endif bool |
︙ |
Modified src/runtime/linklib/Makefile from [f3f7c9cd54] to [8d60ec1024].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + | include ../../../extra.mk STATIC_LIB = libobjfwrt.library.a STATIC_AMIGA_LIB = libobjfwrt.library.amigalib.a SRCS = init.m \ linklib.m include ../../../buildsys.mk CPPFLAGS += -I.. -I../.. -I../../.. \ -DOBJC_COMPILING_AMIGA_LINKLIB \ -DOBJFWRT_AMIGA_LIB=\"${OBJFWRT_AMIGA_LIB}\" \ -DOBJFWRT_LIB_MINOR=${OBJFWRT_LIB_MINOR} AMIGA_LIB_CFLAGS += -DOBJC_AMIGA_LIB |
Modified src/runtime/linklib/init.m from [1251208ab8] to [aee4e3c855].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - - | #import "private.h" #import "amiga-library.h" #define USE_INLINE_STDARG #include <proto/exec.h> #include <proto/intuition.h> |
︙ | |||
58 59 60 61 62 63 64 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + + + | extern void *__deregister_frame_info(const void *); #endif #ifdef OF_MORPHOS extern void __register_frame(void *); extern void __deregister_frame(void *); #endif |
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - + - + + | static void __attribute__((__used__)) dtor(void) { CloseLibrary(ObjFWRTBase); } |
︙ |