diff mbox

[build] Move MD_UNWIND_SUPPORT to toplevel libgcc

Message ID 87r565gd7e.fsf@kepler.schwinge.homeip.net
State Superseded, archived
Headers show

Commit Message

Thomas Schwinge July 5, 2011, 11:48 a.m. UTC
Hallo!

On Wed, 29 Jun 2011 10:40:10 +0200, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 06/21/2011 12:04 PM, Rainer Orth wrote:
> > For md_unwind_header on the other hand, you'd have almost as many cases
> > as in the general case.  I fear it's hard to have the configuration
> > split over too many places.  So I'd suggest to split the affected cases
> > into Linux and non-Linux ones, with the slight duplication necessary for
> > extra_parts and tmake_file.
> 
> I agree.  Thomas, are you going to do that?

Like this?


	libgcc/
	config.host: Use i386/linux-unwind.h only for *-*-linux*.

---
 libgcc/config.host |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

Comments

Rainer Orth July 5, 2011, 11:52 a.m. UTC | #1
Hi Thomas,

> Like this?
>
>
> 	libgcc/
> 	config.host: Use i386/linux-unwind.h only for *-*-linux*.
>
> ---
>  libgcc/config.host |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/libgcc/config.host b/libgcc/config.host
> index 326ce91..1d5b887 100644
> --- a/libgcc/config.host
> +++ b/libgcc/config.host
> @@ -354,12 +354,18 @@ i[34567]86-*-openbsd*)
>  i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
>  	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
>  	tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
> -	md_unwind_header=i386/linux-unwind.h
> +        case $host in
> +            *-*-linux*)
> +	        md_unwind_header=i386/linux-unwind.h;;
> +        esac
>  	;;
>  x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
>  	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
>  	tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
> -	md_unwind_header=i386/linux-unwind.h
> +        case $host in
> +            *-*-linux*)
> +	        md_unwind_header=i386/linux-unwind.h;;
> +        esac

Instead of nested cases, I'd rather use one i[34567]86-*-linux* case and
another for the rest, duplicating extra_parts and tmake_file.  Same for
x86_64-*-linux* vs. the rest.

But that's just me.

	Rainer
Paolo Bonzini July 5, 2011, 11:53 a.m. UTC | #2
On 07/05/2011 01:52 PM, Rainer Orth wrote:
> Instead of nested cases, I'd rather use one i[34567]86-*-linux* case and
> another for the rest, duplicating extra_parts and tmake_file.  Same for
> x86_64-*-linux* vs. the rest.
>
> But that's just me.

I agree.

Paolo
diff mbox

Patch

diff --git a/libgcc/config.host b/libgcc/config.host
index 326ce91..1d5b887 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -354,12 +354,18 @@  i[34567]86-*-openbsd*)
 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
 	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
 	tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
-	md_unwind_header=i386/linux-unwind.h
+        case $host in
+            *-*-linux*)
+	        md_unwind_header=i386/linux-unwind.h;;
+        esac
 	;;
 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
 	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
 	tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
-	md_unwind_header=i386/linux-unwind.h
+        case $host in
+            *-*-linux*)
+	        md_unwind_header=i386/linux-unwind.h;;
+        esac
 	;;
 i[34567]86-pc-msdosdjgpp*)
 	;;