mirror of
https://review.haiku-os.org/buildtools
synced 2024-11-23 07:18:49 +01:00
Use crtbeginS.o and crtendS.o for everything.
* The glue code files crtbegin.o and crtend.o don't cleanup globals properly, only the variants with the S suffix do. As executables are shared on Haiku, we use crtbeginS.o and crtendS.o for those, too. This fixes crashes on shutdown of Haiku servers that load add-ons (e.g. Print Server and Media Add-On Server).
This commit is contained in:
parent
cece7c2f4b
commit
9f6654f4a8
@ -63,10 +63,10 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s"
|
||||
#define STARTFILE_SPEC "crti.o%s crtbeginS.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||
#define ENDFILE_SPEC "crtendS.o%s crtn.o%s"
|
||||
|
||||
/* Every program on Haiku links against libroot which contains the pthread
|
||||
routines, so there's no need to explicitly call out when doing threaded
|
||||
|
@ -96,7 +96,7 @@ arm*-*-*)
|
||||
;;
|
||||
avr-*-*)
|
||||
cpu_type=avr
|
||||
;;
|
||||
;;
|
||||
bfin*-*)
|
||||
cpu_type=bfin
|
||||
;;
|
||||
@ -201,7 +201,7 @@ case ${host} in
|
||||
# configuration.
|
||||
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-haiku t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
|
||||
tmake_file="$tmake_file t-slibgcc-nolc-override"
|
||||
extra_parts="crtbegin.o crtend.o"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
;;
|
||||
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
|
||||
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
|
||||
@ -335,7 +335,6 @@ arm-*-haiku*)
|
||||
tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
|
||||
tm_file="${tm_file} arm/bpabi-lib.h"
|
||||
unwind_header=config/arm/unwind-arm.h
|
||||
extra_parts="crtbegin.o crtend.o"
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix"
|
||||
@ -527,7 +526,6 @@ i[34567]86-*-haiku*)
|
||||
;;
|
||||
x86_64-*-haiku*)
|
||||
tmake_file="${tmake_file} i386/t-crtstuff i386/t-eh-dw2"
|
||||
extra_parts="crtbegin.o crtend.o"
|
||||
;;
|
||||
i[34567]86-*-netbsdelf*)
|
||||
;;
|
||||
@ -686,7 +684,7 @@ lm32-*-rtems*)
|
||||
lm32-*-uclinux*)
|
||||
extra_parts="$extra_parts crtbegin.o crtendS.o crtbeginT.o"
|
||||
tmake_file="lm32/t-lm32 lm32/t-uclinux t-libgcc-pic t-softfp-sfdf t-softfp"
|
||||
;;
|
||||
;;
|
||||
m32r-*-elf*)
|
||||
tmake_file=t-fdpbit
|
||||
;;
|
||||
@ -703,9 +701,6 @@ m32r-*-linux*)
|
||||
m32rle-*-linux*)
|
||||
tmake_file="$tmake_file m32r/t-linux t-fdpbit"
|
||||
;;
|
||||
m68k-*-haiku*)
|
||||
extra_parts="crtbegin.o crtend.o"
|
||||
;;
|
||||
m68k-*-elf* | fido-*-elf)
|
||||
tmake_file="$tmake_file m68k/t-floatlib"
|
||||
;;
|
||||
@ -859,9 +854,6 @@ powerpc*-*-freebsd*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
powerpc-*-haiku*)
|
||||
extra_parts="crtbegin.o crtend.o"
|
||||
;;
|
||||
powerpc-*-netbsd*)
|
||||
tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user