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

crosstool-NG cross compiled gcc is giving error while compiling #70

Closed
sunilbage opened this issue Aug 18, 2020 · 7 comments
Closed

crosstool-NG cross compiled gcc is giving error while compiling #70

sunilbage opened this issue Aug 18, 2020 · 7 comments

Comments

@sunilbage
Copy link

sunilbage commented Aug 18, 2020

Dear Sir,
I am using cygwin-32 bit environment
cygcheck (cygwin) 2.11.2
System Checker for Cygwin
Copyright (C) 1998 - 2018 Cygwin Authors
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I have using cross-compiled gcc by Crosstool-NG for Xtensa.
While compiling Xtensa sources i am getting error
xtensa--gcc: error: unrecognized command line option '-mno-coproc'; did you mean '-fno-coomon' ?
xtensa--gcc: error: unrecognized command line option '-mno-l32r-flix

can you suggest me how to resolve this issue.
Have i missed any configuration parameters while configuring cross-tool-NG?

@jcmvbkbc
Copy link
Owner

can you suggest me how to resolve this issue.

Yes. Edit makefiles of the project you're trying to build and remove options -mno-coproc and -mno-l32r-flix from the gcc command line. They are not supported by xtensa gcc.

  • -mno-l32r-flix removal does not change anything because xtensa gcc does not use FLIX bundles.
  • -mno-coproc removal means that xtensa gcc would use FPU for floating point calculations if it's available in the configured xtensa core. There's currently no way to disable use of FPU from the command line. xtensa gcc does not use any other coprocessor.

@sunilbage
Copy link
Author

Dear Sir,
After removing the options -mno-coproc and -mno-l32r-flix from the gcc command line as per your suggestion i am able to proceed with the compilation.
But now proceeding ahead, i am encountering another error with respect to assembly flags
ASFLAGS = -O2 -Os -g $(CMNFLAGS) -Wa,--schedule

unrecognized option '--schedule' error is thrown by xtensa--gcc.
Please suggest me how to resolve this issue.

@sunilbage
Copy link
Author

Sir,
FLIX instructions are supported by Xtensa Processor as per the below link.

https://ip.cadence.com/news/76/330/Tensilica-Previews-Next-Generation-Xtensa-ISA-With-Flexible-Length-Instructions-At-Microprocessor-Forum

My query is if we remove the FLIX option, then compiled Xtensa sources will not have the support of executing FLIX instructions.
This is not we want , right??

I am encountering one more error with respect to ASFLAGS during compilation
ASFLAGS = -O2 -Os -g $(CMNFLAGS) -Wa,--schedule
unrecognized option '--schedule' error during compilation. Please suggest how to resolve this issue also.

@jcmvbkbc
Copy link
Owner

unrecognized option '--schedule' error is thrown by xtensa--gcc.
Please suggest me how to resolve this issue.

Just the same: remove it from the compiler command line. Mainline version of xtensa assembler does not support it.

My query is if we remove the FLIX option, then compiled Xtensa sources will not have the support of executing FLIX instructions.

No. You cannot take support for executing FLIX instruction out of processor. It will run FLIX instructions as always.
But the mainline xtensa gcc doesn't generate FLIX instructions and the mainline xtensa assembler has no ability to schedule multiple opcodes into a FLIX instruction.

@sunilbage
Copy link
Author

Sir ,
after removing the --schedule from the compiler command line, compilation is not proceeding further. It is stuck compiling the assembly file.S.
What could be the reason and how to resolve it?

@jcmvbkbc
Copy link
Owner

The whole -Wa,--schedule construct must be removed, not just the --schedule part.

@sunilbage
Copy link
Author

My issues are all resolved.
Thank You.

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