OSDev.org
https://forum.osdev.org/

Trouble cross-compiling binutils - as-new.exe
https://forum.osdev.org/viewtopic.php?f=1&t=56828
Page 1 of 1

Author:  BlazingBlast [ Fri Apr 28, 2023 8:09 am ]
Post subject:  Trouble cross-compiling binutils - as-new.exe

I was following the GCC cross-compiler tutorial, but after configuring with:
Code:
../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:
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:
/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.

Author:  Octocontrabass [ Sun May 07, 2023 2:12 pm ]
Post subject:  Re: Trouble cross-compiling binutils - as-new.exe

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...

Author:  BlazingBlast [ Sun May 21, 2023 10:59 am ]
Post subject:  Re: Trouble cross-compiling binutils - as-new.exe

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/