Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 319523

Summary: media-tv/mythtv march/mtune issue for athlon64 without x86-64 support
Product: Gentoo Linux Reporter: Peter Gantner (a.k.a. nephros) <gentoo>
Component: New packagesAssignee: MythTV Maintainers <mythtv+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: mythtv+disabled
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 393673    
Attachments: gcc_Q.txt
gcc_E.txt

Description Peter Gantner (a.k.a. nephros) 2010-05-13 13:31:52 UTC
+++ This bug was initially created as a clone of Bug #294178 +++

There are some AMD Sempron CPUs with an athlon64 core but no actual x86_64 support.
Working CFLAGS for those CPUs are e.g. "-march=i686 -mtune=athlon64 -m32"

The current configure setup in mythtv-0.22_p24255.ebuild does not account for this, configuring --tune=athlon64 which defaults x86_64 build.

The (configure test) compile then fails for such CPUs with the venerable "compile cannot create excutables" error.

Maybe mythtv could feature an 64bit/32bit USE flag like this?

  if use 32bit; then
    myconf="${myconf} --extra-cxxflags=-m32"
  fi
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2010-06-13 07:41:58 UTC
mtune=athlon64 implies 64 bit instructions in gcc
Comment 2 Peter Gantner (a.k.a. nephros) 2010-06-15 11:45:34 UTC
(In reply to comment #1)
> mtune=athlon64 implies 64 bit instructions in gcc

That may well be, however I assure you that the combination of "-march=athlon64 -m32" does work fine on those CPUs I am talking about.

Those _are_ athlon64 (k8) cores but they only do 32bit. They are _not_ athlon-xp (k7) cores (which would be the "next step down" in gcc -march targets).

They are/were low-power chips oringinally designed for laptops but later released for PCs as cheap, low-power solution ideally suited for HTPC usage.
See: http://en.wikipedia.org/wiki/Sempron#Models_for_Socket_754

And I'd wager they will be encountered in mythtv boxes and it would be nice if the ootb ebuild would support them.
Isn't that what the gcc -m32 switch is all about?

Wether that is done via USE flag or based on CHOST or differently is entirely up to your tastes, I'm just telling you but the USE flag version does work fine (if you actually do  '${myconf} --extra-cflags=-m32 --extra-cxxflags=-m32' not just cxx as I wrote above.)


Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2010-06-15 19:11:20 UTC
Attach the output of "gcc -E -dM - < /dev/null -march=native".
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2010-06-15 19:46:01 UTC
Also attach the output of "gcc -Q --help=target -march=native"
Comment 5 Peter Gantner (a.k.a. nephros) 2010-06-16 07:41:44 UTC
Created attachment 235533 [details]
gcc_Q.txt

= gcc -Q --help=target -march=native
Comment 6 Peter Gantner (a.k.a. nephros) 2010-06-16 07:42:17 UTC
Created attachment 235535 [details]
gcc_E.txt

=gcc -E -dM - < /dev/null -march=native
Comment 7 Peter Gantner (a.k.a. nephros) 2012-03-05 21:07:18 UTC
The computer I had this problem with died a while ago, so personally I'd say

  You can close this.

Although I still think being able to force 32bits would be an enhancement to the ebuilds.
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2012-06-22 04:06:37 UTC
Well now with x32 as a valid arch this is real. It will be fixed in 0.25.1
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2012-07-08 23:02:43 UTC
This should be solved in 0.25.1 and newer.