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

error: -mcpu=cortex-a7 conflicts with -march=armv7-a #963

Closed
james-bay opened this issue May 13, 2018 · 6 comments
Closed

error: -mcpu=cortex-a7 conflicts with -march=armv7-a #963

james-bay opened this issue May 13, 2018 · 6 comments

Comments

@james-bay
Copy link

james-bay commented May 13, 2018

ct-ng version: 1.23.0
OS: Kbuntu 18.04 x64

I ran into a error in the build proces:

[INFO ]  Installing final gcc compiler
[EXTRA]    Configuring final gcc compiler
[EXTRA]    Building final gcc compiler
[ERROR]    cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
[ERROR]    make[6]: *** [load_1_1_.lo] Error 1
[ERROR]    make[5]: *** [all-recursive] Error 1
[ERROR]    make[4]: *** [all] Error 2
[ERROR]    make[3]: *** [all-target-libatomic] Error 2
[ERROR]    make[2]: *** [all] Error 2

I did not change the .config after ct-ng armv7-rpi2-linux-gnueabihf, I just did the following:

~/prms/crosstool-ng$ ./bootstrap
~/prms/crosstool-ng$ ./configure --enable-local
~/prms/crosstool-ng$ ./ct-ng armv7-rpi2-linux-gnueabihf
~/prms/crosstool-ng$ ./ct-ng build.1
@bhesmans
Copy link

Hey,

I ran into a similar issue, I edited the config file ... I removed CT_ARCH_CPU="cortex-a7" from the config file and add instead CT_ARCH_ARCH="armv7ve" . Now it works. I'm new to crosstool-ng and cross compile in general so it may no be a good solution at all :-P

@stilor
Copy link
Contributor

stilor commented May 21, 2018

This seems to be an issue with GCC8: build of libstdc++ now throws in -march=armv7-a unconditionally for ARM/Linux configurations - which conflicts with the --with-cpu=... configuration options. I asked about this on GCC mailing list, haven't got a response so far.

With setting architecture, you still need to verify how libstdc++ has been built - whether your -march=armv7ve came before or after -march=armv7-a. If your option came first, it is overridden by -march=armv7-a.

Until I have a better solution from GCC list, I am going to disallow GCC8 for ARM if any of these options (ARCH_ARCH, ARCH_CPU, ARCH_TUNE) is selected.

@james-bay
Copy link
Author

@bhesmans
@stilor
many thanks! Большое спасибо!

@cirosantilli
Copy link

Linking to stilor's GCC thread for convenience: https://gcc.gnu.org/ml/gcc-help/2018-05/msg00120.html

Same problem with ./ct-ng arm-cortex_a15-linux-gnueabihf.

@johan13
Copy link
Contributor

johan13 commented Jun 6, 2018

This issue appears to have been fixed by #978.

@stilor
Copy link
Contributor

stilor commented Jun 6, 2018

Indeed. Forgot to mention this issue in the commit message.

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

5 participants