Removing objdump breaks GCC configure

Mark Millard marklmi at yahoo.com
Wed Aug 1 22:09:02 UTC 2018



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.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net <http://dsl-only.net/> went
away in early 2018-Mar)



More information about the freebsd-ports mailing list