On Fedora Core 6 (Linux sponge.danger.com 2.6.20-1.2948.fc6 #1 SMP Fri Apr 27 19:48:40 EDT 2007 i686 i686 i386 GNU/Linux) using gcc ((GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)) With sources for binutils-2.17 and gcc-4.2.0 from tarballs Executing for CPU in 926ej-s ; do rm -rf /usr/local/armdev-$CPU-4.2.0 rm -rf binutils-build-$CPU mkdir binutils-build-$CPU cd binutils-build-$CPU ../binutils-2.17/configure --prefix=/usr/local/armdev-$CPU-4.2.0 \ --target=arm-elf --enable-interwork --enable-multilib \ --with-float=soft $MK && $MK install cd .. export PATH=/usr/local/armdev-$CPU-4.2.0/bin:$BASE_PATH rm -rf gcc-build-$CPU mkdir gcc-build-$CPU cd gcc-build-$CPU ../gcc-4.2.0/configure --prefix=/usr/local/armdev-$CPU-4.2.0 \ --target=arm-elf --enable-languages=c --with-float=soft \ --enable-interwork --enable-multilib --with-cpu=arm$CPU \ --disable-threads --with-dwarf2 --without-headers $MK all-gcc && $MK install-gcc cd .. done causes a build to fail with the output make GCC_FOR_TARGET="/space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gcc/xgcc -B/space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gcc/ -B/usr/local/armdev-926ej-s-4.2.0/arm-elf/bin/ -B/usr/local/armdev-926ej-s-4.2.0/arm-elf/lib/ -isystem/usr/local/armdev-926ej-s-4.2.0/arm-elf/include -isystem/usr/local/armdev-926ej-s-4.2.0/arm-elf/sys-include" \ AR_FOR_TARGET="arm-elf-ar" \ AR_CREATE_FOR_TARGET="arm-elf-ar rc" \ AR_EXTRACT_FOR_TARGET="arm-elf-ar x" \ AR_FLAGS_FOR_TARGET="" \ CC="gcc" CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute " \ BUILD_PREFIX="" \ BUILD_PREFIX_1="" \ LANGUAGES="" \ LIBGCC2_CFLAGS="-O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fno-inline -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc " \ MULTILIB_CFLAGS="" T= crtbegin.o crtend.o crti.o crtn.o make[3]: Entering directory `/space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/gcc' /space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gcc/xgcc -B/space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gcc / -B/usr/local/armdev-926ej-s-4.2.0/arm-elf/bin/ -B/usr/local/armdev-926ej-s-4.2.0/arm-elf/lib/ -isystem /usr/local/armdev-926ej-s-4.2.0/arm-elf/include - isystem /usr/local/armdev-926ej-s-4.2.0/arm-elf/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmiss ing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc-4.2.0/gcc -I../../gcc-4.2.0/gcc/. -I../../gcc-4.2.0/gcc/../include -I../../ gcc-4.2.0/gcc/../libcpp/include -I../../gcc-4.2.0/gcc/../libdecnumber -I../libdecnumber -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptio ns -fno-zero-initialized-in-bss -fno-toplevel-reorder -Dinhibit_libc \ -c ../../gcc-4.2.0/gcc/crtstuff.c -DCRT_BEGIN \ -o crtbegin.o /space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gcc/as: line 2: exec: -m: invalid option exec: usage: exec [-cl] [-a name] file [redirection ...] make[3]: *** [crtbegin.o] Error 1 make[3]: Leaving directory `/space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/gcc' make[2]: *** [extra] Error 2 make[2]: Leaving directory `/space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/gcc' make[1]: *** [stmp-multilib] Error 2 make[1]: Leaving directory `/space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/gcc' make: *** [all-gcc] Error 2
Can you attach /space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gcc/as ?
Subject: RE: xgcc invokes as with invalid -m option while assembling crtbegin.o #!/bin/sh exec "$@" -----Original Message----- From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org] Sent: Saturday, June 09, 2007 8:21 PM To: Martin Fouts Subject: [Bug bootstrap/32101] xgcc invokes as with invalid -m option while assembling crtbegin.o ------- Comment #1 from pinskia at gcc dot gnu dot org 2007-06-10 03:20 ------- Can you attach /space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gc c/as ? -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ------------------------------------------------------------------------ ---- Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32101 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. You reported the bug, or are watching the reporter.
This bug is still present in 4.2.1 but now happens on both fc5 and fc6 /space/projects/reference/tools/arm-elf-gnu/4.2.0/gcc-build-926ej-s/./gc c/as still remains the two line script ---- here be script #!/bin/sh exec "$@" ----- there was script
OK, so this one's weird and starts out as a user error. If the path specified in --prefix=/usr/local/armdev-$CPU-4.2.0 in the original config is *not* writable by the account running the build, the make all-gcc fails with the bizarre error indicated in the original bug report. If the path specified *is* writable, then the build finishes just fine.
I have a similar bug, so I am posting here (otherwise I can open a new bug). I run: ./configure --target=mipsel-semb-elf --prefix=/scratch/semb/semb/ --disable-libssp --with-newlib --enable-languages=c --disable-threads --disable-shared --without-include-headers Then make fails with the following: MULTILIB_CFLAGS="" T= crtbegin.o crtend.o crti.o crtn.o make[4]: Entering directory `/scratch/semb/gcc-4.2.2/host-i686-pc-linux-gnu/gcc' /scratch/semb/gcc-4.2.2/host-i686-pc-linux-gnu/gcc/xgcc -B/scratch/semb/gcc-4.2.2/host-i686-pc-linux-gnu/gcc/ -B/scratch/semb/semb//mipsel-semb-elf/bin/ -B/scratch/semb/semb//mipsel-semb-elf/lib/ -isystem /scratch/semb/semb//mipsel-semb-elf/include -isystem /scratch/semb/semb//mipsel-semb-elf/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber -I../libdecnumber -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -Dinhibit_libc -G 0 \ -c ../.././gcc/crtstuff.c -DCRT_BEGIN \ -o crtbegin.o exec: 2: -G: not found make[4]: *** [crtbegin.o] Error 1 I am running on Ubuntu (in case that maters). This seems to be a bug, since this command runs properly on gcc-4.1 (just downloaded a fresh copy and tested it).
I have the same problem: line 2: exec: -m: invalid option Trying to build 4.2, the directory specified in --prefix *is* writable by the user running the build.
This doesn't appear with any of the release branches (4.3, 4.4) or trunk currently. Can this now be closed out ?
No feedback in 6 months. Closing...