On Wed, Jun 23, 2010 at 12:04 AM, Gaetan Nadon <[email protected]> wrote: > On Tue, 2010-06-22 at 23:41 +0300, Martin-Éric Racine wrote: > > On Tue, Jun 22, 2010 at 11:27 PM, Gaetan Nadon <[email protected]> wrote: >> On Tue, 2010-06-22 at 22:12 +0300, Martin-Éric Racine wrote: >> >> In addition to exiting gracefully with a warning at ./configure time >> if the build host is non-x86, what if we enforced -march=geode if GCC >> >> You may want to look at AX_GCC_X86_CPUID and AX_GCC_ARCHFLAG which would >> do >> that for you. >> http://www.gnu.org/software/autoconf-archive/The-Macros.html#The-Macros > > > Unless I misunderstood the description, these macros guess the target > > based on the build host's architecture? > > They use host_cpu (e.g. i*86) first and then look at the cpuid. You might > have cross-compiling in mind. > Generally speaking, there is not much one can do in configure.ac for > cross-compiling.
Matching the HOSTCC architecture is not what we're trying to achieve. Instead, we simply want to ensure that if HOSTCC runs on some x86 variant i.e. atom/x86_32/x86_64 then we'll enforce -march=geode to ensure that we don't accidentally produce code that won't run on a Geode and to simultaneously produce Geode-optimized code as a bonus. However, if HOSTCC runs on some non-x86 architecture, we'll skip building the module entirely and produce a warning along the lines of "W: xf86-video-geode only builds and runs on x86_32 architectures. Skipping this module." Martin-Éric _______________________________________________ Xorg-driver-geode mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-geode
