Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

gcc-7.3.1-r3 CFLAGS


Recommended Posts

So as I understand things - the current ebuilds for GCC under Funtoo are dropping all CFLAGS prior to compiling.

My issue is that I'm trying to build GCC on a Haswell E3-1231V3 for a Haswell G3250 Pentium which is a very cut down version of a Haswell. I have an LXC container on the E3 that I use to build packages for the G3250.

My CFLAGS for the pentium are 

"-march=haswell -mno-aes -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-f16c -mno-fma -mno-xsave -mno-xsaveopt -mabm -O2 -pipe"

I need those on the E3 system because obviously I can't compile AVX instructions into GCC and have it work on the pentium as it does not have AVX.

I appreciate the concept of not going crazy with CFLAGS on things like GCC - but in my case I'm totally stuck without the ability to get those -mno-* flags into my build.

I'm trying to simply use the Gentoo ebuild for GCC 7.3.0 to move forward right now - but I'm hoping that there is maybe an option that I've not noticed to get this working on the Funtoo ebuild




Link to comment
Share on other sites

The gcc ebuild specifically drops all CFLAGS (line 133 of the ebuild) and pulls out the arch from the CFLAGS prior to doing so (line 124 of the ebuild).

I also get "illegal instruction" on anything gcc related if I use the ebuild of the pentium, even as simple as gcc -v blows up

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...