On Sat, 2019-02-09 at 23:57 +0100, Svante Signell wrote: > On Sat, 2019-02-09 at 14:40 -0800, Ian Lance Taylor wrote: > > On Fri, Feb 8, 2019 at 3:07 PM Matthias Klose <d...@debian.org> wrote: > > > On 07.02.19 06:04, Ian Lance Taylor wrote: > > What are the lines before that in the log? For some reason libtool is > > being invoke with no source files. The lines before the failing line > > should show an invocation of match.sh that determines the source > > files. > > Thanks for your job upstreaming the patches! > > I've found some problems. Current problem is with the mksysinfo.sh patch. But > there are some other things missing. New patches will be submitted tomorrow.
Attached are three additional patches needed to build libgo on GNU/Hurd: src_libgo_mksysinfo.sh.diff src_libgo_go_syscall_wait.c.diff src_libgo_testsuite_gotest.diff For the first patch, src_libgo_mksysinfo.sh.diff, I had to go back to the old version, using sed -i -e. As written now ${fsid_to_dev} expands to fsid_to_dev='-e '\''s/st_fsid/Dev/'\''' resulting in: "sed: -e expression #4, char 1: unknown command: `''". Unfortunately, I have not yet been able to modify the expansion omitting the single qoutes around the shell variable. The second patch, src_libgo_go_syscall_wait.c.diff, is needed since WCONTINUED is not defined and is needed for WIFCONTINUED to be defined in wait.h. The third patch, src_libgo_testsuite_gotest.diff, is not strictly needed, but running the tests the annoying text is displayed: "ps: comm: Unknown format spec" Thanks!
Index: gcc-9-9-20190208/src/libgo/go/syscall/wait.c =================================================================== --- gcc-9-9-20190208.orig/src/libgo/go/syscall/wait.c +++ gcc-9-9-20190208/src/libgo/go/syscall/wait.c @@ -8,6 +8,13 @@ OS-independent. */ #include <stdint.h> + +/* WCONTINUED is not defined on GNU/Hurd */ +#ifdef __GNU__ +#ifndef WCONTINUED +#define WCONTINUED 0 +#endif +#endif #include <sys/wait.h> #include "runtime.h"
Index: gcc-9-9-20190208/src/libgo/mksysinfo.sh =================================================================== --- gcc-9-9-20190208.orig/src/libgo/mksysinfo.sh +++ gcc-9-9-20190208/src/libgo/mksysinfo.sh @@ -486,9 +486,8 @@ grep '^type _st_timespec ' gen-sysinfo.g # Special treatment of struct stat st_dev for GNU/Hurd # /usr/include/i386-gnu/bits/stat.h: #define st_dev st_fsid -fsid_to_dev= if grep 'define st_dev st_fsid' gen-sysinfo.go > /dev/null 2>&1; then - fsid_to_dev="-e 's/st_fsid/Dev/'" + sed -i -e 's/; st_fsid/; st_dev/' gen-sysinfo.go fi # The stat type. @@ -501,7 +500,6 @@ else fi | sed -e 's/type _stat64/type Stat_t/' \ -e 's/type _stat/type Stat_t/' \ -e 's/st_dev/Dev/' \ - ${fsid_to_dev} \ -e 's/st_ino/Ino/g' \ -e 's/st_nlink/Nlink/' \ -e 's/st_mode/Mode/' \
libgo/ChangeLog 2018-10-20 Svante Signell <svante.sign...@gmail.com> * libgo/testsuite/gotest: Remove ps -o comm option for GNU/Hurd. Index: gcc-9-9-20190208/src/libgo/testsuite/gotest =================================================================== --- gcc-9-9-20190208.orig/src/libgo/testsuite/gotest +++ gcc-9-9-20190208/src/libgo/testsuite/gotest @@ -650,7 +650,11 @@ xno) wait $pid status=$? if ! test -f gotest-timeout; then - sleeppid=`ps -o pid,ppid,comm | grep " $alarmpid " | grep sleep | sed -e 's/ *\([0-9]*\) .*$/\1/'` + if test "$goos" = "hurd"; then + sleeppid=`ps -o pid,ppid | grep " $alarmpid " | grep sleep | sed -e 's/ *\([0-9]*\) .*$/\1/'` + else + sleeppid=`ps -o pid,ppid,comm | grep " $alarmpid " | grep sleep | sed -e 's/ *\([0-9]*\) .*$/\1/'` + fi kill $alarmpid wait $alarmpid if test "$sleeppid" != ""; then