Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-09-26 Thread Rainer Orth
Hi Robert,

> 2011/8/17 Rainer Orth :
>> Hi Robert,
>>
>>> My patch still applies cleanly to current HEAD, has this migration
>>> happened already?  If not, what's the current ETA?  I'll have almost
>>> no spare time after this week, I'd like to sort this out before/during
>>> the weekend if possible.
>>
>> all the relevant patches have been posted by now.  One needs a bit work,
>> the others are awaiting review.
>
> Is there any news about this?

Paolo is currently reviewing the outstanding patches.  If it's really
urgent, I'd say go ahead and commit your patch.

Besides, there are two typos:

Index: libgcc/config.host
===
--- libgcc/config.host  (revision 176595)
+++ libgcc/config.host  (working copy)
@@ -478,6 +478,14 @@
tmake_file="{$tmake_file} t-crtfm"
md_unwind_header=mips/linux-unwind.h
;;
+mips64*-*-kfreebsd*-gnu)
+   extra_parts="$extra_parts crtfastmath.o"
+   tmake_file="{$tmake_file} t-crtfm"

${tmake_file} or omit the brackets completely

+   ;;
+mips*-*-kfreebsd*-gnu) # GNU/kFreeBSD MIPS, either endian.
+   extra_parts="$extra_parts crtfastmath.o"
+   tmake_file="{$tmake_file} t-crtfm"

likewise

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-09-23 Thread Robert Millan
Hi there,

2011/8/17 Rainer Orth :
> Hi Robert,
>
>> My patch still applies cleanly to current HEAD, has this migration
>> happened already?  If not, what's the current ETA?  I'll have almost
>> no spare time after this week, I'd like to sort this out before/during
>> the weekend if possible.
>
> all the relevant patches have been posted by now.  One needs a bit work,
> the others are awaiting review.

Is there any news about this?

-- 
Robert Millan


Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-08-17 Thread Rainer Orth
Hi Robert,

> My patch still applies cleanly to current HEAD, has this migration
> happened already?  If not, what's the current ETA?  I'll have almost
> no spare time after this week, I'd like to sort this out before/during
> the weekend if possible.

all the relevant patches have been posted by now.  One needs a bit work,
the others are awaiting review.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-08-17 Thread Robert Millan
Hi!

2011/7/26 Rainer Orth :
> Robert,
>
>> 2011/7/25 Richard Sandiford :
>>> Robert Millan  writes:
 This patch adds support for GNU/kFreeBSD systems running on MIPS.
>>>
>>> Looks good.  However, Rainer's in the middle of moving things from gcc/
>>> to libgcc/ -- where they belong -- and committing a new port now would
>>> interfere with that.  If it's OK, I'd like to hold off applying this
>>> until Rainer's finished his changes.
> I'm in the middle of moving shlib support (another day), need to rebase
> crtstuff and libgcc1, and finish libgcc2.

My patch still applies cleanly to current HEAD, has this migration
happened already?  If not, what's the current ETA?  I'll have almost
no spare time after this week, I'd like to sort this out before/during
the weekend if possible.

Thanks!

-- 
Robert Millan


Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-07-26 Thread Robert Millan
2011/7/26 Rainer Orth :
> I'm in the middle of moving shlib support (another day), need to rebase
> crtstuff and libgcc1, and finish libgcc2.
>
> I hope to be ready within two or three weeks.

Ok then.  I'd appreciate if you can send me a reminder via private
mail when you've finished.

Best regards

-- 
Robert Millan


Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-07-26 Thread Rainer Orth
Robert,

> 2011/7/25 Richard Sandiford :
>> Robert Millan  writes:
>>> This patch adds support for GNU/kFreeBSD systems running on MIPS.
>>
>> Looks good.  However, Rainer's in the middle of moving things from gcc/
>> to libgcc/ -- where they belong -- and committing a new port now would
>> interfere with that.  If it's OK, I'd like to hold off applying this
>> until Rainer's finished his changes.

thanks.

> It's ok.  Could you give a rough estimate? (few days / weeks / months)

I'm in the middle of moving shlib support (another day), need to rebase
crtstuff and libgcc1, and finish libgcc2.

I hope to be ready within two or three weeks.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-07-26 Thread Robert Millan
2011/7/25 Richard Sandiford :
> Robert Millan  writes:
>> This patch adds support for GNU/kFreeBSD systems running on MIPS.
>
> Looks good.  However, Rainer's in the middle of moving things from gcc/
> to libgcc/ -- where they belong -- and committing a new port now would
> interfere with that.  If it's OK, I'd like to hold off applying this
> until Rainer's finished his changes.

It's ok.  Could you give a rough estimate? (few days / weeks / months)

-- 
Robert Millan


Re: [PATCH] GNU/kFreeBSD systems running on MIPS

2011-07-25 Thread Richard Sandiford
Robert Millan  writes:
> This patch adds support for GNU/kFreeBSD systems running on MIPS.

Looks good.  However, Rainer's in the middle of moving things from gcc/
to libgcc/ -- where they belong -- and committing a new port now would
interfere with that.  If it's OK, I'd like to hold off applying this
until Rainer's finished his changes.

Thanks,
Richard


[PATCH] GNU/kFreeBSD systems running on MIPS

