Removing objdump breaks GCC configure
Mark Millard
marklmi at yahoo.com
Thu Aug 2 19:04:54 UTC 2018
[I also ran into the issue for sysutils/u-boot-pine64 builds in
my context (WITHOUT_BINUTILS).]
On 2018-Aug-1, at 3:08 PM, Mark Millard <marklmi at yahoo.com> wrote:
> On 2018-Aug-1, at 1:29 PM, John Baldwin <jhb at FreeBSD.org> wrote:
>
>> On 7/29/18 9:02 PM, Mark Millard wrote:
>>>> It looks like configure uses objdump (without a path-prefix) for
>>>> export_sym_check :
>>>>
>>>> case "${host}" in
>>>> *-*-darwin*)
>>>> if test x$build = x$host; then
>>>> export_sym_check="nm${exeext} -g"
>>>> elif test x$host = x$target; then
>>>> export_sym_check="$gcc_cv_nm -g"
>>>> else
>>>> export_sym_check=
>>>> fi
>>>> ;;
>>>> *)
>>>> if test x$build = x$host; then
>>>> export_sym_check="objdump${exeext} -T"
>>>> elif test x$host = x$target; then
>>>> export_sym_check="$gcc_cv_objdump -T"
>>>> else
>>>> export_sym_check=
>>>> fi
>>>> ;;
>>>> esac
>>>>
>>>> Note that this would not be the objdump from devel/powerpc64-binutils
>>>> but one for amd64 (in my example) such as from devel/binutils or
>>>> devel/amd64-binutils for my context.
>>>>
>>>> Note the lack of any alternative to objdump use (for build matching host).
>>>
>>> # svnlite diff /usr/ports/devel/powerpc64-gcc/Makefile
>>> Index: /usr/ports/devel/powerpc64-gcc/Makefile
>>> ===================================================================
>>> --- /usr/ports/devel/powerpc64-gcc/Makefile (revision 475470)
>>> +++ /usr/ports/devel/powerpc64-gcc/Makefile (working copy)
>>> @@ -16,7 +16,8 @@
>>> LIB_DEPENDS= libgmp.so:math/gmp \
>>> libmpfr.so:math/mpfr \
>>> libmpc.so:math/mpc
>>> -BUILD_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils
>>> +BUILD_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils \
>>> + objdump:devel/binutils
>>> RUN_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils
>>>
>>> USES= gmake iconv libtool tar:xz makeinfo compiler
>>
>> Context trimmed a bit, subject changed, and I've added Ed to the cc as he's
>> the one who removed objdump. It seems that GCC at least has a hidden
>> dependency on objdump. Ed, were the lang/gcc* ports updated when objdump
>> was removed to list it as dependency for the plugin functionality? If not,
>> they might also need a similar fix.
>
> devel/<?>-gcc cross compiler builds:
> Cross builds required the builder's objdump and possibly the target's
> too (as well as other target binutils). But for the target that is the same
> <?> in devel/<?>-binutils and devel/<?>-gcc and likely was already
> covered.
>
> (I may have missed other builder-binutil tool references but know
> objdump for sure.)
>
> When the builder architecture is also the target as part of the
> port definition (all lang/gcc* ?), devel/binutils is likely already
> required and then covers all objdump use as far as I can tell.
>
> (I'm not sure if the normal package builders are omitting system
> binutils yet or if they might always have devel/binutils installed.)
>
>>> Note: Various other autoconfig .ac files for various ports
>>> might also make assumptions about some binutils for the
>>> building archteiture, assumptions that various FreeBSD
>>> architectures need not automatically provide for: ones for
>>> which WITHOUT_BINUTILS= can be used.
>>
>> I believe Ed did an exp-run before disabling objdump by default (or maybe
>> that change is still pending?). I'm not sure if that exp-run would catch
>> more subtle changes like this.
>
> My guess is that only ports with cross-build abilities might have the
> "some builder binutils tool(s) needed" issue.
I'm now using:
# svnlite diff /usr/ports/sysutils/u-boot-master/Makefile
Index: /usr/ports/sysutils/u-boot-master/Makefile
===================================================================
--- /usr/ports/sysutils/u-boot-master/Makefile (revision 476026)
+++ /usr/ports/sysutils/u-boot-master/Makefile (working copy)
@@ -21,6 +21,7 @@
dtc>=1.4.1:sysutils/dtc \
mkimage:sysutils/u-boot-tools
BUILD_DEPENDS+= ${COMPILER}:devel/${COMPILER}
+BUILD_DEPENDS+= objdump:devel/binutils
USES= bison gmake python:2.7,build shebangfix tar:bz2
BINARY_ALIAS= bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed swig=swig3.0
in order for sysutils/u-boot-pine64 to build in my context that
is based on WITHOUT_BINUTILS .
Interestingly: before this change the following built fine:
sysutils/u-boot-rpi3 | u-boot-rpi3-2018.07_1
sysutils/u-boot-rpi2 | u-boot-rpi2-2018.07_1
sysutils/u-boot-sinovoip-bpi-m3 | u-boot-sinovoip-bpi-m3-2018.07_1
but sysutils/u-boot-pine64 did not.
The use of some builder environment tool(s) is specific
to u-boot-pine64 (of the 4 u-boot-* 's).
I've not isolated the sysutils/u-boot-pine64 code that
puts some builder environment tool(s) to use. So I've
not formally shown root cause for this case.
I submitted https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230288
for this issue (before I showed BUILD_DEPENDS was at least
a workaround).
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-ports
mailing list