diff options
author | Richard Henderson <rth@twiddle.net> | 2014-11-13 13:50:39 +0100 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2014-11-14 13:06:12 +0100 |
commit | 5d69d57a053c5049df29242def492159e1fadbae (patch) | |
tree | ffc882ff1f5394abfc6332fd3c6da3315beecdb3 /configure.host | |
parent | 57f52484573613e2def21171184f50bd72209cac (diff) | |
download | libffi-5d69d57a053c5049df29242def492159e1fadbae.tar.gz |
configure: Move target source selection into configure.host
This eliminates the AM_CONDITIONAL ugliness, which eliminates
just a bit of extra boilerplate for a new target.
At the same time, properly categorize the EXTRA_DIST files
into SOURCES and HEADERS, for the generation of ctags.
Diffstat (limited to 'configure.host')
-rw-r--r-- | configure.host | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/configure.host b/configure.host index e6e3558..bc3e838 100644 --- a/configure.host +++ b/configure.host @@ -4,49 +4,60 @@ # # THIS TABLE IS SORTED. KEEP IT THAT WAY. +# Most of the time we can define all the variables all at once... case "${host}" in aarch64*-*-*) TARGET=AARCH64; TARGETDIR=aarch64 + SOURCES="ffi.c sysv.S" ;; alpha*-*-*) TARGET=ALPHA; TARGETDIR=alpha; # Support 128-bit long double, changeable via command-line switch. HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)' + SOURCES="ffi.c osf.S" ;; arc*-*-*) TARGET=ARC; TARGETDIR=arc + SOURCES="ffi.c arcompact.S" ;; arm*-*-*) TARGET=ARM; TARGETDIR=arm + SOURCES="ffi.c sysv.S" ;; avr32*-*-*) TARGET=AVR32; TARGETDIR=avr32 + SOURCES="ffi.c sysv.S" ;; bfin*) TARGET=BFIN; TARGETDIR=bfin + SOURCES="ffi.c sysv.S" ;; cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris + SOURCES="ffi.c sysv.S" ;; frv-*-*) TARGET=FRV; TARGETDIR=frv + SOURCES="ffi.c eabi.S" ;; hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*) TARGET=PA_LINUX; TARGETDIR=pa + SOURCES="ffi.c linux.S" ;; hppa*64-*-hpux*) TARGET=PA64_HPUX; TARGETDIR=pa ;; hppa*-*-hpux*) TARGET=PA_HPUX; TARGETDIR=pa + SOURCES="ffi.c hpux32.S" ;; i?86-*-freebsd* | i?86-*-openbsd*) @@ -94,30 +105,37 @@ case "${host}" in ia64*-*-*) TARGET=IA64; TARGETDIR=ia64 + SOURCES="ffi.c unix.S" ;; m32r*-*-*) TARGET=M32R; TARGETDIR=m32r + SOURCES="ffi.c sysv.S" ;; m68k-*-*) TARGET=M68K; TARGETDIR=m68k + SOURCES="ffi.c sysv.S" ;; m88k-*-*) TARGET=M88K; TARGETDIR=m88k + SOURCES="ffi.c obsd.S" ;; microblaze*-*-*) TARGET=MICROBLAZE; TARGETDIR=microblaze + SOURCES="ffi.c sysv.S" ;; moxie-*-*) TARGET=MOXIE; TARGETDIR=moxie + SOURCES="ffi.c eabi.S" ;; metag-*-*) TARGET=METAG; TARGETDIR=metag + SOURCES="ffi.c sysv.S" ;; mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*) @@ -131,10 +149,12 @@ case "${host}" in nios2*-linux*) TARGET=NIOS2; TARGETDIR=nios2 + SOURCES="ffi.c sysv.S" ;; or1k*-linux*) TARGET=OR1K; TARGETDIR=or1k + SOURCES="ffi.c sysv.S" ;; powerpc*-*-linux* | powerpc-*-sysv*) @@ -166,28 +186,72 @@ case "${host}" in s390-*-* | s390x-*-*) TARGET=S390; TARGETDIR=s390 + SOURCES="ffi.c sysv.S" ;; sh-*-* | sh[[34]]*-*-*) TARGET=SH; TARGETDIR=sh + SOURCES="ffi.c sysv.S" ;; sh64-*-* | sh5*-*-*) TARGET=SH64; TARGETDIR=sh64 + SOURCES="ffi.c sysv.S" ;; sparc*-*-*) TARGET=SPARC; TARGETDIR=sparc + SOURCES="ffi.c ffi64.c v8.S v9.S" ;; tile*-*) TARGET=TILE; TARGETDIR=tile + SOURCES="ffi.c tile.S" ;; vax-*-*) TARGET=VAX; TARGETDIR=vax + SOURCES="ffi.c elfbsd.S" ;; xtensa*-*) TARGET=XTENSA; TARGETDIR=xtensa + SOURCES="ffi.c sysv.S" ;; esac + +# ... but some of the cases above share configury. +case "${TARGET}" in + MIPS) + SOURCES="ffi.c o32.S n32.S" + ;; + POWERPC) + SOURCES="ffi.c ffi_sysv.c ffi_linux64.c sysv.S ppc_closure.S" + SOURCES="${SOURCES} linux64.S linux64_closure.S" + ;; + POWERPC_AIX) + SOURCES="ffi_darwin.c aix.S aix_closure.S" + ;; + POWERPC_DARWIN) + SOURCES="ffi_darwin.c darwin.S darwin_closure.S" + ;; + POWERPC_FREEBSD) + SOURCES="ffi.c ffi_sysv.c sysv.S ppc_closure.S" + ;; + X86 | X86_FREEBSD | X86_WIN32) + SOURCES="ffi.c sysv.S" + ;; + X86_64) + SOURCES="ffi64.c unix64.S" + ;; + X86_WIN64) + SOURCES="ffiw64.c win64.S" + ;; + X86_DARWIN) + SOURCES="ffi.c darwin.S ffi64.c darwin64.S" + ;; +esac + +# If we failed to configure SOURCES, we can't do anything. +if test -z "${SOURCES}"; then + UNSUPPORTED=1 +fi |