--- libgcc/config.host.orig 2015-10-01 12:01:18 UTC +++ libgcc/config.host @@ -209,6 +209,18 @@ case ${host} in tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" ;; +*-*-bsdsunix*) + # This is the generic ELF configuration of BSDSUniX. Later + # machine-specific sections may refine and add to this + # configuration. + tmake_file="$tmake_file t-bsdsunix t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" + case ${target_thread_file} in + posix) + tmake_file="${tmake_file} t-bsdsunix-thread" + ;; + esac + ;; *-*-freebsd*) # This is the generic ELF configuration of FreeBSD. Later # machine-specific sections may refine and add to this @@ -310,7 +322,7 @@ esac case ${host} in *-*-darwin* | *-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | \ - *-*-solaris2*) + *-*-bsdsunix* | *-*-solaris2*) enable_execute_stack=enable-execute-stack-mprotect.c ;; i[34567]86-*-mingw* | x86_64-*-mingw*) @@ -339,6 +351,10 @@ alpha*-*-linux*) extra_parts="$extra_parts crtfastmath.o" md_unwind_header=alpha/linux-unwind.h ;; +alpha*-*-bsdsunix*) + tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm" + extra_parts="$extra_parts crtbeginT.o crtfastmath.o" + ;; alpha*-*-freebsd*) tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm" extra_parts="$extra_parts crtbeginT.o crtfastmath.o" @@ -371,6 +387,13 @@ arm-wrs-vxworks) tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" extra_parts="$extra_parts crti.o crtn.o" ;; +arm*-*-bsdsunix*) # ARM BSDSUniX EABI + tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf" + tmake_file="${tmake_file} arm/t-bpabi arm/t-bsdsunix t-slibgcc-libgcc" + tm_file="${tm_file} arm/bpabi-lib.h" + unwind_header=config/arm/unwind-arm.h + tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" + ;; arm*-*-freebsd*) # ARM FreeBSD EABI tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf" tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd t-slibgcc-libgcc" @@ -570,6 +593,14 @@ x86_64-*-dragonfly*) tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff" md_unwind_header=i386/dragonfly-unwind.h ;; +i[34567]86-*-bsdsunix*) + tmake_file="${tmake_file} i386/t-bsdsunix i386/t-crtstuff" + md_unwind_header=i386/bsdsunix-unwind.h + ;; +x86_64-*-bsdsunix*) + tmake_file="${tmake_file} i386/t-bsdsunix i386/t-crtstuff" + md_unwind_header=i386/bsdsunix-unwind.h + ;; i[34567]86-*-freebsd*) tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff" md_unwind_header=i386/freebsd-unwind.h @@ -732,6 +763,10 @@ ia64*-*-elf*) extra_parts="$extra_parts crtbeginS.o crtendS.o crtfastmath.o" tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm" ;; +ia64*-*-bsdsunix*) + extra_parts="$extra_parts crtfastmath.o" + tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm" + ;; ia64*-*-freebsd*) extra_parts="$extra_parts crtfastmath.o" tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm" @@ -976,6 +1011,16 @@ powerpc64-*-darwin*) tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble" extra_parts="$extra_parts crt2.o" ;; +powerpc*-*-bsdsunix*) + tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-bsdsunix t-softfp-sfdf t-softfp-excl t-softfp" + extra_parts="$extra_parts crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o" + case ${host} in + powerpc64*) + tmake_file="${tmake_file} rs6000/t-bsdsunix64" + md_unwind_header=rs6000/bsdsunix-unwind.h + ;; + esac + ;; powerpc*-*-freebsd*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-freebsd t-softfp-sfdf t-softfp-excl t-softfp" extra_parts="$extra_parts crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o" @@ -1209,6 +1254,10 @@ sparc64-*-rtems*) ;; sparc-wrs-vxworks) ;; +sparc64-*-bsdsunix*|ultrasparc-*-bsdsunix*) + tmake_file="$tmake_file t-crtfm" + extra_parts="$extra_parts crtfastmath.o" + ;; sparc64-*-freebsd*|ultrasparc-*-freebsd*) tmake_file="$tmake_file t-crtfm" extra_parts="$extra_parts crtfastmath.o" @@ -1329,6 +1378,7 @@ i[34567]86-*-darwin* | x86_64-*-darwin* i[34567]86-*-cygwin* | x86_64-*-cygwin* | \ i[34567]86-*-mingw* | x86_64-*-mingw* | \ i[34567]86-*-dragonfly* | x86_64-*-dragonfly* | \ + i[34567]86-*-bsdsunix* | x86_64-*-bsdsunix* | \ i[34567]86-*-freebsd* | x86_64-*-freebsd* | \ i[34567]86-*-openbsd* | x86_64-*-openbsd*) tmake_file="${tmake_file} t-softfp-tf"