[4.8 branch] Handle svn 1.8.1

2013-10-21 Thread Andreas Jaeger

I'd like to backport this patch from trunk to handle subversion 1.8.1
output.

Ok to commit?

Andreas

2013-10-21  Mike Stump  

* gcc_update (configure): Update to handle svn 1.8.1.

Index: contrib/gcc_update
===
--- contrib/gcc_update  (revision 203886)
+++ contrib/gcc_update  (working copy)
@@ -382,7 +382,7 @@
fi

revision=`$GCC_SVN info | awk '/Revision:/ { print $2 }'`
-   branch=`$GCC_SVN info | sed -ne "/URL:/ {
+   branch=`$GCC_SVN info | sed -ne "/^URL:/ {
s,.*/trunk,trunk,
s,.*/branches/,,
    s,.*/tags/,,

-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Re: PATCH: Update longlong.h from GLIBC

2012-05-08 Thread Andreas Jaeger
On Tuesday, May 08, 2012 10:43:14 Richard Guenther wrote:
> On Mon, May 7, 2012 at 11:11 PM, H.J. Lu  wrote:
> > Hi,
> > 
> > I am preparing to update GLIBC longlong.h from GCC.  This patch
> > updates GCC longlong.h to use a URL instead of an FSF postal address
> > and  replace spaces with tab.  OK to install?
> > 
> > Since I'd like to simply copy longlong.h from GCC release branch to
> > GLIBC, Is this also OK for 4.7 branch?
> 
> Why?  Does it fix anything there?

It makes sharing the file between gcc and glibc easier,

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Re: PATCH: Update longlong.h from GLIBC

2012-05-08 Thread Andreas Jaeger
On Tuesday, May 08, 2012 11:59:34 Richard Earnshaw wrote:
> On 08/05/12 10:04, Andreas Jaeger wrote:
> > On Tuesday, May 08, 2012 10:43:14 Richard Guenther wrote:
> >> On Mon, May 7, 2012 at 11:11 PM, H.J. Lu  wrote:
> >>> Hi,
> >>> 
> >>> I am preparing to update GLIBC longlong.h from GCC.  This patch
> >>> updates GCC longlong.h to use a URL instead of an FSF postal address
> >>> and  replace spaces with tab.  OK to install?
> >>> 
> >>> Since I'd like to simply copy longlong.h from GCC release branch to
> >>> GLIBC, Is this also OK for 4.7 branch?
> >> 
> >> Why?  Does it fix anything there?
> > 
> > It makes sharing the file between gcc and glibc easier,
> > 
> > Andreas
> 
> Why should glibc be depending on the GCC release branch?  Sounds like
> the tail wagging the dog.

Ah, you discuss the release branch ;) Let HJ defend that one.


> Changing this file has quite a high potential for introducing
> regressions.  I don't think we should risk that on the release branch.

It's only whitespace  IMO. I'm arguing for the trunk to take the change,

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Re: [PATCH v2] ARM: Use different linker path for hardfloat ABI

2012-05-23 Thread Andreas Jaeger

On 05/01/2012 10:52 AM, Richard Earnshaw wrote:

On 30/04/12 22:47, Michael Hope wrote:

On 1 May 2012 03:24, Richard Earnshaw  wrote:

On 27/04/12 00:27, Michael Hope wrote:

On 27 April 2012 08:20, Carlos O'Donell  wrote:

On Mon, Apr 23, 2012 at 5:36 PM, Michael Hope  wrote:

2012-04-24  Michael Hope
Richard Earnshaw

* config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define.
(GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define.
(GLIBC_DYNAMIC_LINKER_DEFAULT): Define.
(GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path.

diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index 80bd825..2ace6f0 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -62,7 +62,17 @@
  /* Use ld-linux.so.3 so that it will be possible to run "classic"
GNU/Linux binaries on an EABI system.  */
  #undef  GLIBC_DYNAMIC_LINKER
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
+#if TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_HARD
+#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_HARD_FLOAT
+#else
+#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+#endif
+#define GLIBC_DYNAMIC_LINKER \
+   "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
+%{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+%{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"

  /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
use the GNU/Linux version, not the generic BPABI version.  */


This patch is broken. Please fix this.

You can't use a named enumeration in cpp equality.

The type ARM_FLOAT_ABI_HARD is a named enumeration and evaluates to 0
as an unknown identifier.

Therefore "#if TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_HARD"
evaluates to "#if 0 == 0" and is always true.

Watch out that "#define ARM_FLOAT_ABI_HARD ARM_FLOAT_ABI_HARD" for
such enums is not conforming C99/C11.

I suggest you define the types as macros and then set the named enum
to those values, then use the macros in the header equality checks.

e.g.
#define VAL1 0 then enum FOO { RVAL1 = VAL1, ... }

Look at arm.h for the enum definition.


I've looked further into this and I think the original pre-#if version
is correct.

The float ABI comes from these places:
  * The -mfloat-abi= command line argument, else
  * The --with-float= configure time argument, else
  * TARGET_DEFAULT_FLOAT_ABI from linux-eabi.h

In the first case the ABI is explicit.  In the second
OPTION_DEFAULT_SPECS turns the configure time argument into an explict
-mfloat-abi=.

The patch below covers all cases, keeps the logic in the spec file,
and adds a comment linking the two #defines.

Tested by building with no configure flags, --wtih-float=softfp,
--with-float=hard, and then running with all combinations of
{,-mfloat-abi=softfp,-mfloat-abi=hard} {,-mglibc,-muclibc,-mbionic}.

OK?

-- Michael

2012-04-27  Michael Hope

   * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER): Pick the loader
   using a spec rule.



Michael,

can you try this patch please.  It should make it possible to then
create linux-eabihf.h containing just

#undef TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
#undef GLIBC_DYNAMIC_LINKER_DEFAULT
#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_HARD_FLOAT

Which is not quite as simple as leaving out the second re-define, but
pretty close.


Hi Richard.  Your patch tests just fine.  I like it.  You could change
the spec rule to the newer if-elseif-else form but that's a nit.

-- Michael



Great, thanks!  I've committed it as is.


I suggest to add this also to the gcc 4.7 branch. Richard (Earnshaw), 
could you do take care of this, please?


Thanks,
Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Re: [PATCH v2] ARM: Use different linker path for hardfloat ABI

2012-05-23 Thread Andreas Jaeger
On Wednesday, May 23, 2012 09:56:31 Richard Earnshaw wrote:
> [...]
> This is a behaviour change.  It would need RM approval for a release
> branch.
> 
> R.

There was agreement by all pushing for the change to use it. So, let's ask 
the release managers about their opinion,

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126