mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-28 05:50:30 +02:00
detect 32-/64-bit variant of i386 back-end at include time (not configure time)
2008-06-11 Paolo Bonzini <bonzini@gnu.org> * build-aux/lightning.m4: Adjust LIGHTNING_BACKENDS, don't use suffix support to distinguish i386/x86_64. * lightning/i386/Makefile.frag: Use LIGHTNING_TARGET_FILES to distribute *-32.h and *-64.h files now. * lightning/i386/asm-i386: Moved to... * lightning/i386/asm.h: Include the appropriate subtarget file. * lightning/i386/core-i386: Moved to... * lightning/i386/core.h: Include the appropriate subtarget file. * lightning/i386/fp.h: New, include the appropriate subtarget file. * lightning/i386/asm-32: Do not include asm-i386.h. * lightning/i386/asm-64.h: Likewise. * lightning/i386/core-32: Do not include core-i386.h. * lightning/i386/core-64.h: Likewise. * lightning/Makefile.am: Adjust for renamed files. * configure.ac: Define LIGHTNING_TARGET here. * opcode/disass.c: Change list of valid LIGHTNING_TARGET values. * lightningize.in: Robustify against missing subtarget files.
This commit is contained in:
parent
ef7eb772be
commit
66aef1c644
18 changed files with 133 additions and 41 deletions
23
configure
vendored
23
configure
vendored
|
@ -3896,23 +3896,30 @@ fi
|
|||
|
||||
|
||||
|
||||
BACKENDS="i386:-32 i386:-64 sparc ppc"
|
||||
BACKENDS="i386 i386:-32 i386:-64 sparc ppc"
|
||||
|
||||
|
||||
case "$target_cpu" in
|
||||
i?86) LIGHTNING_TARGET=LIGHTNING_I386 ;;
|
||||
x86_64) LIGHTNING_TARGET=LIGHTNING_X86_64 ;;
|
||||
sparc*) LIGHTNING_TARGET=LIGHTNING_SPARC ;;
|
||||
powerpc) LIGHTNING_TARGET=LIGHTNING_PPC ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
|
||||
suffix=
|
||||
case "$host_cpu" in
|
||||
i?86) cpu=i386; suffix=-32 ;;
|
||||
x86_64) cpu=i386; suffix=-64 ;;
|
||||
sparc*) cpu=sparc ;;
|
||||
powerpc) cpu=ppc ;;
|
||||
*) ;;
|
||||
case "$target_cpu" in
|
||||
i?86) cpu=i386 ;;
|
||||
x86_64) cpu=i386 ;;
|
||||
sparc*) cpu=sparc ;;
|
||||
powerpc) cpu=ppc ;;
|
||||
*) ;;
|
||||
esac
|
||||
if test -n "$cpu" && test -d "$srcdir/lightning/$cpu"; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define LIGHTNING_TARGET `echo "LIGHTNING_$cpu$suffix" | $as_tr_cpp`
|
||||
#define LIGHTNING_TARGET `echo "$LIGHTNING_TARGET" | $as_tr_cpp`
|
||||
_ACEOF
|
||||
|
||||
lightning_frag=`cd $srcdir && pwd`/lightning/$cpu/Makefile.frag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue