From patchwork Thu Dec 11 20:54:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lynn A. Boger" X-Patchwork-Id: 420252 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 22AD81400DD for ; Fri, 12 Dec 2014 07:54:28 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; q=dns; s=default; b=glMoJs7ivrq/I9AG CtfvFD7TvVu3Obl6nKSNNEIDXUASqDDm3WRUtuMmpTZaFiPrDafSmlyXmORXPMT3 5Gi5VkJ4xqokEjxXnZhKAncYMCK/3Uied8rwSuusXxMglDevKvZ/0mAZKg6Kw5vK +BuIpM5KDALbhkggvg75sILASsg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; s=default; bh=dxiN7ypj9aY977/2ng2n4q Td7wU=; b=jqSYMfpMOT9SbrnNe7oiJVmz9pUhrIPMcvVN3c9MVSVRxG9F1/7Gdc dkiM6W3mVA6QI2GOj9iWOFjURPyAmKU9L0MV+xX6qLat/SYz3iEZoL/78HfFNVVk n59NEea9RHHEfpFCAoNCJT20Mgy/XeUd+bA6AxJFckgv9FKYKBN0Y= Received: (qmail 9081 invoked by alias); 11 Dec 2014 20:54:21 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9066 invoked by uid 89); 11 Dec 2014 20:54:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e33.co.us.ibm.com Received: from e33.co.us.ibm.com (HELO e33.co.us.ibm.com) (32.97.110.151) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 11 Dec 2014 20:54:19 +0000 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Dec 2014 13:54:17 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 11 Dec 2014 13:54:15 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 22481C40001 for ; Thu, 11 Dec 2014 13:42:59 -0700 (MST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBBKsERp37159160 for ; Thu, 11 Dec 2014 13:54:14 -0700 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBBKsEAm016046 for ; Thu, 11 Dec 2014 13:54:14 -0700 Received: from oc2602623110.ibm.com (oc2602623110.ibm.com.rchland.ibm.com [9.10.86.28]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sBBKsEQB016005; Thu, 11 Dec 2014 13:54:14 -0700 Message-ID: <548A0476.20508@linux.vnet.ibm.com> Date: Thu, 11 Dec 2014 14:54:14 -0600 From: "Lynn A. Boger" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "gcc-patches@gnu.org" , "gofrontend-dev@googlegroups.com" Subject: [PATCH] backport libgo patch to add ioctl consts X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14121120-0009-0000-0000-000007118B47 X-IsSubscribed: yes Hi all, Please backport the following to gcc 4.9 https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02980.html. There has been a request to get the fixes that went into gcc trunk for gccgo ppc64 & ppc64le backported into gcc 4.9. 2014-12-11 Lynn Boger * libgo/mksysinfo.sh: Add ioctl const values Index: libgo/mksysinfo.sh =================================================================== --- libgo/mksysinfo.sh (revision 218396) +++ libgo/mksysinfo.sh (working copy) @@ -174,6 +174,9 @@ enum { #ifdef TIOCGWINSZ TIOCGWINSZ_val = TIOCGWINSZ, #endif +#ifdef TIOCSWINSZ + TIOCSWINSZ_val = TIOCSWINSZ, +#endif #ifdef TIOCNOTTY TIOCNOTTY_val = TIOCNOTTY, #endif @@ -192,6 +195,12 @@ enum { #ifdef TIOCSIG TIOCSIG_val = TIOCSIG, #endif +#ifdef TCGETS + TCGETS_val = TCGETS, +#endif +#ifdef TCSETS + TCSETS_val = TCSETS, +#endif }; EOF @@ -780,6 +789,11 @@ if ! grep '^const TIOCGWINSZ' ${OUT} >/dev/null 2> echo 'const TIOCGWINSZ = _TIOCGWINSZ_val' >> ${OUT} fi fi +if ! grep '^const TIOCSWINSZ' ${OUT} >/dev/null 2>&1; then + if grep '^const _TIOCSWINSZ_val' ${OUT} >/dev/null 2>&1; then + echo 'const TIOCSWINSZ = _TIOCSWINSZ_val' >> ${OUT} + fi +fi if ! grep '^const TIOCNOTTY' ${OUT} >/dev/null 2>&1; then if grep '^const _TIOCNOTTY_val' ${OUT} >/dev/null 2>&1; then echo 'const TIOCNOTTY = _TIOCNOTTY_val' >> ${OUT} @@ -812,8 +826,18 @@ if ! grep '^const TIOCSIG' ${OUT} >/dev/null 2>&1; fi # The ioctl flags for terminal control -grep '^const _TC[GS]ET' gen-sysinfo.go | \ +grep '^const _TC[GS]ET' gen-sysinfo.go | grep -v _val | \ sed -e 's/^\(const \)_\(TC[GS]ET[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +if ! grep '^const TCGETS' ${OUT} >/dev/null 2>&1; then + if grep '^const _TCGETS_val' ${OUT} >/dev/null 2>&1; then + echo 'const TCGETS = _TCGETS_val' >> ${OUT} + fi +fi +if ! grep '^const TCSETS' ${OUT} >/dev/null 2>&1; then + if grep '^const _TCSETS_val' ${OUT} >/dev/null 2>&1; then + echo 'const TCSETS = _TCSETS_val' >> ${OUT} + fi +fi # ioctl constants. Might fall back to 0 if TIOCNXCL is missing, too, but # needs handling in syscalls.exec.go.