PowerPC glibc patches
Fernandes, Joao Moreira (EXT-Other PT/Amadora)
Joao.M.Fernandes.ext@coriant.com
Tue Dec 31 16:21:00 GMT 2013
Yann,
Unfortunately I have to use Outlook (company policy...) and I'm
terrible with it, so sorry about the mess. I'm also unable to use
patchbomb in this setup, so I'm inlining the patch bellow.
Cheers,
João
exporting patch:
# HG changeset patch
# User João Fernandes <joao.m.fernandes.ext@coriant.com>
# Date 1388504699 0
# Tue Dec 31 15:44:59 2013 +0000
# Node ID 655dd93187f312684df5172bbb82aa1c09db7417
# Parent 87ad9e82546df3ce0127d1046ec644b4486aa626
libc/glibc: various powerpc glibc fixes
While trying to build a toolchain for a PowerPC system with gcc 4.8.1,
binutils 2.22 and glibc 2.8, I faced some difficulties. Firstly, patch
glibc/2.9/600-recent-binutils.patch also had to be applied to glibc 2.8;
secondly, gcc 4.8 dropped -mnew-mnemonics/-mold-mnemonics options, so I had to
remove -mnew-mnemonics from sysdeps/powerpc/Makefile of all glibc
versions < 2.17 (this is safe as -mnew-mnemonics is gcc's default since the
early 90's); lastly, the patch from
https://sourceware.org/ml/crossgcc/2008-10/msg00010.html had to be applied.
This patch addresses all mentioned issues.
Signed-off-by: João Fernandes <joao.m.fernandes.ext@coriant.com>
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.10.1/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.10.1/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.11.1/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.11.1/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.11/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.11/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.12.1/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.12.1/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.12.2/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.12.2/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.13/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.13/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.14.1/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.14.1/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.14/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.14/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.15/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.15/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.16.0/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.16.0/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.8/100-powerpc-no_new_mnemonics.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.8/100-powerpc-no_new_mnemonics.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,10 @@
+--- glibc-2.8-ori/sysdeps/powerpc/Makefile 2013-10-14 10:06:43.466677702 +0100
++++ glibc-2.8/sysdeps/powerpc/Makefile 2013-10-14 10:12:20.932351104 +0100
+@@ -1,7 +1,3 @@
+-# We always want to use the new mnemonic syntax even if we are on a RS6000
+-# machine.
+-+cflags += -mnew-mnemonics
+-
+ ifeq ($(subdir),gmon)
+ sysdep_routines += ppc-mcount
+ endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.8/110-powerpc-nptl_guard_sym.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.8/110-powerpc-nptl_guard_sym.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,9 @@
+--- glibc-2.8-ori/nptl/sysdeps/powerpc/tcb-offsets.sym 2013-10-14 10:06:43.566678198 +0100
++++ glibc-2.8/nptl/sysdeps/powerpc/tcb-offsets.sym 2013-10-14 10:37:58.331974657 +0100
+@@ -15,4 +15,6 @@
+ PID thread_offsetof (pid)
+ TID thread_offsetof (tid)
+ POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
++#ifndef __ASSUME_PRIVATE_FUTEX
+ PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex)
++#endif
diff -r 87ad9e82546d -r 655dd93187f3 glibc/2.8/600-recent-binutils.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/glibc/2.8/600-recent-binutils.patch Tue Dec 31 15:44:59 2013 +0000
@@ -0,0 +1,37 @@
+diff -durN glibc-2.9.orig/configure glibc-2.9/configure
+--- glibc-2.9.orig/configure 2010-05-18 23:47:23.000000000 +0200
++++ glibc-2.9/configure 2010-05-18 23:50:04.000000000 +0200
+@@ -4534,7 +4534,7 @@
+ ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 2.1[3-9]*)
++ 2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+@@ -4597,7 +4597,7 @@
+ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 2.1[3-9]*)
++ 2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+diff -durN glibc-2.9.orig/configure.in glibc-2.9/configure.in
+--- glibc-2.9.orig/configure.in 2010-05-18 23:47:23.000000000 +0200
++++ glibc-2.9/configure.in 2010-05-18 23:51:25.000000000 +0200
+@@ -844,10 +844,10 @@
+ # Accept binutils 2.13 or newer.
+ AC_CHECK_PROG_VER(AS, $AS, --version,
+ [GNU assembler.* \([0-9]*\.[0-9.]*\)],
+- [2.1[3-9]*], AS=: critic_missing="$critic_missing as")
++ [2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as")
+ AC_CHECK_PROG_VER(LD, $LD, --version,
+ [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
+- [2.1[3-9]*], LD=: critic_missing="$critic_missing ld")
++ [2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld")
+
+ # We need the physical current working directory. We cannot use the
+ # "pwd -P" shell builtin since that's not portable. Instead we try to
-----Original Message-----
From: Yann E. MORIN [mailto:yann.morin.1998@gmail.com] On Behalf Of Yann E. MORIN
Sent: Friday, November 15, 2013 8:07 PM
To: Fernandes, Joao Moreira (EXT-Other PT/Amadora)
Cc: crossgcc@sourceware.org
Subject: Re: PowerPC glibc patches
João, All,
[Please, wrap your messages at ~75 cahrs, it is easier to read]
On 2013-10-14 12:46 +0000, Fernandes, Joao Moreira (EXT-Other PT/Amadora) spake thusly:
> While trying to build a toolchain for a PowerPC system with gcc 4.8.1,
> binutils 2.22 and glibc 2.8, I faced some difficulties. Firstly, patch
> glibc/2.9/600-recent-binutils.patch also had to be applied to glibc 2.8;
> secondly, gcc 4.8 dropped -mnew-mnemonics/-mold-mnemonics options, so I
> had to remove -mnew-mnemonics from sysdeps/powerpc/Makefile - this is
> safe as -mnew-mnemonics is gcc's default since the early 90's - and this
> applies to glibc versions < 2.17; lastly, the patch from
> https://sourceware.org/ml/crossgcc/2008-10/msg00010.html had to be applied.
> A set of patches addressing all these issues is attached.
Your patches are unusable because they are attached as base64-encoded
parts, which makes them unusable.
Please, have a look at:
docs/7 - Contributing to crosstool-NG.txt
docs/C - Misc. tutorials.txt
for example on how to ciontribute changes to crosstool-NG.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the crossgcc
mailing list