From patchwork Fri Sep 26 03:43:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Hundven X-Patchwork-Id: 393511 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 E5DF81400B5 for ; Fri, 26 Sep 2014 13:43:51 +1000 (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; q=dns; s= default; b=jvx/1t5sn/gDZrL4/Zp1TQHd2x3FNrh5kAywU0C7NTqEixrviq6Fq cTD+jXFlCY78aE56kM0x5w9ucttlJ72hwYWRL96l6OOy2774eLJNIanL1u9R2XVS Hm6pSouN6oxttuPuy4IUExgfsKBgR2EACHORi7UO/JtcxY33fLTumA= 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; s=default; bh=aS5dhzcJ0CYXKLicRKq6hfGmeF4=; b=pzgP1CFixBRZHccWhXA0k5oovD/m GiPezDkeCMAUICjthc0ZSFYJyOTJNo7WPjZo1M99lUtujiMeKVUvdrCynkwYoK0d pb1CUnBuhEYDfFLDR0Lv/eBCkwDyx5NUFfe96AGopn05IF0s855dGJdUqgpI2ljG GaCjZa7aMpK4c7I= Received: (qmail 6299 invoked by alias); 26 Sep 2014 03:43:42 -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 6287 invoked by uid 89); 26 Sep 2014 03:43:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 26 Sep 2014 03:43:36 +0000 Received: by mail-pa0-f46.google.com with SMTP id kx10so12369826pab.33 for ; Thu, 25 Sep 2014 20:43:34 -0700 (PDT) X-Received: by 10.70.88.198 with SMTP id bi6mr34478504pdb.64.1411703014820; Thu, 25 Sep 2014 20:43:34 -0700 (PDT) Received: from fuzzy.hsd1.wa.comcast.net. (c-50-135-131-187.hsd1.wa.comcast.net. [50.135.131.187]) by mx.google.com with ESMTPSA id jc3sm3478313pbd.59.2014.09.25.20.43.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Sep 2014 20:43:33 -0700 (PDT) From: Bryan Hundven To: "Yann E. MORIN" Cc: crossgcc@sourceware.org, Bryan Hundven Subject: [PATCH] patches/gcc: Only define CPU_COUNT if not already defined Date: Thu, 25 Sep 2014 20:43:21 -0700 Message-Id: <1411703001-13942-1-git-send-email-bryanhundven@gmail.com> X-IsSubscribed: yes Modern LIBCs #define CPU_COUNT and CPU_COUNT_S in sched.h. Rather then checking the version or brand of LIBC, just check if CPU_COUNT is defined before redefining it. Signed-off-by: Bryan Hundven --- .../010-libgo-do-not-redefine-CPU_COUNT.patch | 32 ++++++++++++++++++++++ .../010-libgo-do-not-redefine-CPU_COUNT.patch | 32 ++++++++++++++++++++++ .../010-libgo-do-not-redefine-CPU_COUNT.patch | 32 ++++++++++++++++++++++ .../010-libgo-do-not-redefine-CPU_COUNT.patch | 32 ++++++++++++++++++++++ .../010-libgo-do-not-redefine-CPU_COUNT.patch | 32 ++++++++++++++++++++++ .../010-libgo-do-not-redefine-CPU_COUNT.patch | 32 ++++++++++++++++++++++ 6 files changed, 192 insertions(+) create mode 100644 patches/gcc/4.8.0/010-libgo-do-not-redefine-CPU_COUNT.patch create mode 100644 patches/gcc/4.8.1/010-libgo-do-not-redefine-CPU_COUNT.patch create mode 100644 patches/gcc/4.8.2/010-libgo-do-not-redefine-CPU_COUNT.patch create mode 100644 patches/gcc/4.8.3/010-libgo-do-not-redefine-CPU_COUNT.patch create mode 100644 patches/gcc/4.9.0/010-libgo-do-not-redefine-CPU_COUNT.patch create mode 100644 patches/gcc/4.9.1/010-libgo-do-not-redefine-CPU_COUNT.patch diff --git a/patches/gcc/4.8.0/010-libgo-do-not-redefine-CPU_COUNT.patch b/patches/gcc/4.8.0/010-libgo-do-not-redefine-CPU_COUNT.patch new file mode 100644 index 0000000..dc9817e --- /dev/null +++ b/patches/gcc/4.8.0/010-libgo-do-not-redefine-CPU_COUNT.patch @@ -0,0 +1,32 @@ +From fe9d1f9b730f653039868515000a02cbb73e8941 Mon Sep 17 00:00:00 2001 +From: Bryan Hundven +Date: Thu, 25 Sep 2014 18:54:06 -0700 +Subject: [PATCH] libgo/runtime: Only define CPU_COUNT if not already defined + +Modern LIBCs #define CPU_COUNT and CPU_COUNT_S in sched.h. +Rather then checking the version or brand of LIBC, just check if +CPU_COUNT is defined before redefining it. + +Signed-off-by: Bryan Hundven +--- + libgo/runtime/getncpu-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgo/runtime/getncpu-linux.c b/libgo/runtime/getncpu-linux.c +index 0122b77..4aab58f 100644 +--- a/libgo/runtime/getncpu-linux.c ++++ b/libgo/runtime/getncpu-linux.c +@@ -5,8 +5,8 @@ + #include + #include + +-// CPU_COUNT is only provided by glibc 2.6 or higher +-#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) ++// Define CPU_COUNT if it isn't already. ++#if !defined(CPU_COUNT) + #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) + static int _CPU_COUNT(unsigned int *set, size_t len) { + int cnt; +-- +2.1.1 + diff --git a/patches/gcc/4.8.1/010-libgo-do-not-redefine-CPU_COUNT.patch b/patches/gcc/4.8.1/010-libgo-do-not-redefine-CPU_COUNT.patch new file mode 100644 index 0000000..dc9817e --- /dev/null +++ b/patches/gcc/4.8.1/010-libgo-do-not-redefine-CPU_COUNT.patch @@ -0,0 +1,32 @@ +From fe9d1f9b730f653039868515000a02cbb73e8941 Mon Sep 17 00:00:00 2001 +From: Bryan Hundven +Date: Thu, 25 Sep 2014 18:54:06 -0700 +Subject: [PATCH] libgo/runtime: Only define CPU_COUNT if not already defined + +Modern LIBCs #define CPU_COUNT and CPU_COUNT_S in sched.h. +Rather then checking the version or brand of LIBC, just check if +CPU_COUNT is defined before redefining it. + +Signed-off-by: Bryan Hundven +--- + libgo/runtime/getncpu-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgo/runtime/getncpu-linux.c b/libgo/runtime/getncpu-linux.c +index 0122b77..4aab58f 100644 +--- a/libgo/runtime/getncpu-linux.c ++++ b/libgo/runtime/getncpu-linux.c +@@ -5,8 +5,8 @@ + #include + #include + +-// CPU_COUNT is only provided by glibc 2.6 or higher +-#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) ++// Define CPU_COUNT if it isn't already. ++#if !defined(CPU_COUNT) + #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) + static int _CPU_COUNT(unsigned int *set, size_t len) { + int cnt; +-- +2.1.1 + diff --git a/patches/gcc/4.8.2/010-libgo-do-not-redefine-CPU_COUNT.patch b/patches/gcc/4.8.2/010-libgo-do-not-redefine-CPU_COUNT.patch new file mode 100644 index 0000000..dc9817e --- /dev/null +++ b/patches/gcc/4.8.2/010-libgo-do-not-redefine-CPU_COUNT.patch @@ -0,0 +1,32 @@ +From fe9d1f9b730f653039868515000a02cbb73e8941 Mon Sep 17 00:00:00 2001 +From: Bryan Hundven +Date: Thu, 25 Sep 2014 18:54:06 -0700 +Subject: [PATCH] libgo/runtime: Only define CPU_COUNT if not already defined + +Modern LIBCs #define CPU_COUNT and CPU_COUNT_S in sched.h. +Rather then checking the version or brand of LIBC, just check if +CPU_COUNT is defined before redefining it. + +Signed-off-by: Bryan Hundven +--- + libgo/runtime/getncpu-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgo/runtime/getncpu-linux.c b/libgo/runtime/getncpu-linux.c +index 0122b77..4aab58f 100644 +--- a/libgo/runtime/getncpu-linux.c ++++ b/libgo/runtime/getncpu-linux.c +@@ -5,8 +5,8 @@ + #include + #include + +-// CPU_COUNT is only provided by glibc 2.6 or higher +-#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) ++// Define CPU_COUNT if it isn't already. ++#if !defined(CPU_COUNT) + #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) + static int _CPU_COUNT(unsigned int *set, size_t len) { + int cnt; +-- +2.1.1 + diff --git a/patches/gcc/4.8.3/010-libgo-do-not-redefine-CPU_COUNT.patch b/patches/gcc/4.8.3/010-libgo-do-not-redefine-CPU_COUNT.patch new file mode 100644 index 0000000..dc9817e --- /dev/null +++ b/patches/gcc/4.8.3/010-libgo-do-not-redefine-CPU_COUNT.patch @@ -0,0 +1,32 @@ +From fe9d1f9b730f653039868515000a02cbb73e8941 Mon Sep 17 00:00:00 2001 +From: Bryan Hundven +Date: Thu, 25 Sep 2014 18:54:06 -0700 +Subject: [PATCH] libgo/runtime: Only define CPU_COUNT if not already defined + +Modern LIBCs #define CPU_COUNT and CPU_COUNT_S in sched.h. +Rather then checking the version or brand of LIBC, just check if +CPU_COUNT is defined before redefining it. + +Signed-off-by: Bryan Hundven +--- + libgo/runtime/getncpu-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgo/runtime/getncpu-linux.c b/libgo/runtime/getncpu-linux.c +index 0122b77..4aab58f 100644 +--- a/libgo/runtime/getncpu-linux.c ++++ b/libgo/runtime/getncpu-linux.c +@@ -5,8 +5,8 @@ + #include + #include + +-// CPU_COUNT is only provided by glibc 2.6 or higher +-#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) ++// Define CPU_COUNT if it isn't already. ++#if !defined(CPU_COUNT) + #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) + static int _CPU_COUNT(unsigned int *set, size_t len) { + int cnt; +-- +2.1.1 + diff --git a/patches/gcc/4.9.0/010-libgo-do-not-redefine-CPU_COUNT.patch b/patches/gcc/4.9.0/010-libgo-do-not-redefine-CPU_COUNT.patch new file mode 100644 index 0000000..dc9817e --- /dev/null +++ b/patches/gcc/4.9.0/010-libgo-do-not-redefine-CPU_COUNT.patch @@ -0,0 +1,32 @@ +From fe9d1f9b730f653039868515000a02cbb73e8941 Mon Sep 17 00:00:00 2001 +From: Bryan Hundven +Date: Thu, 25 Sep 2014 18:54:06 -0700 +Subject: [PATCH] libgo/runtime: Only define CPU_COUNT if not already defined + +Modern LIBCs #define CPU_COUNT and CPU_COUNT_S in sched.h. +Rather then checking the version or brand of LIBC, just check if +CPU_COUNT is defined before redefining it. + +Signed-off-by: Bryan Hundven +--- + libgo/runtime/getncpu-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgo/runtime/getncpu-linux.c b/libgo/runtime/getncpu-linux.c +index 0122b77..4aab58f 100644 +--- a/libgo/runtime/getncpu-linux.c ++++ b/libgo/runtime/getncpu-linux.c +@@ -5,8 +5,8 @@ + #include + #include + +-// CPU_COUNT is only provided by glibc 2.6 or higher +-#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) ++// Define CPU_COUNT if it isn't already. ++#if !defined(CPU_COUNT) + #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) + static int _CPU_COUNT(unsigned int *set, size_t len) { + int cnt; +-- +2.1.1 + diff --git a/patches/gcc/4.9.1/010-libgo-do-not-redefine-CPU_COUNT.patch b/patches/gcc/4.9.1/010-libgo-do-not-redefine-CPU_COUNT.patch new file mode 100644 index 0000000..dc9817e --- /dev/null +++ b/patches/gcc/4.9.1/010-libgo-do-not-redefine-CPU_COUNT.patch @@ -0,0 +1,32 @@ +From fe9d1f9b730f653039868515000a02cbb73e8941 Mon Sep 17 00:00:00 2001 +From: Bryan Hundven +Date: Thu, 25 Sep 2014 18:54:06 -0700 +Subject: [PATCH] libgo/runtime: Only define CPU_COUNT if not already defined + +Modern LIBCs #define CPU_COUNT and CPU_COUNT_S in sched.h. +Rather then checking the version or brand of LIBC, just check if +CPU_COUNT is defined before redefining it. + +Signed-off-by: Bryan Hundven +--- + libgo/runtime/getncpu-linux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgo/runtime/getncpu-linux.c b/libgo/runtime/getncpu-linux.c +index 0122b77..4aab58f 100644 +--- a/libgo/runtime/getncpu-linux.c ++++ b/libgo/runtime/getncpu-linux.c +@@ -5,8 +5,8 @@ + #include + #include + +-// CPU_COUNT is only provided by glibc 2.6 or higher +-#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) ++// Define CPU_COUNT if it isn't already. ++#if !defined(CPU_COUNT) + #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) + static int _CPU_COUNT(unsigned int *set, size_t len) { + int cnt; +-- +2.1.1 +