ObjFW  Check-in [dba770bccc]

Overview
Comment:Work around crash on start with new MSYS2
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: dba770bcccce3da7cd092d39cb099898e0298751e8a0225ed47e69c88f2770c4
User & Date: js on 2021-03-17 00:14:53
Other Links: manifest | tags
Context
2021-03-17
23:14
OFINIFile: Add property containing all categories check-in: deebe3c034 user: js tags: trunk
00:14
Work around crash on start with new MSYS2 check-in: dba770bccc user: js tags: trunk
2021-03-16
22:55
Fix lookup-asm-x86_64-win64.S check-in: 4750a54072 user: js tags: trunk
Changes

Modified configure.ac from [ec187ae771] to [f431246f69].

344
345
346
347
348
349
350



















351
352
353
354
355
356
357
	]])
], [
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(Compiler does not support properties!)
])




















AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB

AC_ARG_ENABLE(shared,
	AS_HELP_STRING([--disable-shared], [do not build shared library]))
AS_IF([test x"$enable_shared" != x"no"], [







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
	]])
], [
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(Compiler does not support properties!)
])

case "$host" in
x86_64-*-mingw*)
	dnl MSYS2 backported some patches to binutils 2.35 to enable ASLR.
	dnl Unfortunately, those patches result in a crash on start. Tracing it
	dnl in a debugger, a bunch of ctors get executed and after the last
	dnl ctor, it jumps into a random address. Sounds like something in the
	dnl ctor array does not get relocated correctly? In any case, this no
	dnl longer happens with --default-image-base-low.
	AC_MSG_CHECKING([whether we can use -Wl,--default-image-base-low])
	old_LDFLAGS="$LDFLAGS"
	LDFLAGS="$LDFLAGS -Wl,--default-image-base-low"
	AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
		LDFLAGS="$old_LDFLAGS"
	])
esac

AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB

AC_ARG_ENABLE(shared,
	AS_HELP_STRING([--disable-shared], [do not build shared library]))
AS_IF([test x"$enable_shared" != x"no"], [