[LEDE-DEV] Can't build gcc (initial) on Ubuntu 16.04
Philip Prindeville
philipp_subx at redfish-solutions.com
Fri Mar 3 12:12:04 PST 2017
I dug into this… Problem was with CONFIG_EXTRA_OPTIMIZATION having “-fno-plt” in it.
This was being passed into the ‘gcc’ that was being used to bootstrap gcc.
Wondering if that’s not a bug.
Shouldn’t the build of the cross-gcc ignore target flags?
> On Mar 2, 2017, at 11:58 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
>
> Hi.
>
> I was trying to build LEDE (HEAD) today after rebasing all of my fixes to it (from OpenWRT), but I couldn’t even get gcc to build. This was on Ubuntu 16.04-2 LTS.
>
> Is there a dependency that might have creeped in?
>
> I’m seeing the following:
>
> …
> Checking multilib configuration for libgcc...
> mkdir -p -- x86_64-openwrt-linux-musl/libgcc
> Configuring in x86_64-openwrt-linux-musl/libgcc
> configure: creating cache ./config.cache
> checking build system type... x86_64-pc-linux-gnu
> checking host system type... x86_64-openwrt-linux-musl
> checking for --enable-version-specific-runtime-libs... no
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for gawk... gawk
> checking for x86_64-openwrt-linux-musl-ar... /home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/x86_64-openwrt-linux-musl/bin/ar
> checking for x86_64-openwrt-linux-musl-lipo... x86_64-openwrt-linux-musl-lipo
> checking for x86_64-openwrt-linux-musl-nm... /home/philipp/bertram/lede/build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0-initial/./gcc/nm
> checking for x86_64-openwrt-linux-musl-ranlib... /home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/x86_64-openwrt-linux-musl/bin/ranlib
> checking for x86_64-openwrt-linux-musl-strip... /home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/x86_64-openwrt-linux-musl/bin/strip
> checking whether ln -s works... yes
> checking for x86_64-openwrt-linux-musl-gcc... /home/philipp/bertram/lede/build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0-initial/./gcc/xgcc -B/home/philipp/bertram/lede/build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0-initial/./gcc/ -B/home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/x86_64-openwrt-linux-musl/bin/ -B/home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/x86_64-openwrt-linux-musl/lib/ -isystem /home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/x86_64-openwrt-linux-musl/include -isystem /home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/x86_64-openwrt-linux-musl/sys-include
> checking for suffix of object files... configure: error: in `/home/philipp/bertram/lede/build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0-initial/x86_64-openwrt-linux-musl/libgcc':
> configure: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details.
> Makefile:10905: recipe for target 'configure-target-libgcc' failed
> make[4]: *** [configure-target-libgcc] Error 1
> make[4]: Leaving directory '/home/philipp/bertram/lede/build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0-initial'
> Makefile:36: recipe for target '/home/philipp/bertram/lede/build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0-initial/.built' failed
> make[3]: *** [/home/philipp/bertram/lede/build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0-initial/.built] Error 2
> make[3]: Leaving directory '/home/philipp/bertram/lede/toolchain/gcc/initial'
> toolchain/Makefile:96: recipe for target 'toolchain/gcc/initial/compile' failed
> make[2]: *** [toolchain/gcc/initial/compile] Error 2
> make[2]: Leaving directory '/home/philipp/bertram/lede'
> toolchain/Makefile:94: recipe for target '/home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/stamp/.toolchain_compile' failed
> make[1]: *** [/home/philipp/bertram/lede/staging_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/stamp/.toolchain_compile] Error 2
> make[1]: Leaving directory '/home/philipp/bertram/lede'
> /home/philipp/bertram/lede/include/toplevel.mk:199: recipe for target 'world' failed
> make: *** [world] Error 2
>
>
>
> The failing configure script was:
>
> build_dir/toolchain-x86_64_westmere_gcc-5.3.0_musl/gcc-5.3.0/libgcc/configure
>
> around line 3695.
>
> Am I missing something? Is there a library or utility that has an unexpressed dependency?
>
> Thanks.
>
> -Philip
>
>
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
More information about the Lede-dev
mailing list