riscv64-unknown-linux-gnu-gcc -mabi=lp64 -pipe -g -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed ../sysdeps/unix/sysv/linux/riscv/vfork.S -c -U_FORTIFY_SOURCE -I../include -I/var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl/posix -I/var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl -I../sysdeps/unix/sysv/linux/riscv/rv64 -I../sysdeps/unix/sysv/linux/riscv -I../sysdeps/riscv/nptl -I../sysdeps/unix/sysv/linux/generic -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/riscv/rv64/rvd -I../sysdeps/riscv/rv64/rvf -I../sysdeps/riscv/rvf -I../sysdeps/riscv/rvd -I../sysdeps/riscv/rv64 -I../sysdeps/riscv -I../sysdeps/init_array -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/riscv64-unknown-linux-gnu/9.2.0/include -isystem /usr/lib/gcc/riscv64-unknown-linux-gnu/9.2.0/include-fixed -isystem /usr/include -D_LIBC_REENTRANT -include /var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DSHARED -DTOP_NAMESPACE=glibc -DASSEMBLER -g -Werror=undef -Wa,--noexecstack -Werror=undef -Wa,--noexecstack -fPIC -o /var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl/posix/vfork.os -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl/posix/vfork.os.dt -MT /var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl/posix/vfork.os /usr/include/linux/sched.h: Assembler messages: /usr/include/linux/sched.h:39: Error: unrecognized opcode `struct clone_args{' /usr/include/linux/sched.h:40: Error: unrecognized opcode `__aligned_u64 flags' /usr/include/linux/sched.h:41: Error: unrecognized opcode `__aligned_u64 pidfd' /usr/include/linux/sched.h:42: Error: unrecognized opcode `__aligned_u64 child_tid' /usr/include/linux/sched.h:43: Error: unrecognized opcode `__aligned_u64 parent_tid' /usr/include/linux/sched.h:44: Error: unrecognized opcode `__aligned_u64 exit_signal' /usr/include/linux/sched.h:45: Error: unrecognized opcode `__aligned_u64 stack' /usr/include/linux/sched.h:46: Error: unrecognized opcode `__aligned_u64 stack_size' /usr/include/linux/sched.h:47: Error: unrecognized opcode `__aligned_u64 tls' /usr/include/linux/sched.h:48: Error: junk at end of line, first unrecognized character is `}' make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl/sysd-rules:57: /var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl/posix/vfork.os] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.29-r5/work/glibc-2.29/posix' make[1]: *** [Makefile:259: posix/subdir_lib] Error 2 make[1]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.29-r5/work/glibc-2.29' make: *** [Makefile:9: all] Error 2 make: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.29-r5/work/build-lp64-riscv64-unknown-linux-gnu-nptl' emerge info: Portage 2.3.76 (python 3.7.4-final-0, default/linux/riscv/17.0/rv64gc, gcc-9.2.0, glibc-2.29-r2, 5.2.9 riscv64) ================================================================= System Settings ================================================================= System uname: Linux-5.2.9-riscv64-with-gentoo-2.6 KiB Mem: 8185184 total, 4524788 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sat, 05 Oct 2019 05:00:01 +0000 Head commit of repository gentoo: a7ecd6dc1e8ad67990852784643b26482935b9eb sh bash 5.0_p11 ld GNU ld (Gentoo 2.32 p2) 2.32.0 app-shells/bash: 5.0_p11::gentoo dev-lang/perl: 5.30.0::gentoo dev-lang/python: 3.7.4-r1::gentoo dev-util/cmake: 3.15.4::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.17::gentoo sys-devel/autoconf: 2.69-r4::gentoo sys-devel/automake: 1.16.1-r1::gentoo sys-devel/binutils: 2.32-r1::gentoo sys-devel/gcc: 9.1.0-r1::gentoo, 9.2.0-r1::gentoo sys-devel/gcc-config: 2.1::gentoo sys-devel/libtool: 2.4.6-r5::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: ACCEPT_KEYWORDS="riscv ~riscv" ACCEPT_LICENSE="@FREE" CBUILD="riscv64-unknown-linux-gnu" CFLAGS="-O0 -pipe -g" CHOST="riscv64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O0 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--nospinner --jobs=1 --fail-clean=n --misspell-suggestions=n --oneshot" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O0 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O0 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="acl berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 logrotate multilib ncurses nls nptl openmp pam pcre readline riscv split-usr ssl tcpd unicode xattr zlib" ABI_RISCV="lp64d" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 593670 [details] build.log, compressed due to size
If I get this correctly, 'posix/vfork.c' is pulling the arch dependent 'sysdeps/unix/sysv/linux/riscv/vfork.S', which then feeds this to the assembler. vfork.S has a '#include <linux/sched.h>' directive. Per commit https://github.com/torvalds/linux/commit/7f192e3cd316ba58c88dfa26796cf77789dd9872, there is a new struct defined to support clone3() in linux v5.3. Since struct definitions are not proper assembler directives, I believe this is the source of the problem.
Should be fixed in sys-libs/glibc-2.29-r6 with https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8f2c70c47446347c9a9e382c4015be3736e4dc3 It pull in upstream fix into 2.29 and 2.30 gentoo glibc branches.