lang/gcc6 (as of /usr/ports -r416711) does not build on 11.0 -r301815 on an rpi2 [armv7-a, cortex-a7]: a.out uses VFP register arguments, . . . does not

Mark Millard markmi at dsl-only.net
Mon Jun 13 05:13:25 UTC 2016


On 2016-Jun-12, at 5:43 PM, Mark Millard <markmi at dsl-only.net> wrote:

> Just a quick top-posted note: lang/gcc5 (as of /usr/ports -r416711) built fine, unlike the lang/gcc6 noted before/below. [I happened to try lang/gcc5 with the bootstrap configuration item disabled.]
> 
> I may try lang/gcc6-devel to see what it does.

lang/gcc6-devel (as of /usr/ports -r416711) also built fine on the rpi2. [The test was with the bootstrap configuration item disabled.] Only lang/gcc6 seems to have the reported problems for the rpi2. But I've not tried lang/gcc49 or before. Nor have I tried any devel/*gcc* examples.

The rest of the below material just repeats the original evidence of the lang/gcc6 problem. Continue reading only if you care for that detail now.

> 
> ===
> Mark Millard
> markmi at dsl-only.net
> 
> On 2016-Jun-12, at 3:02 PM, Mark Millard <markmi at dsl-only.net> wrote:
> 
>> On an rpi2:
>> 
>>> # uname -apKU
>>> FreeBSD rpi2 11.0-ALPHA3 FreeBSD 11.0-ALPHA3 #0 r301815M: Sat Jun 11 23:43:48 PDT 2016     markmi at FreeBSDx64:/usr/obj/clang/arm.armv6/usr/src/sys/RPI2-NODBG  ar
>>> m armv6 1100116 1100116
>> 
>> 
>> with /usr/ports at -r416711. . .
>> 
>> 
>> For attempting to build lang/gcc6 with the bootstrap configuration item enabled:
>> 
>>> configure:3735: /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-por
>>> tbld-freebsd11.0/bin/ -B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem /usr/local/armv6-portbld-freebsd11.0/include -isystem /usr/local/armv6-portbld-freebs
>>> d11.0/sys-include    -O2 -pipe -mcpu=cortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing   conftest.c  >&5
>>> /usr/local/bin/ld: error: a.out uses VFP register arguments, /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtbegin.o does not
>>> /usr/local/bin/ld: failed to merge target specific data of file /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtbegin.o
>>> /usr/local/bin/ld: error: a.out uses VFP register arguments, /tmp/ccC38Tl3.o does not
>>> /usr/local/bin/ld: failed to merge target specific data of file /tmp/ccC38Tl3.o
>>> /usr/local/bin/ld: error: a.out uses VFP register arguments, /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtend.o does not
>>> /usr/local/bin/ld: failed to merge target specific data of file /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtend.o
>>> collect2: error: ld returned 1 exit status
>>> configure:3739: $? = 1
>>> configure:3776: result: 
>>> configure: failed program was:
>>> | /* confdefs.h */
>>> | #define PACKAGE_NAME "GNU Offloading and Multi Processing Runtime Library"
>>> | #define PACKAGE_TARNAME "libgomp"
>>> | #define PACKAGE_VERSION "1.0"
>>> | #define PACKAGE_STRING "GNU Offloading and Multi Processing Runtime Library 1.0"
>>> | #define PACKAGE_BUGREPORT ""
>>> | #define PACKAGE_URL "http://www.gnu.org/software/libgomp/"
>>> | #define PACKAGE "libgomp"
>>> | #define VERSION "1.0"
>>> | /* end confdefs.h.  */
>>> | 
>>> | int
>>> | main ()
>>> | {
>>> | 
>>> |   ;
>>> |   return 0;
>>> | }
>>> configure:3782: error: in `/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-portbld-freebsd11.0/libgomp':
>>> configure:3786: error: C compiler cannot create executables
>> 
>> 
>> 
>> For attempting to build lang/gcc6 with the bootstrap configuraiton item disabled similar ld reports are generated:
>> 
>>> /usr/local/bin/ld: error: a.out uses VFP register arguments, /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtbegin.o does not
>>> /usr/local/bin/ld: failed to merge target specific data of file /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtbegin.o
>>> /usr/local/bin/ld: error: a.out uses VFP register arguments, /tmp/cco9nucg.o does not
>>> /usr/local/bin/ld: failed to merge target specific data of file /tmp/cco9nucg.o
>>> /usr/local/bin/ld: error: a.out uses VFP register arguments, /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtend.o does not
>>> /usr/local/bin/ld: failed to merge target specific data of file /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/crtend.o
>>> collect2: error: ld returned 1 exit status
>>> configure:3003: $? = 1
>>> configure:3040: result: 
>>> configure: failed program was:
>>> | /* confdefs.h */
>>> | #define PACKAGE_NAME "package-unused"
>>> | #define PACKAGE_TARNAME "libbacktrace"
>>> | #define PACKAGE_VERSION "version-unused"
>>> | #define PACKAGE_STRING "package-unused version-unused"
>>> | #define PACKAGE_BUGREPORT ""
>>> | #define PACKAGE_URL ""
>>> | /* end confdefs.h.  */
>>> | 
>>> | int
>>> | main ()
>>> | {
>>> | 
>>> |   ;
>>> |   return 0;
>>> | }
>>> configure:3046: error: in `/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-portbld-freebsd11.0/libbacktrace':
>>> configure:3050: error: C compiler cannot create executables
>> 
>> 
>> Context details. . .
>> 
>> As for the in-use make.conf (not the one used for the system build):
>> 
>>> # more /etc/make.conf
>>> DEFAULT_VERSIONS+=perl5=5.22
>>> WRKDIRPREFIX=/usr/obj/portswork
>>> WITH_DEBUG=
>>> WITH_DEBUG_FILES=
>>> MALLOC_PRODUCTION=
>>> #
>>> #system clang 3.8 (gcc6 rejects -march=armv7a):
>>> #CFLAGS+= -march=armv7-a -mcpu=cortex-a7
>>> #CXXFLAGS+= -march=armv7-a -mcpu=cortex-a7
>>> #CPPFLAGS+= -march=armv7-a -mcpu=cortex-a7
>>> #
>>> #lang/gcc6's xgcc stage considers the above conflicting so use just:
>>> CFLAGS+= -mcpu=cortex-a7
>>> CXXFLAGS+= -mcpu=cortex-a7
>>> CPPFLAGS+= -mcpu=cortex-a7
>> 
>> 
>> The armv6 11.0 -r301815 system was cross built from amd64, built using src.conf:
>> 
>>> # more ~/src.configs/src.conf.rpi2-clang-bootstrap.amd64-host 
>>> TO_TYPE=armv6
>>> #
>>> KERNCONF=RPI2-NODBG
>>> TARGET=arm
>>> .if ${.MAKE.LEVEL} == 0
>>> TARGET_ARCH=${TO_TYPE}
>>> .export TARGET_ARCH
>>> .endif
>>> #
>>> WITH_CROSS_COMPILER=
>>> WITHOUT_SYSTEM_COMPILER=
>>> #
>>> #CPUTYPE=soft
>>> WITH_LIBSOFT=
>>> WITH_LIBCPLUSPLUS=
>>> WITH_BINUTILS_BOOTSTRAP=
>>> WITH_CLANG_BOOTSTRAP=
>>> WITH_CLANG=
>>> WITH_CLANG_IS_CC=
>>> WITH_CLANG_FULL=
>>> WITH_CLANG_EXTRAS=
>>> WITH_LLDB=
>>> #
>>> WITH_BOOT=
>>> WITHOUT_LIB32=
>>> #
>>> WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=
>>> WITHOUT_GCC_BOOTSTRAP=
>>> WITHOUT_GCC=
>>> WITHOUT_GCC_IS_CC=
>>> WITHOUT_GNUCXX=
>>> #
>>> NO_WERROR=
>>> #WERROR=
>>> MALLOC_PRODUCTION=
>>> #
>>> WITH_DEBUG_FILES=
>>> #
>>> XCFLAGS+= -march=armv7-a -mcpu=cortex-a7
>>> XCXXFLAGS+= -march=armv7-a -mcpu=cortex-a7
>>> # There is no XCPPFLAGS but XCPP ets XCFLAGS content.
>> 
>> and with the make.conf for the system build being empty:
>> 
>>> # more ~/src.configs/make.conf 
>>> #
>> 
>> 
>> ===
>> Mark Millard
>> markmi at dsl-only.net



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



More information about the freebsd-toolchain mailing list