Overview
Comment: | Improve objfw-config flags |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
cddfc2ed5678d1cd0f2bbcd8b817f68a |
User & Date: | js on 2018-08-27 22:48:50 |
Other Links: | manifest | tags |
Context
2018-08-27
| ||
23:21 | socket.m: Clean up #ifdefs check-in: fa952c4c48 user: js tags: trunk | |
22:48 | Improve objfw-config flags check-in: cddfc2ed56 user: js tags: trunk | |
22:02 | .travis.yml: Disable Wii until libogc is updated check-in: f06e338487 user: js tags: trunk | |
Changes
Modified configure.ac from [a5d93e137e] to [a4388d2557].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | case "$host" in m68k-*-amigaos*) AS_IF([test x"$OBJCFLAGS" != x""], [ OBJCFLAGS="$OBJCFLAGS -noixemul" ], [ OBJCFLAGS="-O0 -g -noixemul" ]) LDFLAGS="$LDFLAGS -noixemul" enable_shared="no" enable_threads="no" enable_sockets="no" enable_files="yes" # Required for reading ENV: supports_amiga_lib="yes" ac_cv_snprintf_useful_ret="yes" | > < < > < < | 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 | case "$host" in m68k-*-amigaos*) AS_IF([test x"$OBJCFLAGS" != x""], [ OBJCFLAGS="$OBJCFLAGS -noixemul" ], [ OBJCFLAGS="-O0 -g -noixemul" ]) OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" enable_shared="no" 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") ]) ;; powerpc-*-amigaos*) enable_shared="no" enable_threads="no" ;; *-morphos*) AS_IF([test x"$with_ixemul" != x"yes"], [ AS_IF([test x"$OBJCFLAGS" != x""], [ OBJCFLAGS="$OBJCFLAGS -noixemul" ], [ OBJCFLAGS="-O2 -g -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) tmp="-mresident32 -fno-builtin" AC_SUBST(AMIGA_LIB_CFLAGS, $tmp) tmp="-mresident32 -nostartfiles -nodefaultlibs" tmp="$tmp -lc" AC_SUBST(AMIGA_LIB_LDFLAGS, $tmp) |
︙ | ︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 | ]) AS_IF([test x"$OBJCFLAGS" != x""], [ OBJCFLAGS="$OBJCFLAGS -G0" ], [ OBJCFLAGS="-O2 -G0" ]) CPPFLAGS="$CPPFLAGS -I$DEVKITPSP/psp/sdk/include" LDFLAGS="$LDFLAGS -G0" LIBS="$LIBS -L$DEVKITPSP/psp/sdk/lib -lpspdebug -lpspdisplay" LIBS="$LIBS -lpspge -lpspctrl -lpspsdk -lc -lpspnet" LIBS="$LIBS -lpspnet_inet -lpspnet_apctl -lpspnet_resolver" LIBS="$LIBS -lpsputility -lpspuser -lpspkernel -lgcc -lpsplibc" enable_shared="no" | > | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | ]) AS_IF([test x"$OBJCFLAGS" != x""], [ OBJCFLAGS="$OBJCFLAGS -G0" ], [ OBJCFLAGS="-O2 -G0" ]) OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -G0" CPPFLAGS="$CPPFLAGS -I$DEVKITPSP/psp/sdk/include" LDFLAGS="$LDFLAGS -G0" LIBS="$LIBS -L$DEVKITPSP/psp/sdk/lib -lpspdebug -lpspdisplay" LIBS="$LIBS -lpspge -lpspctrl -lpspsdk -lc -lpspnet" LIBS="$LIBS -lpspnet_inet -lpspnet_apctl -lpspnet_resolver" LIBS="$LIBS -lpsputility -lpspuser -lpspkernel -lgcc -lpsplibc" enable_shared="no" |
︙ | ︙ | |||
131 132 133 134 135 136 137 | AC_ARG_WITH(wii, AS_HELP_STRING([--with-wii], [build for Wii])) AS_IF([test x"$with_wii" = x"yes"], [ AS_IF([test x"$DEVKITPRO" = x""], [ AC_MSG_ERROR([DEVKITPRO is not set! Please set DEVKITPRO.]) ]) | > | > < | | | > < | | > | > < | | | > > > | < > > | < > > | < > | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | AC_ARG_WITH(wii, AS_HELP_STRING([--with-wii], [build for Wii])) AS_IF([test x"$with_wii" = x"yes"], [ AS_IF([test x"$DEVKITPRO" = x""], [ AC_MSG_ERROR([DEVKITPRO is not set! Please set DEVKITPRO.]) ]) flags="-mrvl -mcpu=750 -meabi -mhard-float" OBJCFLAGS="$OBJCFLAGS $flags" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flags" CPPFLAGS="$CPPFLAGS -DGEKKO -I$DEVKITPRO/libogc/include" LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -meabi -mhard-float" LIBS="$LIBS -L$DEVKITPRO/libogc/lib/wii -lfat -logc" TESTS_LIBS="$TESTS_LIBS -lwiiuse -lbte" enable_shared="no" enable_threads="no" # TODO AC_DEFINE(OF_WII, 1, [Whether we are compiling for Wii]) OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -DGEKKO -I\$DEVKITPRO/libogc/include" AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ]) AC_ARG_WITH(nds, AS_HELP_STRING([--with-nds], [build for Nintendo DS])) AS_IF([test x"$with_nds" = x"yes"], [ AS_IF([test x"$DEVKITPRO" = x""], [ AC_MSG_ERROR([DEVKITPRO is not set! Please set DEVKITPRO.]) ]) flags="-march=armv5te -mtune=arm946e-s -mthumb -mthumb-interwork" OBJCFLAGS="$OBJCFLAGS $flags" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flags" CPPFLAGS="$CPPFLAGS -DARM9 -I$DEVKITPRO/libnds/include" ASFLAGS="$ASFLAGS -march=armv5te" LDFLAGS="$LDFLAGS -specs=ds_arm9.specs" LIBS="$LIBS -L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9" enable_shared="no" enable_threads="no" # TODO enable_sockets="no" # TODO check_pedantic="no" AC_DEFINE(OF_NINTENDO_DS, 1, [Whether we are compiling for Nintendo DS]) OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -DARM9 -I\$DEVKITPRO/libnds/include" AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ]) AC_ARG_WITH(3ds, AS_HELP_STRING([--with-3ds], [build for Nintendo 3DS])) AS_IF([test x"$with_3ds" = x"yes"], [ AS_IF([test x"$DEVKITPRO" = x""], [ AC_MSG_ERROR([DEVKITPRO is not set! Please set DEVKITPRO.]) ]) flags="-march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft" flags="$flags -mword-relocations" OBJCFLAGS="$OBJCFLAGS $flags" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flags" CPPFLAGS="$CPPFLAGS -DARM11 -I$DEVKITPRO/libctru/include" ASFLAGS="$ASFLAGS -march=armv6k" LDFLAGS="$LDFLAGS -specs=3dsx.specs -march=armv6k -mtune=mpcore" LDFLAGS="$LDFLAGS -mfloat-abi=hard -mtp=soft -mword-relocations" LIBS="$LIBS -L$DEVKITPRO/libctru/lib -lctru" enable_shared="no" enable_threads="no" # TODO check_pedantic="no" AC_DEFINE(OF_NINTENDO_3DS, 1, [Whether we are compiling for Nintendo 3DS]) OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -DARM11 -I\$DEVKITPRO/libctru/include" AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ]) CPP="$OBJCPP" CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS -DOF_COMPILING_OBJFW" flags="-fexceptions -fobjc-exceptions -funwind-tables" flags="$flags -fconstant-string-class=OFConstantString" OBJCFLAGS="$OBJCFLAGS -Wall $flags" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flags" dnl amiga-gcc requires -fexceptions in LDFLAGS in order to link in the glue code dnl for registering the frames. LDFLAGS="$LDFLAGS -fexceptions" case "$OBJC" in *clang*) case "$host" in dnl Clang generates MIPS assembly not accepted by GNU dnl as, however, Clang's integrated assembler doesn't dnl accept everything used in ObjFW's assembly files. dnl Therefore, use the integrated assembler for ObjC dnl files, but not for assembly files. mips*-*-*) flag="-integrated-as" OBJCFLAGS="$OBJCFLAGS $flag" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flag" ;; dnl Clang's assembler on Windows is not complete yet dnl and cannot compile all .S files. *-*-mingw*) ASFLAGS="$ASFLAGS -no-integrated-as" ;; dnl Clang generates assembly output on SPARC64 that dnl OpenBSD's assembler does not accept. sparc64-*-*openbsd*) flag="-integrated-as" OBJCFLAGS="$OBJCFLAGS $flag" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flag" ;; esac ;; esac AX_CHECK_COMPILER_FLAGS(-std=gnu11, [ OBJCFLAGS="$OBJCFLAGS -std=gnu11" ], [ AX_CHECK_COMPILER_FLAGS(-std=gnu1x, [ OBJCFLAGS="$OBJCFLAGS -std=gnu1x" ], [ AX_CHECK_COMPILER_FLAGS(-std=gnu99, [OBJCFLAGS="$OBJCFLAGS -std=gnu99"]) ]) ]) AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"]) AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) AX_CHECK_COMPILER_FLAGS(-Xclang -fno-constant-cfstrings, [ flag="-Xclang -fno-constant-cfstrings" OBJCFLAGS="$OBJCFLAGS $flag" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flag" ]) AX_CHECK_COMPILER_FLAGS([-Wsign-compare -Werror], [OBJCFLAGS="$OBJCFLAGS -Wsign-compare"]) AS_IF([test x"$with_nds" != x"yes"], [ AX_CHECK_COMPILER_FLAGS([-Wshadow -Werror], [OBJCFLAGS="$OBJCFLAGS -Wshadow"]) ]) |
︙ | ︙ | |||
453 454 455 456 457 458 459 | void __objc_exec_class(void *module) { } ], [ [Test test]; ], [ | | > | | > < | 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | void __objc_exec_class(void *module) { } ], [ [Test test]; ], [ flag="-Xclang -fobjc-runtime=objfw" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flag" AC_MSG_RESULT(yes) ], [ flag="-fgnu-runtime" OBJCFLAGS="$old_OBJCFLAGS $flag" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flag" AC_MSG_RESULT(no) old_compiler="yes" ]) AC_SUBST(RUNTIME, "runtime") AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_RT_SHARED_LIB, "${LIB_PREFIX}objfw_rt${LIB_SUFFIX}") ]) AS_IF([test x"$enable_static" = x"yes"], [ |
︙ | ︙ | |||
1493 1494 1495 1496 1497 1498 1499 | AC_MSG_CHECKING(whether Objective C compiler supports blocks) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Xclang -fblocks" AC_TRY_COMPILE([], [ int (^foo)(int bar); foo = ^ (int bar) { return 0; } ], [ | | | 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 | AC_MSG_CHECKING(whether Objective C compiler supports blocks) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Xclang -fblocks" AC_TRY_COMPILE([], [ int (^foo)(int bar); foo = ^ (int bar) { return 0; } ], [ OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -Xclang -fblocks" AC_SUBST(OFBLOCKTESTS_M, "OFBlockTests.m") AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) OBJCFLAGS="$old_OBJCFLAGS" ]) |
︙ | ︙ | |||
1786 1787 1788 1789 1790 1791 1792 | AC_SUBST(CPP) AC_SUBST(CPPFLAGS) dnl We use the ObjC compiler as our assembler AC_SUBST(AS, $OBJC) AC_SUBST(ASFLAGS) AC_SUBST(AS_DEPENDS, '${OBJC_DEPENDS}') | | > > | 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 | AC_SUBST(CPP) AC_SUBST(CPPFLAGS) dnl We use the ObjC compiler as our assembler AC_SUBST(AS, $OBJC) AC_SUBST(ASFLAGS) AC_SUBST(AS_DEPENDS, '${OBJC_DEPENDS}') AC_SUBST(OBJFW_CPPFLAGS) AC_SUBST(OBJFW_OBJCFLAGS) AC_SUBST(TESTS_LIBS) AC_CONFIG_FILES([ buildsys.mk extra.mk src/Info.plist src/bridge/Info.plist |
︙ | ︙ |
Modified extra.mk.in from [1f091fa6af] to [99dd00d3f1].
︙ | ︙ | |||
71 72 73 74 75 76 77 | 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@ | < | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | 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@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ USE_SRCS_WINDOWS = @USE_SRCS_WINDOWS@ WRAPPER = @WRAPPER@ |
Modified tests/Makefile from [d4732b51d0] to [7a90e657ea].
︙ | ︙ | |||
187 188 189 190 191 192 193 | ndstool -c $@ -9 $< -d nds-data rm -fr nds-data ${PROG_NOINST}.3dsx: ${PROG_NOINST} 3dsxtool $< $@ CPPFLAGS += -I../src -I../src/exceptions -I../src/runtime -I.. -DSTDOUT | < | 187 188 189 190 191 192 193 194 195 196 | ndstool -c $@ -9 $< -d nds-data rm -fr nds-data ${PROG_NOINST}.3dsx: ${PROG_NOINST} 3dsxtool $< $@ CPPFLAGS += -I../src -I../src/exceptions -I../src/runtime -I.. -DSTDOUT LIBS := ${TESTS_LIBS} ${LIBS} LDFLAGS += ${MAP_LDFLAGS} LD = ${OBJC} |
Modified utils/objfw-config.in from [1760a7df5c] to [095c498444].
︙ | ︙ | |||
15 16 17 18 19 20 21 | # file. # prefix="@prefix@" exec_prefix="@exec_prefix@" libdir="@libdir@" CFLAGS="" | | | < < < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # file. # prefix="@prefix@" exec_prefix="@exec_prefix@" libdir="@libdir@" CFLAGS="" CPPFLAGS="@OBJFW_CPPFLAGS@ -I@includedir@" CXXFLAGS="" OBJC="@OBJC@" OBJCFLAGS="@OBJFW_OBJCFLAGS@" LIB_CFLAGS="@LIB_CFLAGS@" LIB_LDFLAGS="@LIB_LDFLAGS@" LIB_PREFIX="@LIB_PREFIX@" LIB_SUFFIX="@LIB_SUFFIX@" LDFLAGS="@LDFLAGS@" LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@" LDFLAGS_RPATH="@LDFLAGS_RPATH@" |
︙ | ︙ |