From patchwork Mon Nov 6 15:36:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svante Signell X-Patchwork-Id: 834792 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-466034-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="o6/HnmDD"; dkim-atps=neutral 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 3yVxVz1pdmz9s7p for ; Tue, 7 Nov 2017 02:36:42 +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:subject:from:reply-to:to:cc:date:content-type :mime-version; q=dns; s=default; b=gl/XzhQN2x4ZpmvaRvMLf5rO56SQi By8I+S6GR+J7I9YwZt92T8tRjTtsMgnVdUlWkYMV7NwHLVzox39DGaJG8AkC7MkT S7oxHFUKIzbQDQnmsWln5TMNST+PMSY/5+V7oWPHQTZYw18B9UaOl+yJpgYlgeAR GDzNgBYLt7Ysmk= 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:subject:from:reply-to:to:cc:date:content-type :mime-version; s=default; bh=C88vyOPHmKse88+GlSaEyKOI8wo=; b=o6/ HnmDDj7YHsfClNZYJlvq39SDISc740jwtKQ8T2WgwPAAmeO6aPqV2KcLVpcqjKR4 yqPvWKOfR0shn+GQaRT5te7/rV0o8XrsVgfqBETiAHqUyHzogu3yLuCy5QccxMB9 WAlCuejcs/FqncI+AzNQANMelLu7Jgrxk7aJxmKc= Received: (qmail 17569 invoked by alias); 6 Nov 2017 15:36:33 -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 17557 invoked by uid 89); 6 Nov 2017 15:36:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*debian.org, steal, furthermore X-HELO: mail-lf0-f50.google.com Received: from mail-lf0-f50.google.com (HELO mail-lf0-f50.google.com) (209.85.215.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Nov 2017 15:36:30 +0000 Received: by mail-lf0-f50.google.com with SMTP id k40so10959855lfi.4 for ; Mon, 06 Nov 2017 07:36:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:reply-to:to:cc:date :organization:mime-version; bh=h3gGAUud9usduF5EUoRgRFmTo5TQlar2SeyQeyOFvns=; b=bK7ky9L5W1D6iY4OccvT9sqa1Ggwl6OvrYeR2HcopCychCt/2dSZG+fUs2cmd1wL9T 1b+HXLDidFGt24KTCgE/XhQ97Y8DiVGTiUidFtCgYSfwOqdmP+p4E71e5NKgz+2cGI7C zore9tXXVxKoPTL5Sn4b02RDqly9KSJVD0te9xD5ivotEe5TEfxVTvrGoqhpp/3+I193 fV7M9dcYUDCJ7V8lgmg5ISdttxY55G0sF8cI+q1RqNfhP4Bn9VTcB5cHSv0C9e5IHQCA 3tn5tZvl88mIvlXnsIqJY8o+XjYN50mNRuxLwSWZ1YqEg/vkmjzGRp5iXNLjeLNyEEb7 nMLA== X-Gm-Message-State: AJaThX7XgJjAGZ+VzPfX8cC8+Bqsq3XNZWoHSojcDbaAqgSe8flX2mp/ ZvtcYnHueiYSb1Rob+RTykHoOA== X-Google-Smtp-Source: ABhQp+Sz7gwnrvXR+w38IR+IszxaikDOg6NWdJrI5aCzmripKce2HrimFRKgkUCw8T+/O4dJtNT09w== X-Received: by 10.25.195.88 with SMTP id t85mr5590347lff.214.1509982588146; Mon, 06 Nov 2017 07:36:28 -0800 (PST) Received: from G3620.lan ([178.78.231.178]) by smtp.gmail.com with ESMTPSA id 34sm2448185lfr.25.2017.11.06.07.36.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2017 07:36:27 -0800 (PST) Message-ID: <1509982599.28464.30.camel@gmail.com> Subject: Hurd port for gcc-7 go PATCH 1-3(15) From: Svante Signell Reply-To: svante.signell@gmail.com To: bug-hurd Cc: gcc-patches , Debian GCC Maintainers Date: Mon, 06 Nov 2017 16:36:39 +0100 Mime-Version: 1.0 Hi, Attached are patches to enable gccgo to build properly on Debian GNU/Hurd on gcc-7 (7-7.2.0-12). The first two patches are Debian-specific: Enable build of gccgo for GNU/Hurd: * debian_rules.defs.diff Define patches for the generated series file: * debian_rules.patch.diff The third enables split-stack support: * src_gcc_config_i386_gnu.h.diff The test suite results are as follows: === go Summary === # of expected passes 7359 # of unexpected failures 13 # of expected failures 1 # of untested testcases 7 # of unsupported tests 2 === libgo Summary === # of expected passes 119 # of unexpected failures 26 Most failing go tests and more than half of the libgo tests are runtime errors probably due to exception handling not working as expected, stopping execution with SIGSEGV. These issues are also present in the gcc-6 port (where libgo is implemented with more C code) and might be due to issues in gnumach/hurd/glibc yet to be solved. Another large group of tests, mainly in libgo, fails with SIGILL. The reason for these failures are also currently unknown. Maybe it is still some more things to address with the port, but the cause can also be due to the above. Unfortunately gdb and rpctrace are not especially usable, the former due to hangs, and the second due to bugs?? in multi-thread support. Another issue is that /proc/self/exe has to return an absolute path for the built program go-7 to execute properly. This is solved by a pending patch for glibc in Debian and will be available in the next upload of glibc-2.24. Adding to this, the executable ./build/gotools/go does work displaying the help text, but e.g. ./build/gotools/go env exits with a SIGILL: Illegal instruction. Furthermore, since more code is written in go the previous routine src/libgo/rutime/netpoll_select.c has to be rewritten in go. The supplied file src/libgo/go/runtime/netpoll_gnu.go is merely a stub for now and has to be implemented using either select or poll since neither epoll or kqueue or exists in GNU/Hurd. Nevertheless, it seems like not so much is left for gccgo working properly on GNU/Hurd, as for gcc-6. However, since I'm currently stuck, having spent a lot of time debugging, it is time to hand over to more people taking a look at this port. More detailed information on specific issues will be supplied on request. Thanks! Index: gcc-7-7.2.0-12.1/src/gcc/config/i386/gnu.h =================================================================== --- gcc-7-7.2.0-12.1.orig/src/gcc/config/i386/gnu.h +++ gcc-7-7.2.0-12.1/src/gcc/config/i386/gnu.h @@ -37,11 +37,14 @@ along with GCC. If not, see