dtc build failures on OS X
David Gibson
david at gibson.dropbear.id.au
Wed May 20 14:43:01 EST 2009
On Tue, May 19, 2009 at 09:08:14PM -0500, Timur Tabi wrote:
> I'm trying to build dtc on Mac OS X. The compilation seems to go
> okay, but the linker dies. First, it says this:
Well, I'm not surprised something has gone wrong - not much work has
gone into making dtc portable yet (though it has been compiled on
FreeBSD, at least).
> LD libfdt/libfdt.so
> ld: unknown option: --version-script=libfdt/version.lds
> collect2: ld returned 1 exit status
>
> A Google search suggested that I can just delete the --version-script
> option. I did that, and now I get this error:
Hrm. What toolchain are you using?
> LD libfdt/libfdt.so
> ld: unknown option: -soname
> collect2: ld returned 1 exit status
>
> This web page: http://lists.apple.com/archives/unix-porting/2003/Oct/msg00032.html
> had some suggestions on how to fix that, so my Makefile now looks like
> this:
>
> $(LIBFDT_lib):
> @$(VECHO) LD $@
> $(CC) $(LDFLAGS) -fPIC -Wl,-dylib_install_name -Wl,$(notdir
> $@) -shared -o $(LIBFDT_objdir)/libfdt-$(DTC_VERSION).so $^
> ln -s libfdt-$(DTC_VERSION).so $(LIBFDT_objdir)/libfdt.so
>
> But now I get this error:
>
> LD libfdt/libfdt.so
> Undefined symbols:
> "_main", referenced from:
> start in crt1.10.5.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
*That* looks like it's trying to build an executable, rather than a
shared library. Hence including the crt1.o module, which wants to
call main().
> So now I'm stuck. Has anyone tried this before? Can anyone tell me
> how to fix this?
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
More information about the devicetree-discuss
mailing list