From patchwork Tue Dec 31 16:20:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Fernandes, Joao Moreira (EXT-Other PT/Amadora)" X-Patchwork-Id: 305898 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BF1A12C0090 for ; Wed, 1 Jan 2014 03:21:16 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; q=dns; s=default; b=o0+w9+WnS/CbScWrFaVSWAr1R0yO4 DIshWpSZsLcRmMy6rFODgFfkwT1MYCGZf0JY4pPsvis5b4Kc3aFN06YwTERdI/mC 7dpDfP+UPKnuUeOm9G8qAwG1uOKWIldKy/LGw+nh+IkDIXh79eVUr3JVtxokdUda Nv11YwoGQQ6FhU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; s=default; bh=o438Lo6IE50Vdlrurnd0pjCOuTg=; b=HhZ 39f94QmDY4sWN/cdZk7VvEUGmGix2xudsBEDRfDQHzzVgk3aMbSObGvA9ydWjMmo T2NnrabGOaI2+PZ8DmfPb6x1/VFUWUhWqL72WQJ+BKA3HpEOwIiQJOCbmy7e1KFB hhlnKHy03et24VOhneIYMRrebVP/FPyYmsjD+JgE= Received: (qmail 1766 invoked by alias); 31 Dec 2013 16:21:08 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 1752 invoked by uid 89); 31 Dec 2013 16:21:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL, BAYES_20, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, TBC, T_FRT_BELOW2 autolearn=no version=3.3.2 X-HELO: emea01-am1-obe.outbound.protection.outlook.com Received: from mail-am1lp0014.outbound.protection.outlook.com (HELO emea01-am1-obe.outbound.protection.outlook.com) (213.199.154.14) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 31 Dec 2013 16:21:04 +0000 Received: from DB3PR04MB218.eurprd04.prod.outlook.com (10.242.130.19) by DB3PR04MB220.eurprd04.prod.outlook.com (10.242.130.23) with Microsoft SMTP Server (TLS) id 15.0.842.7; Tue, 31 Dec 2013 16:20:59 +0000 Received: from DB3PR04MB218.eurprd04.prod.outlook.com ([169.254.8.29]) by DB3PR04MB218.eurprd04.prod.outlook.com ([169.254.8.29]) with mapi id 15.00.0842.003; Tue, 31 Dec 2013 16:20:59 +0000 From: "Fernandes, Joao Moreira (EXT-Other PT/Amadora)" To: "Yann E. MORIN" CC: "crossgcc@sourceware.org" Subject: RE: PowerPC glibc patches Date: Tue, 31 Dec 2013 16:20:58 +0000 Message-ID: <4aa29d48b1aa4a8b939b0ab2820b7228@DB3PR04MB218.eurprd04.prod.outlook.com> References: <20131115200716.GD3337@free.fr> In-Reply-To: <20131115200716.GD3337@free.fr> x-forefront-prvs: 00770C4423 x-forefront-antispam-report: SFV:NSPM; SFS:(10019001)(199002)(377454003)(189002)(377424004)(13464003)(83072002)(2656002)(76576001)(85306002)(50986001)(54316002)(81342001)(33646001)(76482001)(74316001)(87266001)(15202345003)(85852003)(87936001)(74366001)(65816001)(81686001)(83322001)(54356001)(69226001)(19580395003)(31966008)(79102001)(59766001)(56776001)(53806001)(66066001)(80022001)(81816001)(51856001)(74706001)(77982001)(15975445006)(77096001)(63696002)(74876001)(47446002)(80976001)(90146001)(47976001)(56816005)(81542001)(19580405001)(46102001)(4396001)(49866001)(74662001)(74502001)(76796001)(76786001)(47736001)(24736002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB3PR04MB220; H:DB3PR04MB218.eurprd04.prod.outlook.com; CLIP:194.145.60.35; FPR:; RD:InfoNoRecords; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: coriant.com 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 # 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 -----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. | '------------------------------^-------^------------------^--------------------' 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