Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 649978 - sys-devel/crossdev - build fails: cc1: error: CPU you selected does not support x86-64 instruction set
Summary: sys-devel/crossdev - build fails: cc1: error: CPU you selected does not suppo...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-09 02:16 UTC by team.penguin50
Modified: 2018-03-10 10:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description team.penguin50 2018-03-09 02:16:37 UTC
I fixed this with the following:

The command:

crossdev --lenv "CC=x86_64-pc-linux-gnu-fix" --b =2.29.1 --g =7.3.0 --k =4.13 --l =2.25-r10 -t x86_64-pc-linux-gnu

The CC= file contents: /usr/bin/x86_64-pc-linux-gnu-fix

	#!/bin/bash
	gcc -march=core2 "$@"

Without the '-march=core2' option, the crossdev build fails.

For example:

i686-pc-linux-gnu-gcc -m64 -c -O1 -pipe -U_FORTIFY_SOURCE conftest.c
cc1: error: CPU you selected does not support x86-64 instruction set

____________________________________________________________________

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad CPU    Q8300  @ 2.50GHz
stepping	: 10
microcode	: 0xa0b
cpu MHz		: 2500.001
cache size	: 2048 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 3
initial apicid	: 3
fdiv_bug	: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm
bugs		: cpu_meltdown spectre_v1 spectre_v2
bogomips	: 5000.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2018-03-10 10:31:50 UTC
(In reply to team.penguin50 from comment #0)
> I fixed this with the following:

Fixed what?

> The command:
> 
> crossdev --lenv "CC=x86_64-pc-linux-gnu-fix" --b =2.29.1 --g =7.3.0 --k
> =4.13 --l =2.25-r10 -t x86_64-pc-linux-gnu

So you're building a 64-bit compiler on a 32-bit system? If only we had your `emerge --info` output.

> The CC= file contents: /usr/bin/x86_64-pc-linux-gnu-fix
> 
> 	#!/bin/bash
> 	gcc -march=core2 "$@"
> 
> Without the '-march=core2' option, the crossdev build fails.

So you had a toolchain tuple very specifically targeting either "i686-pc-linux-gnu-gcc" or "x86_64-pc-linux-gnu" (I'm not quite sure to be honest) and then you wrote a script that uses neither target, but specifies "gcc" instead, which could be pointing to just about anything.

> For example:
> 
> i686-pc-linux-gnu-gcc -m64 -c -O1 -pipe -U_FORTIFY_SOURCE conftest.c
> cc1: error: CPU you selected does not support x86-64 instruction set

Better than an example would be a complete build log, if possible exactly what the crossdev/toolchain output explains you need to provide when reporting (possible) bugs.

Also missing is your `emerge --info` output.

Then again, it looks like you're not actually reporting on a bug you found - it looks like you need help building a cross-toolchain, which is not what this bug tracker is for. Please use our web forums/IRC/mailing lists for technical support instead.