2011-07-21 Thread Robert Millan
This patch adds support for GNU/kFreeBSD systems running on MIPS.

-- 
Robert Millan
2011-07-22  Robert Millan  

	Support for GNU/kFreeBSD systems running on MIPS.

	* config.gcc: Detect mips*-*-kfreebsd*-gnu.
	* config.host: Likewise.
	* config/mips/kfreebsd-gnu.h: New file.
	* config/mips/kfreebsd-gnu64.h: New file.
	* config/mips/gnu-user.h: Restrict `-march=native' support to GNU/Linux.

Index: libgcc/config.host
===
--- libgcc/config.host	(revision 176595)
+++ libgcc/config.host	(working copy)
@@ -478,6 +478,14 @@
 	tmake_file="{$tmake_file} t-crtfm"
 	md_unwind_header=mips/linux-unwind.h
 	;;
+mips64*-*-kfreebsd*-gnu)
+	extra_parts="$extra_parts crtfastmath.o"
+	tmake_file="{$tmake_file} t-crtfm"
+	;;
+mips*-*-kfreebsd*-gnu)			# GNU/kFreeBSD MIPS, either endian.
+	extra_parts="$extra_parts crtfastmath.o"
+	tmake_file="{$tmake_file} t-crtfm"
+	;;
 mips*-*-openbsd*)
 	;;
 mipsisa32-*-elf* | mipsisa32el-*-elf*)
Index: gcc/config.gcc
===
--- gcc/config.gcc	(revision 176595)
+++ gcc/config.gcc	(working copy)
@@ -1819,20 +1819,28 @@
 	tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
 	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
 	;;
-mips64*-*-linux* | mipsisa64*-*-linux*)
-	tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h"
+mips64*-*-linux* | mipsisa64*-*-linux* | mips64*-*-kfreebsd*-gnu | mipsisa64*-*-kfreebsd*-gnu)
+	tm_file="dbxelf.h elfos.h gnu-user.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h"
 	tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16"
 	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
+	case ${target_os} in
+		linux*)
+			tm_file="${tm_file} linux.h mips/linux64.h"
+			;;
+		kfreebsd*-gnu)
+			tm_file="${tm_file} kfreebsd-gnu.h mips/kfreebsd-gnu64.h"
+			;;
+	esac
 	case ${target} in
-		mips64el-st-linux-gnu)
+		mips64el-st-*)
 			tm_file="${tm_file} mips/st.h"
 			tmake_file="${tmake_file} mips/t-st"
 			;;
-		mips64octeon*-*-linux*)
+		mips64octeon*-*-*)
 			tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
 			target_cpu_default=MASK_SOFT_FLOAT_ABI
 			;;
-		mipsisa64r2*-*-linux*)
+		mipsisa64r2*-*-*)
 			tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
 			;;
 	esac
@@ -1841,11 +1849,27 @@
 	gas=yes
 	test x$with_llsc != x || with_llsc=yes
 	;;
-mips*-*-linux*)# Linux MIPS, either endian.
-tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h"
+mips*-*-linux* | mips*-*-kfreebsd*-gnu)			# GNU/* MIPS, either endian.
+tm_file="dbxelf.h elfos.h gnu-user.h glibc-stdint.h ${tm_file} mips/gnu-user.h"
 	tmake_file="${tmake_file} mips/t-libgcc-mips16"
+	case ${target_os} in
+		linux*)
+			tm_file="${tm_file} linux.h mips/linux.h"
+			;;
+		kfreebsd*-gnu)
+			tm_file="${tm_file} kfreebsd-gnu.h mips/kfreebsd-gnu.h"
+			;;
+	esac
 	if test x$enable_targets = xall; then
-		tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
+		tm_file="${tm_file} mips/gnu-user64.h"
+		case ${target_os} in
+			linux*)
+tm_file="${tm_file} mips/linux64.h"
+;;
+			kfreebsd*-gnu)
+tm_file="${tm_file} mips/kfreebsd-gnu64.h"
+;;
+		esac
 		tmake_file="${tmake_file} mips/t-linux64"
 		tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
 	fi
Index: gcc/config/mips/gnu-user.h
===
--- gcc/config/mips/gnu-user.h	(revision 176595)
+++ gcc/config/mips/gnu-user.h	(working copy)
@@ -106,8 +106,8 @@
 #endif
 
 /* -march=native handling only makes sense with compiler running on
-   a MIPS chip.  */
-#if defined(__mips__)
+   a MIPS chip.  Also, for now only Linux targets are supported.  */
+#if defined(__mips__) && defined(__linux__)
 extern const char *host_detect_local_cpu (int argc, const char **argv);
 # define EXTRA_SPEC_FUNCTIONS \
   { "local_cpu_detect", host_detect_local_cpu },
Index: gcc/config/mips/kfreebsd-gnu64.h
===
--- gcc/config/mips/kfreebsd-gnu64.h	(revision 0)
+++ gcc/config/mips/kfreebsd-gnu64.h	(revision 0)
@@ -0,0 +1,31 @@
+/* Definitions for MIPS running kFreeBSD-based GNU systems with ELF format
+   using n32/64 abi.
+   Copyright (C) 2011
+   Free Software Foundation, Inc.
+   Contributed by Robert Millan.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of t