[Bug 175605] devel/binutils: please fix build binutils-2.23.1 in raspberry pi
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jul 11 20:02:56 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175605
Andreas Tobler <andreast at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andreast at FreeBSD.org
--- Comment #7 from Andreas Tobler <andreast at FreeBSD.org> ---
To get the right linker command do this:
(the -v is for verbose)
andreast at wandquad:~ % cc -o z z.c -v
Using built-in specs.
Target: armv6-undermydesk-freebsd
Configured with: FreeBSD/armv6 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
/usr/libexec/cc1 -quiet -v -D_LONGLONG z.c -quiet -dumpbase z.c -auxbase z
-version -o /tmp//ccMJ520s.s
#include "..." search starts here:
#include <...> search starts here:
/usr/include/gcc/4.2
/usr/include
End of search list.
GNU C version 4.2.1 20070831 patched [FreeBSD] (armv6-undermydesk-freebsd)
compiled by GNU C version 4.2.1 20070831 patched [FreeBSD].
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=130664
Compiler executable checksum: 20743f84b7aef1f094db166caa2fbdf7
/usr/bin/as -mfpu=softvfp -meabi=4 -o /tmp//ccNNWzRe.o /tmp//ccMJ520s.s
/usr/bin/ld --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1
--hash-style=both --enable-new-dtags -X -o z /usr/lib/crt1.o /usr/lib/crti.o
/usr/lib/crtbegin.o -L/usr/lib -L/usr/lib /tmp//ccNNWzRe.o -lgcc --as-needed
-lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/crtend.o /usr/lib/crtn.o
GNU ld 2.17.50 [FreeBSD] 2007-07-03
Supported emulations:
armelf_fbsd
-->>
Then build only the z.o:
andreast at wandquad:~ % cc -c z.c -v
Using built-in specs.
Target: armv6-undermydesk-freebsd
Configured with: FreeBSD/armv6 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
/usr/libexec/cc1 -quiet -v -D_LONGLONG z.c -quiet -dumpbase z.c -auxbase z
-version -o /tmp//ccoqB09j.s
#include "..." search starts here:
#include <...> search starts here:
/usr/include/gcc/4.2
/usr/include
End of search list.
GNU C version 4.2.1 20070831 patched [FreeBSD] (armv6-undermydesk-freebsd)
compiled by GNU C version 4.2.1 20070831 patched [FreeBSD].
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=130664
Compiler executable checksum: 20743f84b7aef1f094db166caa2fbdf7
/usr/bin/as -mfpu=softvfp -meabi=4 -o z.o /tmp//ccoqB09j.s
-->
And last, link the z.o to z:
andreast at wandquad:~ % /build/gdb/testbin_armv6/bin/ld -V -Bstatic -X -o z
/usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbeginT.o -L/usr/lib z.o -lgcc
-lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/crtend.o /usr/lib/crtn.o
GNU ld (GNU Binutils) 2.24.51.20140706
Supported emulations:
armelf_fbsd
armelfb_fbsd
armelf
andreast at wandquad:~ % ./z
mumu
Doesn't matter if static or dynamic, at least for me. And I'm on current.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-arm
mailing list