Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2016 14:32:08 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   stable/11 -r307797 on BPi-M3 (cortex-a7): xgcc's cc1 during lang/gcc6 build gets SIGSYS failures (/usr/ports -r424540)
Message-ID:  <5340B95D-9B61-4D97-A28E-EB463C28C949@dsl-only.net>

next in thread | raw e-mail | index | archive | help
[I'll be submitting some of the below information to bugzilla.]

While trying to build lang/gcc6 on a BPI-M3 (Cortex-A7, ALLWINNER) I got =
"xgcc: internal compiler error: Bad system call (program cc1)", which =
means a SIGSYS (signal 12) resulted.

[I will note that I'v never seen this issue (so far) on the rpi2: This =
may be KERNCONF=3DALLWINNER specific. But I've not yet updated to =
-r307797 on the rpi2. The BPI-M3 context is new for me; the rpi2 I've =
been using for a long time.]

This was under/on:

root@bananapi-m3:/usr/ports # uname -apKU
FreeBSD bananapi-m3 11.0-STABLE FreeBSD 11.0-STABLE #0 r307797M: Mon Oct =
24 00:41:16 PDT 2016     =
markmi@FreeBSDx64:/usr/local/src/crochet/work/obj/arm.armv6/usr/src/sys/AL=
LWINNER  arm armv6 1100505 1100505

[Note this was cross-built and then a matching svnlite co was done on =
the BPi-M3. So the source timestamps on the BPi-M3 are newer than the =
times from the cross build.]

root@bananapi-m3:/usr/ports # svnlite info /usr/ports/ | grep "Re[lv]"
Relative URL: ^/head
Revision: 424540
Last Changed Rev: 424540

dmesg | tail shows:

pid 29581 (cc1), uid 0: exited on signal 12 (core dumped)
pid 29613 (cc1), uid 0: exited on signal 12 (core dumped)
pid 29622 (cc1), uid 0: exited on signal 12 (core dumped)
pid 29651 (cc1), uid 0: exited on signal 12 (core dumped)
pid 29660 (cc1), uid 0: exited on signal 12 (core dumped)
pid 29798 (cc1), uid 0: exited on signal 12 (core dumped)
pid 30422 (cc1), uid 0: exited on signal 12 (core dumped)
pid 30426 (cc1), uid 0: exited on signal 12 (core dumped)
pid 30428 (cc1), uid 0: exited on signal 12 (core dumped)
pid 30431 (cc1), uid 0: exited on signal 12 (core dumped)

(All the lang/gcc6 prerequisites built okay on the BPi-M3.)

Unfortunately direct execution of the cc1 command on the libgcc2.i from =
a use of -save-temps does not fail. For some reason the failure is only =
when xgcc causes the cc1 command execution.

Also unfortunately truss gets a segmentation fault of its own trying the =
handle watching the SIGSYS related activity. (A truss bugzilla report =
has been made.) Thus the following tail of the truss output for leading =
up to the SIGSYS does not cover the SIGSYS related activity itself:

=
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # tail truss.log
31183 100086: close(3)				 =3D 0 (0x0)
31183 100086: =
openat(AT_FDCWD,"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/lib=
gcc/longlong.h",O_NOCTTY,00) ERR#2 'No such file or directory'
31183 100086: openat(AT_FDCWD,"./longlong.h",O_NOCTTY,00) ERR#2 'No such =
file or directory'
31183 100086: openat(AT_FDCWD,"../.././gcc/longlong.h",O_NOCTTY,00) =
ERR#2 'No such file or directory'
31183 100086: =
openat(AT_FDCWD,"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/lib=
gcc/../gcc/longlong.h",O_NOCTTY,00) ERR#2 'No such file or directory'
31183 100086: =
openat(AT_FDCWD,"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/lib=
gcc/../include/longlong.h",O_NOCTTY,00) =3D 3 (0x3)
31183 100086: fstat(3,{ mode=3D-rw-r--r-- =
,inode=3D573594,size=3D61185,blksize=3D32768 }) =3D 0 (0x0)
31183 100086: read(3,"/* longlong.h -- definitions for"...,61185) =3D =
61185 (0xef01)
31183 100086: close(3)				 =3D 0 (0x0)
31183 100086: =
mmap(0x0,16384,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,16384,0x100000000=
)

Via using gdb on truss [with truss running xgcc and xgcc in turn running =
its cc1 instance]:

=
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # gdb truss
. . . [the below is in enter_syscall] . . .
380		t->cs.name =3D sysdecode_syscallname(t->proc->abi->abi, =
t->cs.number);
381		if (t->cs.name =3D=3D NULL)
(gdb)=20
382			fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d =
--\n",
383			    t->proc->abi->type, t->cs.number);
384=09
385		sc =3D get_syscall(t->cs.name, narg);
386		t->cs.nargs =3D sc->nargs;
387		assert(sc->nargs <=3D nitems(t->cs.s_args));
388=09
389		t->cs.sc =3D sc;

(t->cs.name =3D=3D NULL after line 380). . .

Looking at the two things that the fprintf on lines 382 and 383 would =
report:

(gdb) print t->proc->abi->type
$4 =3D 0x10166 "FreeBSD ELF32"

(gdb) print t->cs.number
$5 =3D 580828064

FYI: 580828064 =3D 0x229EBBA0

(sc =3D=3D NULL results from line 385 so sc->nargs on line 386 gets a =
SIGSEGV.)

Just for completness:

(gdb) print *t
$2 =3D {entries =3D {le_next =3D 0x0, le_prev =3D 0x20617070}, proc =3D =
0x20617060, tid =3D 100150, in_syscall =3D 1, cs =3D {sc =3D 0x0, name =3D=
 0x0, number =3D 580828064, args =3D 0x2061b0c0, nargs =3D 0,=20
   s_args =3D 0x2061b0ec}, before =3D {tv_sec =3D 1477418265, tv_nsec =3D =
492342263}, after =3D {tv_sec =3D 1477418265, tv_nsec =3D 492496630}}

(gdb) print sc
$3 =3D (struct syscall *) 0x0



Supporting details follow. . .

The specific error reports are:

xgcc: internal compiler error: Bad system call (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html>; for instructions.
gmake[5]: *** [Makefile:467: _muldi3.o] Error 4
gmake[5]: *** Waiting for unfinished jobs....

xgcc: internal compiler error: Bad system call (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html>; for instructions.
gmake[5]: *** [Makefile:467: _negdi2.o] Error 4

xgcc: internal compiler error: Bad system call (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html>; for instructions.
gmake[5]: *** [Makefile:467: _cmpdi2.o] Error 4

xgcc: internal compiler error: Bad system call (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html>; for instructions.
gmake[5]: *** [Makefile:467: _ucmpdi2.o] Error 4

gmake[5]: Leaving directory =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-portbld-freebsd1=
1.0/libgcc'
gmake[4]: *** [Makefile:14874: all-stage1-target-libgcc] Error 2

The specific xgcc commands were:

/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep =
-DL_muldi3 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS

/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _negdi2.o -MT _negdi2.o -MD -MP -MF _negdi2.dep =
-DL_negdi2 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS

/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _cmpdi2.o -MT _cmpdi2.o -MD -MP -MF _cmpdi2.dep =
-DL_cmpdi2 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS

/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _ucmpdi2.o -MT _ucmpdi2.o -MD -MP -MF _ucmpdi2.dep =
-DL_ucmpdi2 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS


Unfortunately gdb does not report much directly. . .

root@bananapi-m3:/usr/ports # gdb =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/cc1 =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-portbld-freebsd11=
.0/libgcc/cc1.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you =
are
welcome to change it and/or distribute copies of it under certain =
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for =
details.
This GDB was configured as "armv6-marcel-freebsd"...
Core was generated by =
`/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/cc1 -quiet -I =
. -I . -I'.
Program terminated with signal 12, Bad system call.
Reading symbols from /usr/local/lib/libmpc.so.3...done.
Loaded symbols for /usr/local/lib/libmpc.so.3
Reading symbols from /usr/local/lib/libmpfr.so.4...done.
Loaded symbols for /usr/local/lib/libmpfr.so.4
Reading symbols from /usr/local/lib/libgmp.so.10...done.
Loaded symbols for /usr/local/lib/libgmp.so.10
Reading symbols from /lib/libz.so.6...Reading symbols from =
/usr/lib/debug//lib/libz.so.6.debug...done.
done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/lib/libc++.so.1...Reading symbols from =
/usr/lib/debug//usr/lib/libc++.so.1.debug...done.
done.
Loaded symbols for /usr/lib/libc++.so.1
Reading symbols from /lib/libcxxrt.so.1...Reading symbols from =
/usr/lib/debug//lib/libcxxrt.so.1.debug...done.
done.
Loaded symbols for /lib/libcxxrt.so.1
Reading symbols from /lib/libm.so.5...Reading symbols from =
/usr/lib/debug//lib/libm.so.5.debug...done.
done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgcc_s.so.1...Reading symbols from =
/usr/lib/debug//lib/libgcc_s.so.1.debug...done.
done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.7...Reading symbols from =
/usr/lib/debug//lib/libc.so.7.debug...done.
done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...Reading symbols from =
/usr/lib/debug//libexec/ld-elf.so.1.debug...done.
done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0xbfbf732c in ?? ()
(gdb) bt
#0  0xbfbf732c in ?? ()
Cannot access memory at address 0x0
(gdb) info reg
r0             0x4e	78
r1             0x0	0
r2             0x17c8506	24937734
r3             0x65	101
r4             0xbfbf7488	-1077971832
r5             0xbfbf7484	-1077971836
r6             0xbfbf7488	-1077971832
r7             0x229eab40	580823872
r8             0x0	0
r9             0xbfbfa23c	-1077960132
r10            0xbfbf7484	-1077971836
r11            0x0	0
r12            0x17ef3b1	25097137
sp             0xbfbf7180	-1077972608
lr             0x65	101
pc             0xbfbf732c	-1077972180
fps            0x0	0
cpsr           0xa0000010	-1610612720


Using -v -save-temps on one of the failing xgcc command lines gives:

=
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep =
-DL_muldi3 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS -v -save-temps
xgcc: warning: -pipe ignored because -save-temps specified
Reading specs from =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/specs
=
COLLECT_GCC=3D/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgc=
c
Target: armv6-portbld-freebsd11.0
Configured with: =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/configure =
--disable-multilib --with-build-config=3Dbootstrap-debug --disable-nls =
--enable-gnu-indirect-function --libdir=3D/usr/local/lib/gcc6 =
--libexecdir=3D/usr/local/libexec/gcc6 --program-suffix=3D6 =
--with-as=3D/usr/local/bin/as --with-gmp=3D/usr/local =
--with-gxx-include-dir=3D/usr/local/lib/gcc6/include/c++/ =
--with-ld=3D/usr/local/bin/ld --with-pkgversion=3D'FreeBSD Ports =
Collection' --with-system-zlib --disable-libgcj =
--enable-languages=3Dc,c++,objc,fortran --prefix=3D/usr/local =
--localstatedir=3D/var --mandir=3D/usr/local/man =
--infodir=3D/usr/local/info/gcc6 --build=3Darmv6-portbld-freebsd11.0
Thread model: posix
gcc version 6.2.0 (FreeBSD Ports Collection)=20
COLLECT_GCC_OPTIONS=3D'-B' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/bin/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/lib/' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/include' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/sys-include' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-O2' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-fno-strict-aliasing' =
'-D' 'IN_GCC' '-Wextra' '-Wall' '-Wno-narrowing' '-Wwrite-strings' =
'-Wcast-qual' '-Wformat=3D0' '-Wstrict-prototypes' =
'-Wmissing-prototypes' '-Wold-style-definition' '-isystem' './include' =
'-pthread' '-g' '-D' 'IN_LIBGCC2' '-fbuilding-libgcc' =
'-fno-stack-protector' '-fPIC' '-pthread' '-fno-inline' =
'-fomit-frame-pointer' '-I' '.' '-I' '.' '-I' '../.././gcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/.' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc' =
'-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include' =
'-D' 'HAVE_CC_TLS' '-o' '_muldi3.o' '-MT' '_muldi3.o' '-MD' '-MP' '-MF' =
'_muldi3.dep' '-D' 'L_muldi3' '-c' '-fvisibility=3Dhidden' '-D' =
'HIDE_EXPORTS' '-v' '-save-temps' '-mtls-dialect=3Dgnu'
 /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/cc1 -E -quiet =
-v -I . -I . -I ../.././gcc -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
-iprefix =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/arm=
v6-portbld-freebsd11.0/6.2.0/ -isystem =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include =
-isystem =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include-fixed =
-MD _muldi3.d -MF _muldi3.dep -MP -MT _muldi3.o -D LIBICONV_PLUG -D =
LIBICONV_PLUG -D IN_GCC -D IN_LIBGCC2 -D HAVE_CC_TLS -D L_muldi3 -D =
HIDE_EXPORTS -isystem /usr/local/armv6-portbld-freebsd11.0/include =
-isystem /usr/local/armv6-portbld-freebsd11.0/sys-include -isystem =
./include =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-mcpu=3Dcortex-a7 -mcpu=3Dcortex-a7 -mtls-dialect=3Dgnu -Wextra -Wall =
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wformat=3D0 =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition =
-fno-strict-aliasing -fbuilding-libgcc -fno-stack-protector -fPIC =
-fno-inline -fomit-frame-pointer -fvisibility=3Dhidden -g -g -g =
-fworking-directory -O2 -O2 -O2 -fpch-preprocess -o libgcc2.i
ignoring nonexistent directory =
"/usr/local/armv6-portbld-freebsd11.0/include"
ignoring nonexistent directory =
"/usr/local/armv6-portbld-freebsd11.0/sys-include"
ignoring nonexistent directory "./include"
ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/ar=
mv6-portbld-freebsd11.0/6.2.0/include"
ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/ar=
mv6-portbld-freebsd11.0/6.2.0/include-fixed"
ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/ar=
mv6-portbld-freebsd11.0/6.2.0/../../../../../armv6-portbld-freebsd11.0/inc=
lude"
ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/..=
/../../lib/gcc6/gcc/armv6-portbld-freebsd11.0/6.2.0/include"
ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/..=
/../../lib/gcc6/gcc/armv6-portbld-freebsd11.0/6.2.0/include-fixed"
ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/..=
/../../lib/gcc6/gcc/armv6-portbld-freebsd11.0/6.2.0/../../../../../armv6-p=
ortbld-freebsd11.0/include"
ignoring duplicate directory "."
ignoring duplicate directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/."
#include "..." search starts here:
#include <...> search starts here:
 .
 ../.././gcc
 /usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc
 /usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc
 /usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include
 /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include
 /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include-fixed
 /usr/local/include
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS=3D'-B' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/bin/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/lib/' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/include' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/sys-include' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-O2' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-fno-strict-aliasing' =
'-D' 'IN_GCC' '-Wextra' '-Wall' '-Wno-narrowing' '-Wwrite-strings' =
'-Wcast-qual' '-Wformat=3D0' '-Wstrict-prototypes' =
'-Wmissing-prototypes' '-Wold-style-definition' '-isystem' './include' =
'-pthread' '-g' '-D' 'IN_LIBGCC2' '-fbuilding-libgcc' =
'-fno-stack-protector' '-fPIC' '-pthread' '-fno-inline' =
'-fomit-frame-pointer' '-I' '.' '-I' '.' '-I' '../.././gcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/.' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc' =
'-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include' =
'-D' 'HAVE_CC_TLS' '-o' '_muldi3.o' '-MT' '_muldi3.o' '-MD' '-MP' '-MF' =
'_muldi3.dep' '-D' 'L_muldi3' '-c' '-fvisibility=3Dhidden' '-D' =
'HIDE_EXPORTS' '-v' '-save-temps' '-mtls-dialect=3Dgnu'
 /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/cc1 =
-fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c -mcpu=3Dcortex-a7 =
-mcpu=3Dcortex-a7 -mtls-dialect=3Dgnu -auxbase-strip _muldi3.o -g -g -g =
-O2 -O2 -O2 -Wextra -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual =
-Wformat=3D0 -Wstrict-prototypes -Wmissing-prototypes =
-Wold-style-definition -version -fno-strict-aliasing -fbuilding-libgcc =
-fno-stack-protector -fPIC -fno-inline -fomit-frame-pointer =
-fvisibility=3Dhidden -o libgcc2.s
GNU C11 (FreeBSD Ports Collection) version 6.2.0 =
(armv6-portbld-freebsd11.0)
	compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 =
(tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, =
MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=3D30 --param =
ggc-min-heapsize=3D4096
GNU C11 (FreeBSD Ports Collection) version 6.2.0 =
(armv6-portbld-freebsd11.0)
	compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 =
(tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, =
MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=3D30 --param =
ggc-min-heapsize=3D4096
Compiler executable checksum: 8858bcab14af90339532fc36ec745f79
xgcc: internal compiler error: Bad system call (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html>; for instructions.

=
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # ls -lt | head
total 12712
-rw-------  1 root  wheel  12181504 Oct 25 16:57 cc1.core
-rw-r--r--  1 root  wheel         0 Oct 25 16:57 libgcc2.s
-rw-r--r--  1 root  wheel    108880 Oct 25 16:57 libgcc2.i
-rw-r--r--  1 root  wheel      7636 Oct 25 16:57 _muldi3.dep
-rw-r--r--  1 root  wheel       560 Oct 25 10:16 _ucmpdi2.o
-rw-r--r--  1 root  wheel       560 Oct 25 10:16 _cmpdi2.o
-rw-r--r--  1 root  wheel       560 Oct 25 10:16 _negdi2.o
-rw-r--r--  1 root  wheel       560 Oct 25 10:16 _muldi3.o
-rw-r--r--  1 root  wheel      1784 Oct 25 10:16 _dvmd_lnx_s.o

Unfortunately direct execution of the reported cc1 command on the =
libgcc2.i in question does not fail.

Attempting to run the xgcc command under truss got a segmentation fault =
in truss itself:

=
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # truss -faeH -o truss.log =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2 -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC -W =
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem =
./include -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
-DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep =
-DL_muldi3 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS
Segmentation fault (core dumped)

[There is a separate buzilla report about this truss failure.]

=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5340B95D-9B61-4D97-A28E-EB463C28C949>