[Xorg-driver-geode] proposal: always build with -march=geode

Martin-Éric Racine q-funk at iki.fi
Tue Jul 13 07:12:05 PDT 2010


On Mon, Jul 5, 2010 at 7:55 PM, Writer, Tim <Tim.Writer at amd.com> wrote:
> On Fri, Jul 02 2010, Martin-Éric Racine <q-funk at iki.fi> wrote:
>
>> On Wed, Jun 30, 2010 at 6:45 PM, Writer, Tim <Tim.Writer at amd.com> wrote:
>>> This (building with `-march=geode') seems reasonable to me.
>>
>> http://cgit.freedesktop.org/gstreamer/common/tree/m4/as-compiler-flag.m4
>>
>> This seems to be a good example of how to check for the validity of
>> "geode" as an -march and -mtune option.
>
> The approach seems reasonable but I disagree with the name
> `AS_COMPILER_FLAGS'. >
> If this macro were pushed upstream into Autoconf it would probably be
> called `AC_COMPILER_FLAGS' or similar.

Yes, we'd be using AC_* macros, not AS_* macros.

>> I'm just wondering what would be our correct response in case "geode"
>> is not available? Would perhaps "-march=pentium-mmx -m3dnow" be
>> suitable and usable on older GCC versions or should me simply not
>> attempt to set any optimization if "geode" is not a supported option?
>
> I would vote for the latter, i.e. try to tune for Geode but fall back to
> conservative defaults.

Noted.

>>> I also support the cross-compiling initiative, if only to allow
>>> developers to take advantage of more capable and performant development
>>> machines that many developers have.
>>
>> http://wiki.debian.org/DebianAMD64Faq
>>
>> This seems to suggest that some tools exist to make an x86_64 switch
>> personality to 32-bit, but I'm not sure whether this information is
>> too Debian-specific or not.  Comments?
>
> Lots of stuff is Debian specific but I would guess that this:
>
> | Q. Cross-compiling a 32-bit (i386) Linux binary on 64-bit Machine (amd64)
> |
> | Short answer, depending of the tool you use, you can use one of:
> |
> | linux32 make
> | linux32 dpkg-buildpackage
> | linux32 git-buildpackage
>
> should work for cross compiling for Geode on most x86_64
> distributions. The `linux32' utility exists on an RHEL5.3 system I have
> and SLED appears to have it too:
>
>    http://www.novell.com/products/linuxpackages/enterpriseserver/x86-64/linux32.html
>
> Note that this only changes the personality for the purposes of
> compilation -- sufficient for our needs, I think -- but it's not a
> solution to the more general problem of running 32-bit applications on
> 64-bit systems. I only mention that because my first thought on seeing a
> command called `linux32' was how can this possibly work?
>
> A reasonable approach would be to add something like this to configure:
>
>    case `uname -m` in
>      (i?86)
>                # Do nothing
>                ;;
>      (x86_64)
>                if `type -p linux32 >/dev/null`; then
>                    # Arrange to compile and link with `linux32 $CC ...'
>                else
>                    # Fail noisily
>                fi
>                ;;
>      (*)
>                # Fail nosily
>                ;;
>    esac

This seems reasonable. Gaetan, do you wanna work on this one? I don't
have any 64-bit hardware to test this on, so I'd have to reply upon
you to tell us whether this works.

Martin-Éric


More information about the Xorg-driver-geode mailing list