Bug 204419 - devel/arm-none-eabi-gcc492: undefined reference to host_detect_local_cpu
Summary: devel/arm-none-eabi-gcc492: undefined reference to host_detect_local_cpu
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Ian Lepore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-10 07:24 UTC by Vladimir Botka
Modified: 2016-01-02 04:14 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (ian)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Botka 2015-11-10 07:24:44 UTC
Hello,
"make build" in /usr/ports/devel/arm-none-eabi-gcc492/work/build-gcc/gcc fails with error [2] on [1].

[1]
# uname -a
FreeBSD imx6 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r290273: Tue Nov  3 02:54:03 UTC 2015     root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/IMX6  arm

[2]
gcc.o:(.rodata+0x8c4): undefined reference to `host_detect_local_cpu(int, char const**)'
gcc.o:(.rodata+0x8c4): undefined reference to `host_detect_local_cpu(int, char const**)'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:1805: recipe for target 'xgcc' failed
gmake[2]: *** [xgcc] Error 1
gmake[2]: *** Waiting for unfinished jobs....
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:1814: recipe for target 'cpp' failed
gmake[2]: *** [cpp] Error 1
gmake[2]: Leaving directory '/usr/ports/devel/arm-none-eabi-gcc492/work/build-gcc/gcc'
Makefile:3967: recipe for target 'all-gcc' failed
gmake[1]: *** [all-gcc] Error 2
gmake[1]: Leaving directory '/usr/ports/devel/arm-none-eabi-gcc492/work/build-gcc'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/arm-none-eabi-gcc492
[root@imx6 /usr/ports/devel/arm-none-eabi-gcc492]#
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2015-11-10 13:40:24 UTC
There is a patch in this thread: https://lists.freebsd.org/pipermail/freebsd-arm/2015-August/012055.html
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-01-02 04:12:57 UTC
A commit references this bug:

Author: ian
Date: Sat Jan  2 04:11:51 UTC 2016
New revision: 405044
URL: https://svnweb.freebsd.org/changeset/ports/405044

Log:
  Add a patch to allow arm-none-eabi-gcc492 to build natively on arm systems.
  Without this change the port builds fine as a cross-compiler but fails to
  build natively on an arm system.

  Patch submitted by Tim Kientzle, who pointed out it was used in the original
  powerpc64-gcc port this one was derived from.

  PR:		205673
  PR:		204419
  Approved by:	mat (mentor)

Changes:
  head/devel/arm-none-eabi-gcc492/Makefile
  head/devel/arm-none-eabi-gcc492/files/
  head/devel/arm-none-eabi-gcc492/files/patch-gcc_config.host