Trouble cross-compiling binutils - as-new.exe

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
BlazingBlast
Posts: 4
Joined: Thu Apr 27, 2023 4:00 am
Libera.chat IRC: BlazingBlast
Location: The Nether(lands)

Trouble cross-compiling binutils - as-new.exe

Post by BlazingBlast »

I was following the GCC cross-compiler tutorial, but after configuring with:

Code: Select all

../binutils-2.40/configure --target=$TARGET --prefix="$PREFIX" --build=i686-w64-mingw32 --with-sysroot --disable-nls --disable-werror
Do note that I slightly deviated from the tutorial and added --build=i686-w64-mingw32 as otherwise it wouldn't work at all.
Then afting running make, it has decided to hang during the linking of gas/as-new.exe. I have been waiting for over half an hour on this one file, also virtually no recources are being used during this. Using make V=1 I have found that the exact command it is trying to excute is:

Code: Select all

gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wwrite-strings -I../../binutils-2.40/gas/../zlib -g -O2 -Wl,--stack -Wl,12582912 -o .libs/as-new.exe app.o as.o atof-generic.o codeview.o compress-debug.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o gen-sframe.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o sframe-opt.o stabs.o subsegs.o symbols.o write.o config/tc-i386.o config/obj-elf.o config/atof-ieee.o  ../bfd/.libs/libbfd.a -L/home/USERNAME/src/build-binutils/zlib ../libiberty/libiberty.a -lz

This is prefaced by the libtool command:

Code: Select all

/bin/sh ./libtool  --tag=CC   --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wwrite-strings -I../../binutils-2.40/gas/../zlib  -g -O2      -Wl,--stack,12582912 -o as-new.exe app.o as.o atof-generic.o codeview.o compress-debug.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o gen-sframe.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o sframe-opt.o stabs.o subsegs.o symbols.o write.o config/tc-i386.o config/obj-elf.o config/atof-ieee.o  ../bfd/libbfd.la ../libiberty/libiberty.a   -L./../zlib -lz

Does anyone here know why this is taking this long and/or what I have done wrong? I'd love to hear your ideas.
Octocontrabass
Member
Member
Posts: 5492
Joined: Mon Mar 25, 2013 7:01 pm

Re: Trouble cross-compiling binutils - as-new.exe

Post by Octocontrabass »

BlazingBlast wrote:I was following the GCC cross-compiler tutorial
Under what environment? It looks like you're using Windows, but you didn't specify anything beyond that.
BlazingBlast wrote:Do note that I slightly deviated from the tutorial and added --build=i686-w64-mingw32 as otherwise it wouldn't work at all.
I've built binutils/GCC many times and never needed to do this...
BlazingBlast
Posts: 4
Joined: Thu Apr 27, 2023 4:00 am
Libera.chat IRC: BlazingBlast
Location: The Nether(lands)

Re: Trouble cross-compiling binutils - as-new.exe

Post by BlazingBlast »

Octocontrabass wrote: Under what environment? It looks like you're using Windows, but you didn't specify anything beyond that.
I did do it under windows originally, but after I tried it in a Ubuntu install everything only took nine hours and is done now.
Post Reply