Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xgcc: error: unrecognized command line option '-V' #1

Closed
denizzzka opened this issue May 30, 2015 · 8 comments
Closed

xgcc: error: unrecognized command line option '-V' #1

denizzzka opened this issue May 30, 2015 · 8 comments

Comments

@denizzzka
Copy link

Hi!

I am tried to use step-by-step instructions from wiki and this bash script to build toolchain on Debian GNU/Linux 8 and in both cases got this error after execute "make -j4 all-target-libgcc":

checking for arm-none-eabi-lipo... arm-none-eabi-lipo
checking for arm-none-eabi-nm... /home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/nm
checking for arm-none-eabi-ranlib... arm-none-eabi-ranlib
checking for arm-none-eabi-strip... arm-none-eabi-strip
checking whether ln -s works... yes
checking for arm-none-eabi-gcc...  /home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/xgcc -B/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/bin/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/lib/ -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/include -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/sys-include   
checking for suffix of object files... configure: error: in `/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/arm-none-eabi/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

part of config.log:

Configured with: ../gcc-4.9.2/configure --target=arm-none-eabi --prefix=/home/denizzz/dembed/arm-none-eabi-gdc/result --enable-languages=d --disable-bootstrap --disable-libssp --disable-libgomp --disable-libmudflap --disable-libphobos --disable-decimal-float --disable-libffi --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-mode=thumb --without-headers
Thread model: single
gcc version 4.9.2 (GCC) 
configure:3373: $? = 0
configure:3362:  /home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/xgcc -B/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/bin/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/lib/ -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/include -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3362:  /home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/xgcc -B/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/bin/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/lib/ -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/include -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3389:  /home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/xgcc -B/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/bin/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/lib/ -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/include -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/sys-include    -o conftest -g -O2   conftest.c  >&5
/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/as: 106: exec: -meabi=5: not found
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602:  /home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/xgcc -B/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/bin/ -B/home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/lib/ -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/include -isystem /home/denizzz/dembed/arm-none-eabi-gdc/result/arm-none-eabi/sys-include    -c -g -O2  conftest.c >&5
/home/denizzz/dembed/arm-none-eabi-gdc/gcc-build/./gcc/as: 106: exec: -meabi=5: not found
configure:3606: $? = 1

Previous line "make -j4 all-gcc" is succeeds.

Can you help with this problem?

@JinShil
Copy link
Owner

JinShil commented May 30, 2015

I'm not quite sure, but I think it's because it can't find some of the libraries needed by the compiler. See the "Prerequisites" section here: http://wiki.dlang.org/GDC/Development/DevelopmentEnvironment. Be sure to use your package manager to install libmpc-dev, libmpfr-dev, and libgmp3-dev and then run the build again.

@denizzzka
Copy link
Author

Checked, everything from wiki list and libmpc-dev, libmpfr-dev, and libgmp3-dev is installed

@denizzzka
Copy link
Author

http://superuser.com/questions/846768/gcc-unrecognized-command-line-options-v-and-qversion-with-autoconf

gcc used to have a -V option for version reports. It now uses -v, and provides the configuration options used when the compiler was built.

BTW, the -qversion option was merged into the -v...

It is need to downgrade build scripts or that?

@JinShil
Copy link
Owner

JinShil commented May 30, 2015

I also found http://forums.debian.net/viewtopic.php?f=8&t=98199

But, I really don't know. I suggest posting a question at http://forum.dlang.org/group/D.gnu. There are a few folks there that have a much deeper knowledge of GCC than I.

@denizzzka
Copy link
Author

I also found http://forums.debian.net/viewtopic.php?f=8&t=98199

It did not help too

But, I really don't know. I suggest posting a question at http://forum.dlang.org/group/D.gnu. There are a few folks there that have a much deeper knowledge of GCC than I.

Ok.

What autoconf version do you use?
-V presented in gcc-4.3, but removed later and did not exists in 4.9

@JinShil
Copy link
Owner

JinShil commented May 30, 2015

autoconf --version gives me autoconf (GNU Autoconf) 2.69

gcc --version gives me gcc (GCC) 4.9.2 20150304 (prerelease)

I'm using Arch Linux 64-bit

@JinShil
Copy link
Owner

JinShil commented Jun 3, 2015

It has come to my attention that the prebuilt binaries at http://gdcproject.org/downloads are capable of creating ARM Cortex-M binaries. I just tested it myself.

I used the arm-linux-gnueabihf build, and the command I used for my STM32F4 (ARM Cortex-M4F) was:
arm-gdcproject-linux-gnueabi-gdc -fno-emit-moduleinfo -frelease -mthumb -mcpu=cortex-m4 -fdata-sections -ffunction-sections -c start.d

The key is to simply add the platform flags: -mthumb -mcpu=cortex-m4

If you're still having trouble with this build, you may want to just go that route and just download the pre-built binary.

@denizzzka
Copy link
Author

Thanks!

@JinShil JinShil closed this as completed Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants