@@ -44,10 +44,11 @@ ]) OBJCFLAGS="$OBJCFLAGS -noixemul" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul" CPPFLAGS="$CPPFLAGS -D__NO_NET_API" LDFLAGS="$LDFLAGS -noixemul" + LIBS="$LIBS -ldebug" enable_files="yes" # Required for reading ENV: enable_shared="no" supports_amiga_lib="yes" @@ -59,12 +60,13 @@ AC_SUBST(SFDC_INLINE_H, inline.h) dnl For 68000, GCC emits calls to helper functions that dnl do not work properly in a library. t="-mcpu=68020 -fbaserel32 -noixemul" AC_SUBST(AMIGA_LIB_CFLAGS, "$t -ffreestanding") - AC_SUBST(AMIGA_LIB_LDFLAGS, - "$t -resident32 -nostartfiles") + t="$t -resident32 -nostartfiles -nodefaultlibs" + t="$t -ldebug -lc" + AC_SUBST(AMIGA_LIB_LDFLAGS, $t) ]) AC_SUBST(LIBBASES_M, libbases.m) ;; powerpc-*-amigaos*) @@ -80,10 +82,11 @@ OBJCFLAGS="-O2 -g" ]) OBJCFLAGS="$OBJCFLAGS -noixemul" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" + LIBS="$LIBS -ldebug" enable_files="yes" # Required for reading ENV: enable_shared="no" supports_amiga_lib="yes" check_pedantic="no" # Breaks generated inlines @@ -93,11 +96,11 @@ AC_SUBST(OBJFWRT_AMIGA_LIB, objfwrt.library) AC_SUBST(CVINCLUDE_INLINE_H, inline.h) t="-mresident32 -ffreestanding -noixemul" AC_SUBST(AMIGA_LIB_CFLAGS, $t) t="-mresident32 -nostartfiles -nodefaultlibs -noixemul" - t="$t -laboxstubs -labox -lmath -lc" + t="$t -laboxstubs -labox -lmath -ldebug -lc" AC_SUBST(AMIGA_LIB_LDFLAGS, $t) ]) AC_SUBST(LIBBASES_M, libbases.m) ;; @@ -1854,13 +1857,14 @@ OBJCFLAGS="$OBJCFLAGS -Wunreachable-code" AC_MSG_CHECKING(whether -Wunreachable-code can be used) AC_COMPILE_IFELSE([ AC_LANG_SOURCE([[ #include - - typedef void *SEL; - + + struct objc_selector; + typedef const struct objc_selector *SEL; + #ifdef __has_attribute # if __has_attribute(objc_root_class) __attribute__((__objc_root_class__)) # endif #endif @@ -1870,14 +1874,14 @@ __attribute__((__noreturn__)) #endif ; - (void)dealloc; @end - + @interface Foo: Object @end - + void test(void) { if (sizeof(int) == 4) __asm__ (""); @@ -1884,11 +1888,11 @@ else if (sizeof(int) == 8) __asm__ (""); else abort(); } - + /* * Unfortunately, this cannot be shorter, as it only * works when it is used inside a macro. */ #ifdef __clang__ @@ -1907,11 +1911,11 @@ \ abort(); \ \ [super dealloc]; #endif - + @implementation Foo - (void)dealloc { OF_DEALLOC_UNSUPPORTED }