Date: Tue, 21 Jul 2020 01:51:41 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD ports <freebsd-ports@freebsd.org> Subject: Re: Why lang/gcc9 depends native-binutils ? Message-ID: <6B21B9C0-62D5-4ED7-94EE-7715B002F160@yahoo.com> References: <6B21B9C0-62D5-4ED7-94EE-7715B002F160.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
KIRIYAMA Kazuhiko kiri at truefc.org wrote on Tue Jul 21 02:33:25 UTC 2020 : > checking for iconv declaration...=20 > extern size_t iconv (iconv_t cd, char * *inbuf, size_t = *inbytesleft, char * *outbuf, size_t *outbytesleft); > *** BFD does not support target native-unknown-freebsd13.0. > *** Look in bfd/config.bfd for supported targets. > gmake[3]: *** [Makefile:3563: configure-binutils] Error 1 > gmake[3]: Leaving directory = '/var/ports/work/usr/ports/devel/binutils/work-native/binutils-2.33.1' > gmake[2]: *** [Makefile:851: all] Error 2 > gmake[2]: Leaving directory = '/var/ports/work/usr/ports/devel/binutils/work-native/binutils-2.33.1' > =3D=3D=3D> Compilation failed unexpectedly. > Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the = failure to > the maintainer. > *** Error code 1 lang/gcc9/Makefile references binutils via: BUILD_DEPENDS+=3D ${LOCALBASE}/bin/as:devel/binutils RUN_DEPENDS+=3D ${LOCALBASE}/bin/as:devel/binutils . . . USE_BINUTILS=3D yes The BUILD_DEPENDS and RUN_DEPENDS references to binutils are to the assembler that binutils generates and installs. So gcc9 needs to be able to use that assembler at both gcc9 build-time and gcc9 run-time. The notation leaves the FLAVOR implicit/empty and so should lead to devel/binutils/Makefile using its line: FLAVOR?=3D native to assign the "native" for its own internal logic to use. Hmm. The "target native-unknown-freebsd13.0" looks very odd to me. The only lines in the devel/binutils Makefile to deal with "unknown-" text directly are: # grep -r unknown- /usr/ports/devel/binutils/ /usr/ports/devel/binutils/Makefile:BUTARGET?=3D = ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL} /usr/ports/devel/binutils/Makefile:BUTARGET=3D = x86_64-unknown-${OPSYS:tl}${OSREL} (I'll later deal with an indirection where "_" is replaced by "-".) Only the 1st line of that pair would potentially form "native-unknown-" text. So looking at the context of the first line I find (". . ." for omitted lines): FLAVOR?=3D native . . . .if ${FLAVOR} !=3D native PKGNAMEPREFIX=3D ${FLAVOR:C/_/-/g}- PLIST=3D ${PKGDIR}/pkg-plist-${FLAVOR:C/_/-/g} .if ${PKGNAMEPREFIX:M*-*-} BUTARGET?=3D ${PKGNAMEPREFIX}${OPSYS:tl}${OSREL} .else BUTARGET?=3D ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL} .endif . . . CONFIGURE_ARGS+=3D --disable-shared \ --target=3D${BUTARGET} .endif (That is also the only instance of "--target=3D" in the Makefile.) The ${FLAVOR} !=3D native test should mean that the code is not used for FLAVOR being exactly "native". There is a separate code block for: .if ${FLAVOR} =3D=3D native BUREMOVE=3D coffdump \ dlltool \ dllwrap \ nlmconv \ srconv \ sysdump \ windmc \ windres USES+=3D localbase CONFIGURE_ARGS+=3D --with-system-zlib \ --with-gmp=3D${LOCALBASE} \ --with-mpfr=3D${LOCALBASE} \ --enable-targets=3Dall \ --enable-threads=3Dyes INFO=3D as \ binutils \ gprof \ bfd \ ld .endif But that code does not specify a specific target (instead: "--enable-targets=3Dall"). There is the FLAVOR value "riscv32_unknown_elf" that could produce target "riscv32-unknown-elf-freebsd13.0" but that is not what was reported as involved. I've ignored CROSS_TOOLCHAIN infrastructure as it was not mentioned as being in use. I do not see how devel/binutils/Makefile would generate "native-unknown-freebsd13.0" text on its own. Sorry I've not been able to identify anything for the error. I'll note that I build ports with poudriere (-devel variant) and have not had the problem in that context. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6B21B9C0-62D5-4ED7-94EE-7715B002F160>