Comment: | Create separate Amiga libraries for OS3 & MorphOS
Otherwise, it would be necessary to make unwinding work between 68k and This also includes using separate .sfd files. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
1e70711672da3ed0136401c7bb4261cd |
User & Date: | js on 2019-05-05 19:28:25 |
Other Links: | manifest | tags |
2019-05-05
| ||
21:40 | configure: Don't use -pipe on MorphOS check-in: 2670c4637e user: js tags: trunk | |
19:28 | Create separate Amiga libraries for OS3 & MorphOS check-in: 1e70711672 user: js tags: trunk | |
2019-05-01
| ||
20:40 | .travis.yml: Re-enable Amiga as amiga-gcc is fixed check-in: 04de9d53bc user: js tags: trunk | |
Modified configure.ac from [c0e8992130] to [07a7d423c3].
1 2 3 4 5 6 7 8 9 10 11 12 13 | AC_INIT(ObjFW, 0.91-dev, js@heap.zone) AC_CONFIG_SRCDIR(src) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(build-aux/m4) AC_DEFINE(OBJFW_VERSION_MAJOR, 0, [The major version of ObjFW]) AC_DEFINE(OBJFW_VERSION_MINOR, 91, [The minor version of ObjFW]) dnl This may only be set to 0.91 once 0.91 is released AC_SUBST(BUNDLE_VERSION, 0.90.9900) AC_SUBST(BUNDLE_SHORT_VERSION, 0.90) for i in configure.ac build-aux/m4/*; do AS_IF([test $i -nt configure], [ | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | AC_INIT(ObjFW, 0.91-dev, js@heap.zone) AC_CONFIG_SRCDIR(src) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(build-aux/m4) AC_DEFINE(OBJFW_VERSION_MAJOR, 0, [The major version of ObjFW]) AC_DEFINE(OBJFW_VERSION_MINOR, 91, [The minor version of ObjFW]) dnl This may only be set to 0.91 once 0.91 is released AC_SUBST(BUNDLE_VERSION, 0.90.9900) AC_SUBST(BUNDLE_SHORT_VERSION, 0.90) for i in configure.ac build-aux/m4/*; do AS_IF([test $i -nt configure], [ AC_MSG_ERROR([$i is newer than configure! Run ./autogen.sh!]) ]) done BUILDSYS_INIT AC_CANONICAL_HOST |
︙ | ︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | enable_threads="no" enable_sockets="no" enable_files="yes" # Required for reading ENV: supports_amiga_lib="yes" ac_cv_snprintf_useful_ret="yes" AS_IF([test x"$enable_amiga_lib" != x"no"], [ AC_SUBST(SFDC_TARGET, m68k-amigaos) dnl For 68000, GCC emits calls to helper functions that dnl do not work properly in a library. AC_SUBST(AMIGA_LIB_CFLAGS, "-mcpu=68020 -fbaserel") AC_SUBST(AMIGA_LIB_LDFLAGS, "-mcpu=68020 -fbaserel -resident -nostartfiles") ]) ;; | > > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | enable_threads="no" enable_sockets="no" enable_files="yes" # Required for reading ENV: supports_amiga_lib="yes" ac_cv_snprintf_useful_ret="yes" AS_IF([test x"$enable_amiga_lib" != x"no"], [ AC_SUBST(OBJFW_RT_AMIGA_LIB, 'objfw_rt_${OBJFW_RT_LIB_MAJOR}_68k.library') AC_SUBST(SFDC_TARGET, m68k-amigaos) AC_SUBST(SFD_FILE, amigaos3.sfd) dnl For 68000, GCC emits calls to helper functions that dnl do not work properly in a library. AC_SUBST(AMIGA_LIB_CFLAGS, "-mcpu=68020 -fbaserel") AC_SUBST(AMIGA_LIB_LDFLAGS, "-mcpu=68020 -fbaserel -resident -nostartfiles") ]) ;; |
︙ | ︙ | |||
78 79 80 81 82 83 84 85 | OBJCFLAGS="$OBJCFLAGS -noixemul" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" enable_files="yes" # Required for reading ENV: supports_amiga_lib="yes" AS_IF([test x"$enable_amiga_lib" != x"no"], [ AC_SUBST(SFDC_TARGET, ppc-morphos) | > > > | | | | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | OBJCFLAGS="$OBJCFLAGS -noixemul" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" enable_files="yes" # Required for reading ENV: supports_amiga_lib="yes" AS_IF([test x"$enable_amiga_lib" != x"no"], [ t='objfw_rt_${OBJFW_RT_LIB_MAJOR}_abox.library' AC_SUBST(OBJFW_RT_AMIGA_LIB, $t) AC_SUBST(SFDC_TARGET, ppc-morphos) AC_SUBST(SFD_FILE, morphos.sfd) t="-mresident32 -fno-builtin" AC_SUBST(AMIGA_LIB_CFLAGS, $t) t="-mresident32 -nostartfiles -nodefaultlibs" t="$tmp -lc" AC_SUBST(AMIGA_LIB_LDFLAGS, $t) ]) ]) enable_shared="no" enable_threads="no" ;; *-msdosdjgpp*) |
︙ | ︙ | |||
508 509 510 511 512 513 514 | AS_IF([test x"$build_framework" = x"yes"], [ AC_SUBST(OBJFW_RT_FRAMEWORK, "ObjFW_RT.framework") AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFW_RT") ]) AS_IF([test x"$enable_amiga_lib" != x"no"], [ | < | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | AS_IF([test x"$build_framework" = x"yes"], [ AC_SUBST(OBJFW_RT_FRAMEWORK, "ObjFW_RT.framework") AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFW_RT") ]) AS_IF([test x"$enable_amiga_lib" != x"no"], [ AC_SUBST(RUNTIME_LIBS, "-lobjfw_rt.library") AC_SUBST(LINKLIB, linklib) tmp="../src/runtime/linklib/libobjfw_rt.library.a" AC_SUBST(LIBOBJFW_RT_DEP, "$tmp") AC_SUBST(LIBOBJFW_RT_DEP_LVL2, "../$tmp") ], [ AC_SUBST(RUNTIME_LIBS, "-lobjfw_rt") |
︙ | ︙ |
Modified extra.mk.in from [a72b9c97f0] to [4fbf371cb1].
︙ | ︙ | |||
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | REEXPORT_RUNTIME = @REEXPORT_RUNTIME@ REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@ RUNTIME = @RUNTIME@ RUNTIME_FRAMEWORK_LIBS = @RUNTIME_FRAMEWORK_LIBS@ RUNTIME_LIBS = @RUNTIME_LIBS@ RUN_TESTS = @RUN_TESTS@ SFDC_TARGET = @SFDC_TARGET@ TESTPLUGIN = @TESTPLUGIN@ TESTPLUGIN_LIBS = @TESTPLUGIN_LIBS@ TESTS_LIBS = @TESTS_LIBS@ TESTS_STATIC_LIB = @TESTS_STATIC_LIB@ UNICODE_M = @UNICODE_M@ USE_INCLUDES_ATOMIC = @USE_INCLUDES_ATOMIC@ USE_SRCS_FILES = @USE_SRCS_FILES@ | > | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | REEXPORT_RUNTIME = @REEXPORT_RUNTIME@ REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@ RUNTIME = @RUNTIME@ RUNTIME_FRAMEWORK_LIBS = @RUNTIME_FRAMEWORK_LIBS@ RUNTIME_LIBS = @RUNTIME_LIBS@ RUN_TESTS = @RUN_TESTS@ SFDC_TARGET = @SFDC_TARGET@ SFD_FILE = @SFD_FILE@ TESTPLUGIN = @TESTPLUGIN@ TESTPLUGIN_LIBS = @TESTPLUGIN_LIBS@ TESTS_LIBS = @TESTS_LIBS@ TESTS_STATIC_LIB = @TESTS_STATIC_LIB@ UNICODE_M = @UNICODE_M@ USE_INCLUDES_ATOMIC = @USE_INCLUDES_ATOMIC@ USE_SRCS_FILES = @USE_SRCS_FILES@ |
︙ | ︙ |
Modified generators/Makefile from [4bc126b447] to [74fa5c5d76].
1 2 3 4 5 6 7 8 9 10 11 12 13 | include ../extra.mk PROG_NOINST = gen_tables${PROG_SUFFIX} SRCS = TableGenerator.m .PHONY: run run: all rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR} rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} rm -f libobjfw_rt.dll libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | include ../extra.mk PROG_NOINST = gen_tables${PROG_SUFFIX} SRCS = TableGenerator.m .PHONY: run run: all rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR} rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} rm -f libobjfw_rt.dll libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib rm -f ${OBJFW_RT_AMIGA_LIB} if test -f ../src/libobjfw.so; then \ ${LN_S} ../src/libobjfw.so libobjfw.so.${OBJFW_LIB_MAJOR}; \ ${LN_S} ../src/libobjfw.so \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ elif test -f ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; then \ ${LN_S} ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ |
︙ | ︙ | |||
38 39 40 41 42 43 44 | if test -f ../src/runtime/libobjfw_rt.dll; then \ ${LN_S} ../src/runtime/libobjfw_rt.dll libobjfw_rt.dll; \ fi if test -f ../src/runtime/libobjfw_rt.dylib; then \ ${LN_S} ../src/runtime/libobjfw_rt.dylib \ libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ fi | | | > | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | if test -f ../src/runtime/libobjfw_rt.dll; then \ ${LN_S} ../src/runtime/libobjfw_rt.dll libobjfw_rt.dll; \ fi if test -f ../src/runtime/libobjfw_rt.dylib; then \ ${LN_S} ../src/runtime/libobjfw_rt.dylib \ libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ fi if test -f ../src/runtime/${OBJFW_RT_AMIGA_LIB}; then \ ${LN_S} ../src/runtime/${OBJFW_RT_AMIGA_LIB} \ ${OBJFW_RT_AMIGA_LIB}; \ fi LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ DYLD_FRAMEWORK_PATH=../src:../src/runtime$${DYLD_FRAMEWORK_PATH+:}$$DYLD_FRAMEWORK_PATH \ DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \ ASAN_OPTIONS=allocator_may_return_null=1 \ ${WRAPPER} ./${PROG_NOINST}; EXIT=$$?; \ |
︙ | ︙ |
Modified src/runtime/Makefile from [70c3ad8e0d] to [c6c73c6c03].
︙ | ︙ | |||
41 42 43 44 45 46 47 | include ../../buildsys.mk ${OBJFW_RT_AMIGA_LIB}: inline.h amiga-library.m: amiga-library-functable.inc | | | | > | | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | include ../../buildsys.mk ${OBJFW_RT_AMIGA_LIB}: inline.h amiga-library.m: amiga-library-functable.inc amiga-library-functable.inc: ${SFD_FILE} sfdc -q --target=${SFDC_TARGET} --mode=functable -o $@ $< inline.h: ${SFD_FILE} sfdc -q --target=${SFDC_TARGET} --mode=macros -o $@ $< CPPFLAGS += -I. -I.. -I../.. \ -DOBJFW_RT_AMIGA_LIB=\"${OBJFW_RT_AMIGA_LIB}\" \ -DOBJFW_RT_LIB_MAJOR=${OBJFW_RT_LIB_MAJOR} \ -DOBJFW_RT_LIB_MINOR=${OBJFW_RT_LIB_MINOR} AMIGA_LIB_CFLAGS += -DOBJC_COMPILING_AMIGA_LIBRARY LD = ${OBJC} FRAMEWORK_LIBS = ${LIBS} |
Deleted src/runtime/ObjFW_RT.sfd version [ae80bac89b].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified src/runtime/amiga-library.m from [c8fedb16aa] to [1262807e23].
︙ | ︙ | |||
597 598 599 600 601 602 603 | #ifdef OF_MORPHOS | RTF_PPC | RTF_EXTENDED #endif , .rt_Version = OBJFW_RT_LIB_MAJOR, .rt_Type = NT_LIBRARY, .rt_Pri = 0, | | | 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | #ifdef OF_MORPHOS | RTF_PPC | RTF_EXTENDED #endif , .rt_Version = OBJFW_RT_LIB_MAJOR, .rt_Type = NT_LIBRARY, .rt_Pri = 0, .rt_Name = (char *)OBJFW_RT_AMIGA_LIB, .rt_IdString = (char *)"ObjFW_RT " VERSION_STRING " \xA9 2008-2019 Jonathan Schleifer", .rt_Init = &init_table, #ifdef OF_MORPHOS .rt_Revision = OBJFW_RT_LIB_MINOR, .rt_Tags = NULL, #endif |
︙ | ︙ |
Added src/runtime/amigaos3.sfd version [5d6ee07490].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | ==base _ObjFWRTBase ==basetype struct Library * ==libname objfw_rt_0_68k.library ==bias 30 ==public * Functions that are only for the linklib. bool objc_init_m68k(unsigned int version, struct objc_libc *libc, FILE *stdout, FILE *stdin)(d0,a0,a1,a2) * These have a built-in declaration in the compiler that does not use the * registers and thus always need glue. void __objc_exec_class_m68k(void *_Nonnull module)(a0) IMP _Nonnull objc_msg_lookup_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1) IMP _Nonnull objc_msg_lookup_stret_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1) IMP _Nonnull objc_msg_lookup_super_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1) IMP _Nonnull objc_msg_lookup_super_stret_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1) Class _Nullable objc_lookUpClass_m68k(const char *_Nonnull name)(a0) Class _Nullable objc_getClass_m68k(const char *_Nonnull name)(a0) Class _Nonnull objc_getRequiredClass_m68k(const char *_Nonnull name)(a0) Class _Nullable objc_lookup_class_m68k(const char *_Nonnull name)(a0) Class _Nonnull objc_get_class_m68k(const char *_Nonnull name)(a0) void objc_exception_throw_m68k(id _Nonnull object)(a0) int objc_sync_enter_m68k(id _Nullable object)(a0) int objc_sync_exit_m68k(id _Nullable object)(a0) id objc_getProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)(a0,a1,d0,d1) void objc_setProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy)(a0,a1,d0,a2,d1,d2) void objc_getPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) void objc_setPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) void objc_enumerationMutation_m68k(id _Nonnull object)(a0) int __gnu_objc_personality_v0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1) int __gnu_objc_personality_sj0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1) id _Nullable objc_retain_m68k(id _Nullable object)(a0) id _Nullable objc_retainBlock_m68k(id _Nullable block)(a0) id _Nullable objc_retainAutorelease_m68k(id _Nullable object)(a0) void objc_release_m68k(id _Nullable object)(a0) id _Nullable objc_autorelease_m68k(id _Nullable object)(a0) id _Nullable objc_autoreleaseReturnValue_m68k(id _Nullable object)(a0) id _Nullable objc_retainAutoreleaseReturnValue_m68k(id _Nullable object)(a0) id _Nullable objc_retainAutoreleasedReturnValue_m68k(id _Nullable object)(a0) id _Nullable objc_storeStrong_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) id _Nullable objc_storeWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) id _Nullable objc_loadWeakRetained_m68k(id _Nullable *_Nonnull object)(a0) id _Nullable objc_initWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) void objc_destroyWeak_m68k(id _Nullable *_Nonnull object)(a0) id _Nullable objc_loadWeak_m68k(id _Nullable *_Nonnull object)(a0) void objc_copyWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1) void objc_moveWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1) * These only need glue on MorphOS. As none of them are functions that are used * in hot paths, it's easier to also use the glue on AmigaOS 3, which also has * the benefit of having all __saveds in a single place. SEL _Nonnull sel_registerName_m68k(const char *_Nonnull name)(a0) const char *_Nonnull sel_getName_m68k(SEL _Nonnull selector)(a0) bool sel_isEqual_m68k(SEL _Nonnull selector1, SEL _Nonnull selector2)(a0,a1) Class _Nonnull objc_allocateClassPair_m68k(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)(a0,a1,d0) void objc_registerClassPair_m68k(Class _Nonnull class_)(a0) unsigned int objc_getClassList_m68k(Class _Nonnull *_Nullable buffer, unsigned int count)(a0,d0) Class _Nonnull *_Nonnull objc_copyClassList_m68k(unsigned int *_Nullable length)(a0) bool class_isMetaClass_m68k(Class _Nullable class_)(a0) const char *_Nullable class_getName_m68k(Class _Nullable class_)(a0) Class _Nullable class_getSuperclass_m68k(Class _Nullable class_)(a0) unsigned long class_getInstanceSize_m68k(Class _Nullable class_)(a0) bool class_respondsToSelector_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) bool class_conformsToProtocol_m68k(Class _Nullable class_, Protocol *_Nonnull p)(a0,a1) IMP _Nullable class_getMethodImplementation_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) IMP _Nullable class_getMethodImplementation_stret_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) const char *_Nullable class_getMethodTypeEncoding_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) bool class_addMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3) IMP _Nullable class_replaceMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3) Class _Nullable object_getClass_m68k(id _Nullable object)(a0) Class _Nullable object_setClass_m68k(id _Nullable object, Class _Nonnull class_)(a0,a1) const char *_Nullable object_getClassName_m68k(id _Nullable object)(a0) const char *_Nonnull protocol_getName_m68k(Protocol *_Nonnull protocol)(a0) bool protocol_isEqual_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) bool protocol_conformsToProtocol_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) void objc_exit_m68k(void)() _Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler_m68k(objc_uncaught_exception_handler_t _Nullable handler)(a0) void objc_setForwardHandler_m68k(IMP _Nullable forward, IMP _Nullable stretForward)(a0,a1) void objc_setEnumerationMutationHandler_m68k(objc_enumeration_mutation_handler_t _Nullable handler)(a0) void objc_zero_weak_references_m68k(id _Nonnull value)(a0) * SysV functions for MorphOS could be added here for performance. Having them * in addition to the m68k functions allows m68k applications to call into the * PPC library, while native code can use the SysV functions. ==end |
Modified src/runtime/linklib/Makefile from [46d4ad5206] to [87f2019e8e].
1 2 3 4 5 6 7 | include ../../../extra.mk STATIC_LIB = libobjfw_rt.library.a SRCS = linklib.m include ../../../buildsys.mk | > | > > | 1 2 3 4 5 6 7 8 9 10 11 12 | include ../../../extra.mk STATIC_LIB = libobjfw_rt.library.a SRCS = linklib.m include ../../../buildsys.mk CPPFLAGS += -I.. -I../.. -I../../.. \ -DOBJC_COMPILING_AMIGA_LINKLIB \ -DOBJFW_RT_AMIGA_LIB=\"${OBJFW_RT_AMIGA_LIB}\" \ -DOBJFW_RT_LIB_MINOR=${OBJFW_RT_LIB_MINOR} LD = ${OBJC} |
Modified src/runtime/linklib/linklib.m from [d6e0a7e003] to [824a5b579c].
︙ | ︙ | |||
92 93 94 95 96 97 98 | .__register_frame_info = __register_frame_info, .__deregister_frame_info = __deregister_frame_info, }; if (initialized) return; | | > | | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | .__register_frame_info = __register_frame_info, .__deregister_frame_info = __deregister_frame_info, }; if (initialized) return; if ((ObjFWRTBase = OpenLibrary(OBJFW_RT_AMIGA_LIB, OBJFW_RT_LIB_MINOR)) == NULL) { fputs("Failed to open " OBJFW_RT_AMIGA_LIB "!\n", stderr); abort(); } if (!objc_init_m68k(1, &libc, stdout, stderr)) { fputs("Failed to initialize " OBJFW_RT_AMIGA_LIB "!\n", stderr); abort(); } initialized = true; } static void __attribute__((__unused__)) |
︙ | ︙ |
Added src/runtime/morphos.sfd version [7018b90896].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | ==base _ObjFWRTBase ==basetype struct Library * ==libname objfw_rt_0_abox.library ==bias 30 ==public * Functions that are only for the linklib. bool objc_init_m68k(unsigned int version, struct objc_libc *libc, FILE *stdout, FILE *stdin)(d0,a0,a1,a2) * These have a built-in declaration in the compiler that does not use the * registers and thus always need glue. void __objc_exec_class_m68k(void *_Nonnull module)(a0) IMP _Nonnull objc_msg_lookup_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1) IMP _Nonnull objc_msg_lookup_stret_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1) IMP _Nonnull objc_msg_lookup_super_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1) IMP _Nonnull objc_msg_lookup_super_stret_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1) Class _Nullable objc_lookUpClass_m68k(const char *_Nonnull name)(a0) Class _Nullable objc_getClass_m68k(const char *_Nonnull name)(a0) Class _Nonnull objc_getRequiredClass_m68k(const char *_Nonnull name)(a0) Class _Nullable objc_lookup_class_m68k(const char *_Nonnull name)(a0) Class _Nonnull objc_get_class_m68k(const char *_Nonnull name)(a0) void objc_exception_throw_m68k(id _Nonnull object)(a0) int objc_sync_enter_m68k(id _Nullable object)(a0) int objc_sync_exit_m68k(id _Nullable object)(a0) id objc_getProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)(a0,a1,d0,d1) void objc_setProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy)(a0,a1,d0,a2,d1,d2) void objc_getPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) void objc_setPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) void objc_enumerationMutation_m68k(id _Nonnull object)(a0) int __gnu_objc_personality_v0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1) int __gnu_objc_personality_sj0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1) id _Nullable objc_retain_m68k(id _Nullable object)(a0) id _Nullable objc_retainBlock_m68k(id _Nullable block)(a0) id _Nullable objc_retainAutorelease_m68k(id _Nullable object)(a0) void objc_release_m68k(id _Nullable object)(a0) id _Nullable objc_autorelease_m68k(id _Nullable object)(a0) id _Nullable objc_autoreleaseReturnValue_m68k(id _Nullable object)(a0) id _Nullable objc_retainAutoreleaseReturnValue_m68k(id _Nullable object)(a0) id _Nullable objc_retainAutoreleasedReturnValue_m68k(id _Nullable object)(a0) id _Nullable objc_storeStrong_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) id _Nullable objc_storeWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) id _Nullable objc_loadWeakRetained_m68k(id _Nullable *_Nonnull object)(a0) id _Nullable objc_initWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) void objc_destroyWeak_m68k(id _Nullable *_Nonnull object)(a0) id _Nullable objc_loadWeak_m68k(id _Nullable *_Nonnull object)(a0) void objc_copyWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1) void objc_moveWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1) * These only need glue on MorphOS. As none of them are functions that are used * in hot paths, it's easier to also use the glue on AmigaOS 3, which also has * the benefit of having all __saveds in a single place. SEL _Nonnull sel_registerName_m68k(const char *_Nonnull name)(a0) const char *_Nonnull sel_getName_m68k(SEL _Nonnull selector)(a0) bool sel_isEqual_m68k(SEL _Nonnull selector1, SEL _Nonnull selector2)(a0,a1) Class _Nonnull objc_allocateClassPair_m68k(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)(a0,a1,d0) void objc_registerClassPair_m68k(Class _Nonnull class_)(a0) unsigned int objc_getClassList_m68k(Class _Nonnull *_Nullable buffer, unsigned int count)(a0,d0) Class _Nonnull *_Nonnull objc_copyClassList_m68k(unsigned int *_Nullable length)(a0) bool class_isMetaClass_m68k(Class _Nullable class_)(a0) const char *_Nullable class_getName_m68k(Class _Nullable class_)(a0) Class _Nullable class_getSuperclass_m68k(Class _Nullable class_)(a0) unsigned long class_getInstanceSize_m68k(Class _Nullable class_)(a0) bool class_respondsToSelector_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) bool class_conformsToProtocol_m68k(Class _Nullable class_, Protocol *_Nonnull p)(a0,a1) IMP _Nullable class_getMethodImplementation_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) IMP _Nullable class_getMethodImplementation_stret_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) const char *_Nullable class_getMethodTypeEncoding_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) bool class_addMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3) IMP _Nullable class_replaceMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3) Class _Nullable object_getClass_m68k(id _Nullable object)(a0) Class _Nullable object_setClass_m68k(id _Nullable object, Class _Nonnull class_)(a0,a1) const char *_Nullable object_getClassName_m68k(id _Nullable object)(a0) const char *_Nonnull protocol_getName_m68k(Protocol *_Nonnull protocol)(a0) bool protocol_isEqual_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) bool protocol_conformsToProtocol_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) void objc_exit_m68k(void)() _Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler_m68k(objc_uncaught_exception_handler_t _Nullable handler)(a0) void objc_setForwardHandler_m68k(IMP _Nullable forward, IMP _Nullable stretForward)(a0,a1) void objc_setEnumerationMutationHandler_m68k(objc_enumeration_mutation_handler_t _Nullable handler)(a0) void objc_zero_weak_references_m68k(id _Nonnull value)(a0) * SysV functions for MorphOS could be added here for performance. Having them * in addition to the m68k functions allows m68k applications to call into the * PPC library, while native code can use the SysV functions. ==end |
Modified tests/Makefile from [c16bda6408] to [7bd30502da].
︙ | ︙ | |||
77 78 79 80 81 82 83 | run: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR} rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} rm -f libobjfw_rt.dll libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib | | | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | run: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR} rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} rm -f libobjfw_rt.dll libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib rm -f ${OBJFW_RT_AMIGA_LIB} if test -f ../src/libobjfw.so; then \ ${LN_S} ../src/libobjfw.so libobjfw.so.${OBJFW_LIB_MAJOR}; \ ${LN_S} ../src/libobjfw.so \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ elif test -f ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; then \ ${LN_S} ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ |
︙ | ︙ | |||
108 109 110 111 112 113 114 | if test -f ../src/runtime/libobjfw_rt.dll; then \ ${LN_S} ../src/runtime/libobjfw_rt.dll libobjfw_rt.dll; \ fi if test -f ../src/runtime/libobjfw_rt.dylib; then \ ${LN_S} ../src/runtime/libobjfw_rt.dylib \ libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ fi | | | > | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | if test -f ../src/runtime/libobjfw_rt.dll; then \ ${LN_S} ../src/runtime/libobjfw_rt.dll libobjfw_rt.dll; \ fi if test -f ../src/runtime/libobjfw_rt.dylib; then \ ${LN_S} ../src/runtime/libobjfw_rt.dylib \ libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ fi if test -f ../src/runtime/${OBJFW_RT_AMIGA_LIB}; then \ ${LN_S} ../src/runtime/${OBJFW_RT_AMIGA_LIB} \ ${OBJFW_RT_AMIGA_LIB}; \ fi LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ DYLD_FRAMEWORK_PATH=../src:../src/runtime$${DYLD_FRAMEWORK_PATH+:}$$DYLD_FRAMEWORK_PATH \ DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \ ASAN_OPTIONS=allocator_may_return_null=1 \ ${WRAPPER} ./${PROG_NOINST}; EXIT=$$?; \ |
︙ | ︙ |