From patchwork Fri Nov 10 23:07:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Svante Signell X-Patchwork-Id: 836966 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-466562-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="Fpf1hhO2"; 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 3yYbKZ4Ljhz9sRm for ; Sat, 11 Nov 2017 10:07:46 +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=oWWG2Y5ujx/E1TRG6gXT3TEKtAOlb X+8fGVc7BtvGOgQIeiTOICKfu3t861mnyEiZonLRRaygb3gHjQbBYSe8ogFBXxHx hFfSdX/7RfxtY/T6Fa5JH6/rwD1cPENAx2Vt9ZwmuJro8PUOzthIeo/ftufzZwIr vJhYGgACKbr2zg= 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=9/MpQi4XF4KBOvzzuHJAGfrd6J4=; b=Fpf 1hhO2NB/3bqJk4fuh2daSl8rsontRLCAHxdgk/lEQ5aXJxvRhM8+aidSD+O7dbRq l4hY5TFTPMB95ZnivtEtVm8ladFNRjQJRRWxDD3zMVKUm3LDuVamHYO5BU4SbnQL H9nL0rvfkTv2QrjrFRpIvxRJ5+3BghQpnvYOlb6k= Received: (qmail 51761 invoked by alias); 10 Nov 2017 23:07:39 -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 51743 invoked by uid 89); 10 Nov 2017 23:07:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hurd, hurd, gcc-ice-dump, gccicedump X-HELO: mail-lf0-f46.google.com Received: from mail-lf0-f46.google.com (HELO mail-lf0-f46.google.com) (209.85.215.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Nov 2017 23:07:37 +0000 Received: by mail-lf0-f46.google.com with SMTP id o66so4454479lfg.0 for ; Fri, 10 Nov 2017 15:07:36 -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=Uzes8V9kBpMF/Uk9c2Zndy1lVjT4uT+nTBHOjjx9uJU=; b=Vk8esXoiMbGtsBMFhdlEJvCsRAWU5v1WBjRUGyb3uO4C+V6qjFfl3IXGciw5Ee5AZP j7okhYkVfxGNh3dEf+9JKqUKIp5DBIB5+4hEk2w0YvwvDBsFn4KMJlyGl6NsNXr/bOCp LQAR3JwHJY+9GM59eiu3CmpJGSBxP+dq/maq0zfEEDpdd4MAkam1uFZpYf1+faztq9MA B3XJrZEQBIqu2fxQ+rnIwx+1LIyEb7ql/aOJKg1A/+ngISZy0kLkyU6T5SzC9LfaZUU/ GkSHAsfIX9Hg5TpVEPaZxPlV8juG0wprHEmApfW6DclyBFGk3XgWqREasnvzc0oxGZTx +h5g== X-Gm-Message-State: AJaThX7ILIiooh7WIHHwEXpAy1tzJWdIWE5JvcczBfMdsi/FdIR8LoHd cRWv4rmOFLHXo/QU240xycM= X-Google-Smtp-Source: AGs4zMbPi58Wbmwana29dLyV5UlDrubkEbsp4tgsWjl6D7wt1i/jijR8yd99hwfLrZNn8dcn4gs5ag== X-Received: by 10.46.2.197 with SMTP id y66mr682752lje.151.1510355254859; Fri, 10 Nov 2017 15:07:34 -0800 (PST) Received: from G3620.lan ([178.78.231.178]) by smtp.gmail.com with ESMTPSA id c73sm1857114lfc.58.2017.11.10.15.07.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Nov 2017 15:07:32 -0800 (PST) Message-ID: <1510355269.28464.41.camel@gmail.com> Subject: Hurd port for gcc-8 go PATCH 1-3(15) From: Svante Signell Reply-To: svante.signell@gmail.com To: bug-hurd Cc: gcc-patches , Debian GCC Maintainers Date: Sat, 11 Nov 2017 00:07:49 +0100 Mime-Version: 1.0 Hi, Attached are patches to enable gccgo to build properly on Debian GNU/Hurd on gcc-8 (8-8-20171108-1). 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 128 # of unexpected failures 27 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. I'm currently working on an implementation using poll(2). 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-8-8-20171108-1.1/src/gcc/config/i386/gnu.h =================================================================== --- gcc-8-8-20171108-1.1.orig/src/gcc/config/i386/gnu.h +++ gcc-8-8-20171108-1.1/src/gcc/config/i386/gnu.h @@ -37,11 +37,14 @@ along with GCC. If not, see