You need to use gcc-ar wrappers when creating the archive in the first place.
Thanks, Andrew > On May 26, 2014, at 3:19 AM, "Bernhard Rosenkränzer" > <bernhard.rosenkran...@linaro.org> wrote: > > Hi, > I've run into some compile errors after updating to 4.9 -- usually getting > undefined references to symbols defined in helper static libraries. > > It turns out this is triggered by gcc -flto now creating slim object files by > default (-ffat-lto-objects "fixes" it) - but I think it is actually an ld bug > that should be fixed at some point. ld (regardless of whether I use > -fuse-linker-plugin, -fuse-ld=gold or -fuse-ld=bfd) doesn't seem to see LTO > bytecode in object files that are inside an ar wrapper. > It deals with the library just fine if I use "ar x" to extract its object > files and link to them individually as opposed to the .a file. > > I've attached a small test case to demonstrate ("make broken" shows the > error, "make works" shows the workaround). > > Is there any reason why ld should behave the way it does, or is this a bug > that needs fixing? > > ttyl > bero > <ltotest.tar.gz> > _______________________________________________ > linaro-toolchain mailing list > linaro-toolchain@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/linaro-toolchain _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain