From a5171ea3465e20f1f54ea7ffbe06a9bb2fb70c84 Mon Sep 17 00:00:00 2001 From: Jérôme Duval Date: Fri, 10 May 2013 18:26:12 +0200 Subject: [PATCH] gcc 4.7.3: fix remaining Haiku issues. --- gcc/configure | 17 ++++++++++++++++- gcc/gcc/config.gcc | 4 ---- gcc/libgcc/Makefile.in | 2 +- gcc/libgcc/config.host | 10 ++++++++++ gcc/libgcc/crtstuff.c | 2 ++ gcc/gcc/config/haiku.h | 6 ++++++ gcc/gcc/config/i386/haiku64.h | 6 ------ 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/gcc/configure b/gcc/configure index 738c1f1..2791dbc 100755 --- a/gcc/configure +++ b/gcc/configure @@ -2946,6 +2946,9 @@ i[3456789]86-*-msdosdjgpp*) noconfigdirs="$noconfigdirs tcl tk itcl" ;; + *-*-haiku*) + noconfigdirs="$noconfigdirs tk itcl libgui gdb" + ;; esac @@ -3185,6 +3188,9 @@ x86_64-*-darwin[912]*) ;; *-*-darwin*) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; + *-*-haiku*) noconfigdirs="$noconfigdirs ${libgcj}" ;; *-*-netware*) @@ -3348,6 +3354,9 @@ noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; *-*-freebsd*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + ;; + *-*-haiku*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) @@ -3402,6 +3411,9 @@ && test -f /usr/local/include/gmp.h; then with_gmp=/usr/local fi + ;; + *-*-haiku*) + noconfigdirs="$noconfigdirs gdb target-libiberty" ;; *-*-kaos*) # Remove unsupported stuff on all kaOS configurations. @@ -3631,11 +3643,6 @@ ;; vax-*-*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" - ;; - *-*-haiku*) - noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" - ;; - *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) ;; esac diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc index 576a48a..114b639 100644 --- a/gcc/gcc/config.gcc +++ b/gcc/gcc/config.gcc @@ -850,7 +850,6 @@ arm*-*-haiku*) tmake_file="${tmake_file} t-haiku arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-haiku" tm_file="dbxelf.h elfos.h haiku.h arm/elf.h arm/bpabi.h arm/haiku.h" - tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h" # The BPABI long long divmod functions return a 128-bit value in # registers r0-r3. Correctly modeling that requires the use of # TImode. @@ -1236,12 +1235,10 @@ i[34567]86-*-haiku*) tmake_file='t-haiku i386/t-crtpic' tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h haiku.h i386/haiku.h" - extra_parts='crtbegin.o crtend.o' ;; x86_64-*-haiku*) tmake_file='t-haiku i386/t-haiku64' tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h haiku.h i386/haiku64.h" - extra_parts='crtbegin.o crtend.o' ;; i[34567]86-*-netbsdelf*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" @@ -1934,7 +1931,6 @@ mipsel-*-haiku*) tmake_file='mips/t-elf t-haiku' tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h" - extra_parts='crtbegin.o crtend.o' ;; mips64-*-elf* | mips64el-*-elf*) tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h" diff --git a/gcc/libgcc/Makefile.in b/gcc/libgcc/Makefile.in index e1cac49..a5449f5 100644 --- a/gcc/libgcc/Makefile.in +++ b/gcc/libgcc/Makefile.in @@ -121,7 +121,7 @@ .PHONY: all clean clean: - -rm -f config.h libgcc_tm.h stamp-h stmp-ldirs libgcc.map + -rm -f config.h libgcc_tm.h stamp-h stmp-ldirs libgcc.map libgcc_tm.stamp -rm -f *$(objext) -rm -f *.dep -rm -f *.a diff --git a/gcc/libgcc/config.host b/gcc/libgcc/config.host index 0ef3dbd..615c1b2 100644 --- a/gcc/libgcc/config.host +++ b/gcc/libgcc/config.host @@ -325,6 +325,11 @@ tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover" ;; arm-*-haiku*) + tmake_file="${tmake_file} arm/t-arm arm/t-elf arm/t-bpabi" + 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" @@ -535,8 +540,12 @@ tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff" ;; i[34567]86-*-haiku*) + tmake_file="${tmake_file} i386/t-crtstuff t-libgcc-pic" + extra_parts="crtbegin.o crtend.o" ;; x86_64-*-haiku*) + tmake_file="${tmake_file} i386/t-crtstuff t-libgcc-pic" + extra_parts="crtbegin.o crtend.o" ;; i[34567]86-*-netbsdelf*) ;; @@ -767,6 +776,7 @@ mips*-*-openbsd*) ;; mips*-*-haiku*) + extra_parts="crtbegin.o crtend.o" ;; mips*-sde-elf*) tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16" diff --git a/gcc/libgcc/crtstuff.c b/gcc/libgcc/crtstuff.c index 5d820fa..17c14a4 100644 --- a/gcc/libgcc/crtstuff.c +++ b/gcc/libgcc/crtstuff.c @@ -104,7 +104,9 @@ && defined(HAVE_LD_EH_FRAME_HDR) \ && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \ && defined(__GLIBC__) && __GLIBC__ >= 2 +#ifndef __HAIKU__ #include +#endif /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h. But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */ # if !defined(__UCLIBC__) \ diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h index 64f8e02..71ef2cc 100644 --- a/gcc/gcc/config/haiku.h +++ b/gcc/gcc/config/haiku.h @@ -177,3 +177,9 @@ #ifndef TARGET_LIBC_PROVIDES_SSP #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}" #endif + +/* Do not desire to have _Jv_RegisterClasses in crtbegin.o for Haiku */ +#define TARGET_USE_JCR_SECTION 0 + +/* Do not use TM clone registry in Haiku for now */ +#define USE_TM_CLONE_REGISTRY 0 diff --git a/gcc/gcc/config/i386/haiku64.h b/gcc/gcc/config/i386/haiku64.h index 649816b..868a929 100644 --- a/gcc/gcc/config/i386/haiku64.h +++ b/gcc/gcc/config/i386/haiku64.h @@ -20,12 +20,6 @@ Boston, MA 02111-1307, USA. */ -#if TARGET_64BIT_DEFAULT -#define TARGET_VERSION fprintf (stderr, " (x86-64 Haiku/ELF)"); -#else -#define TARGET_VERSION fprintf (stderr, " (i386 Haiku/ELF)"); -#endif - #undef ASM_COMMENT_START #define ASM_COMMENT_START " #" -- gitore 0.2.3