mirror of https://github.com/python/cpython
Fixes issue #17192: Update the ctypes module's libffi to v3.0.13. This
specifically addresses a stack misalignment issue on x86 and issues on some more recent platforms.
This commit is contained in:
parent
bebf75f30a
commit
46ce27ab1e
|
@ -786,6 +786,10 @@ Library
|
|||
Extension Modules
|
||||
-----------------
|
||||
|
||||
- Issue #17192: Update the ctypes module's libffi to v3.0.13. This
|
||||
specifically addresses a stack misalignment issue on x86 and issues on
|
||||
some more recent platforms.
|
||||
|
||||
- Issue #12268: The io module file object write methods no longer abort early
|
||||
when a write system calls is interrupted (EINTR).
|
||||
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
diff -urN libffi.orig/configure libffi/configure
|
||||
--- libffi.orig/configure 2010-03-19 18:29:54.588499862 +0100
|
||||
+++ libffi/configure 2010-03-19 18:32:09.113499479 +0100
|
||||
@@ -11228,6 +11228,9 @@
|
||||
i?86-*-solaris2.1[0-9]*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
diff -r -N -u libffi.orig/autom4te.cache/output.0 libffi/autom4te.cache/output.0
|
||||
diff -r -N -u libffi.orig/configure libffi/configure
|
||||
--- libffi.orig/configure 2013-03-17 15:37:50.000000000 -0700
|
||||
+++ libffi/configure 2013-03-18 15:11:39.611575163 -0700
|
||||
@@ -13368,6 +13368,10 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+ i*86-*-nto-qnx*)
|
||||
+ TARGET=X86; TARGETDIR=x86
|
||||
+ ;;
|
||||
i?86-*-*)
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
+
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
@@ -11245,12 +11248,12 @@
|
||||
@@ -13426,12 +13430,12 @@
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.*)
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
+ TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
mips*-*-linux* | mips*-*-openbsd*)
|
||||
# Support 128-bit long double for NewABI.
|
||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
|
@ -26,8 +28,8 @@ diff -urN libffi.orig/configure libffi/configure
|
|||
;;
|
||||
|
||||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
@@ -11307,7 +11310,7 @@
|
||||
as_fn_error "\"libffi has not been ported to $host.\"" "$LINENO" 5
|
||||
@@ -13491,7 +13495,7 @@
|
||||
as_fn_error $? "\"libffi has not been ported to $host.\"" "$LINENO" 5
|
||||
fi
|
||||
|
||||
- if test x$TARGET = xMIPS; then
|
||||
|
@ -35,7 +37,7 @@ diff -urN libffi.orig/configure libffi/configure
|
|||
MIPS_TRUE=
|
||||
MIPS_FALSE='#'
|
||||
else
|
||||
@@ -12422,6 +12425,12 @@
|
||||
@@ -14862,6 +14866,12 @@
|
||||
ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc"
|
||||
|
||||
|
||||
|
@ -48,44 +50,45 @@ diff -urN libffi.orig/configure libffi/configure
|
|||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
@@ -13521,6 +13530,8 @@
|
||||
@@ -16047,6 +16057,8 @@
|
||||
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
|
||||
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
|
||||
"libffi.pc") CONFIG_FILES="$CONFIG_FILES libffi.pc" ;;
|
||||
+ "include/ffi_common.h") CONFIG_LINKS="$CONFIG_LINKS include/ffi_common.h:include/ffi_common.h" ;;
|
||||
+ "fficonfig.py") CONFIG_FILES="$CONFIG_FILES fficonfig.py" ;;
|
||||
|
||||
*) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
diff -urN libffi.orig/configure.ac libffi/configure.ac
|
||||
--- libffi.orig/configure.ac 2010-03-19 18:27:44.988498585 +0100
|
||||
+++ libffi/configure.ac 2010-03-19 18:31:29.252505178 +0100
|
||||
diff -r -N -u libffi.orig/configure.ac libffi/configure.ac
|
||||
--- libffi.orig/configure.ac 2013-03-17 15:37:50.000000000 -0700
|
||||
+++ libffi/configure.ac 2013-03-18 15:11:11.392989136 -0700
|
||||
@@ -1,4 +1,7 @@
|
||||
dnl Process this with autoconf to create configure
|
||||
+#
|
||||
+# file from libffi - slightly patched for ctypes
|
||||
+# file from libffi - slightly patched for Python's ctypes
|
||||
+#
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
AC_PREREQ(2.68)
|
||||
|
||||
@@ -91,6 +94,9 @@
|
||||
i?86-*-solaris2.1[[0-9]]*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
@@ -146,6 +149,10 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+ i*86-*-nto-qnx*)
|
||||
+ TARGET=X86; TARGETDIR=x86
|
||||
+ ;;
|
||||
i?86-*-*)
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
+
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
@@ -108,12 +114,12 @@
|
||||
@@ -204,12 +211,12 @@
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.*)
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
+ TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
mips*-*-linux* | mips*-*-openbsd*)
|
||||
# Support 128-bit long double for NewABI.
|
||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
|
@ -93,16 +96,16 @@ diff -urN libffi.orig/configure.ac libffi/configure.ac
|
|||
;;
|
||||
|
||||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
@@ -170,7 +176,7 @@
|
||||
@@ -269,7 +276,7 @@
|
||||
AC_MSG_ERROR(["libffi has not been ported to $host."])
|
||||
fi
|
||||
|
||||
-AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
|
||||
+AM_CONDITIONAL(MIPS,[expr x$TARGET : 'xMIPS' > /dev/null])
|
||||
AM_CONDITIONAL(BFIN, test x$TARGET = xBFIN)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
AM_CONDITIONAL(X86, test x$TARGET = xX86)
|
||||
AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)
|
||||
@@ -401,4 +407,8 @@
|
||||
@@ -567,4 +574,8 @@
|
||||
|
||||
AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc)
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
.libs
|
||||
.deps
|
||||
*.o
|
||||
*.lo
|
||||
.dirstamp
|
||||
*.la
|
||||
Makefile
|
||||
config.log
|
||||
config.status
|
||||
*~
|
||||
fficonfig.h
|
||||
include/ffi.h
|
||||
include/ffitarget.h
|
||||
libffi.pc
|
||||
libtool
|
||||
stamp-h1
|
||||
libffi*gz
|
||||
autom4te.cache
|
||||
libffi.xcodeproj/xcuserdata
|
||||
libffi.xcodeproj/project.xcworkspace
|
||||
ios/
|
|
@ -0,0 +1,8 @@
|
|||
language: c
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
before_script: sudo apt-get install dejagnu
|
||||
|
||||
script: ./configure && make && make check
|
File diff suppressed because it is too large
Load Diff
|
@ -1,35 +1,6 @@
|
|||
2010-01-15 Anthony Green <green@redhat.com>
|
||||
2011-02-08 Andreas Tobler <andreast@fgznet.ch>
|
||||
|
||||
* README: Add notes on building with Microsoft Visual C++.
|
||||
|
||||
2010-01-15 Daniel Witte <dwitte@mozilla.com>
|
||||
|
||||
* msvcc.sh: New file.
|
||||
|
||||
* src/x86/win32.S: Port assembly routines to MSVC and #ifdef.
|
||||
* src/x86/ffi.c: Tweak function declaration and remove excess
|
||||
parens.
|
||||
* include/ffi.h.in: Add __declspec(align(8)) to typedef struct
|
||||
ffi_closure.
|
||||
|
||||
* src/x86/ffi.c: Merge ffi_call_SYSV and ffi_call_STDCALL into new
|
||||
function ffi_call_win32 on X86_WIN32.
|
||||
* src/x86/win32.S (ffi_call_SYSV): Rename to ffi_call_win32.
|
||||
(ffi_call_STDCALL): Remove.
|
||||
|
||||
* src/prep_cif.c (ffi_prep_cif): Move stack space allocation code
|
||||
to ffi_prep_cif_machdep for x86.
|
||||
* src/x86/ffi.c (ffi_prep_cif_machdep): To here.
|
||||
|
||||
2010-01-15 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* src/x86/ffitarget.h (ffi_abi): Check for __i386 and __amd64 for
|
||||
Sun Studio compiler compatibility.
|
||||
|
||||
2010-01-12 Conrad Irwin <conrad.irwin@gmail.com>
|
||||
|
||||
* doc/libffi.texi: Add closure example.
|
||||
* doc/libffi.info: Rebuilt.
|
||||
* testsuite/lib/libffi.exp: Tweak for stand-alone mode.
|
||||
|
||||
2009-12-25 Samuli Suominen <ssuominen@gentoo.org>
|
||||
|
||||
|
@ -603,8 +574,8 @@
|
|||
* Makefile.am, include/Makefile.am: Move headers to
|
||||
libffi_la_SOURCES for new automake.
|
||||
* Makefile.in, include/Makefile.in: Rebuilt.
|
||||
|
||||
* testsuite/lib/wrapper.exp: Copied from gcc tree to allow for
|
||||
|
||||
* testsuite/lib/wrapper.exp: Copied from gcc tree to allow for
|
||||
execution outside of gcc tree.
|
||||
* testsuite/lib/target-libpath.exp: Ditto.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
libffi - Copyright (c) 1996-2009 Anthony Green, Red Hat, Inc and others.
|
||||
libffi - Copyright (c) 1996-2012 Anthony Green, Red Hat, Inc and others.
|
||||
See source files for details.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
@ -9,8 +9,8 @@ distribute, sublicense, and/or sell copies of the Software, and to
|
|||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
|
|
|
@ -2,37 +2,50 @@
|
|||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = include testsuite man
|
||||
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
|
||||
src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
|
||||
src/avr32/ffi.c src/avr32/sysv.S src/avr32/ffitarget.h \
|
||||
src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
|
||||
src/ia64/ffi.c src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
||||
src/ia64/unix.S \
|
||||
src/mips/ffi.c src/mips/n32.S src/mips/o32.S \
|
||||
src/mips/ffitarget.h \
|
||||
src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h \
|
||||
src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
|
||||
src/powerpc/ffi.c src/powerpc/sysv.S \
|
||||
src/powerpc/linux64.S src/powerpc/linux64_closure.S \
|
||||
src/powerpc/ppc_closure.S src/powerpc/asm.h \
|
||||
src/powerpc/aix.S src/powerpc/darwin.S \
|
||||
src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
|
||||
src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
|
||||
src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
|
||||
src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \
|
||||
src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \
|
||||
src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
|
||||
src/sparc/ffi.c src/x86/darwin64.S \
|
||||
src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/win64.S \
|
||||
src/x86/darwin.S src/x86/freebsd.S \
|
||||
src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \
|
||||
src/pa/ffitarget.h src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
|
||||
src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \
|
||||
libtool-version ChangeLog.libffi m4/libtool.m4 \
|
||||
m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S \
|
||||
build-ios.sh src/alpha/ffi.c src/alpha/osf.S \
|
||||
src/alpha/ffitarget.h src/arm/ffi.c src/arm/sysv.S \
|
||||
src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S \
|
||||
src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S \
|
||||
src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h \
|
||||
src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c \
|
||||
src/mips/n32.S src/mips/o32.S src/metag/ffi.c \
|
||||
src/metag/ffitarget.h src/metag/sysv.S src/moxie/ffi.c \
|
||||
src/moxie/ffitarget.h src/moxie/eabi.S src/mips/ffitarget.h \
|
||||
src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h \
|
||||
src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
|
||||
src/microblaze/ffi.c src/microblaze/sysv.S \
|
||||
src/microblaze/ffitarget.h src/powerpc/ffi.c \
|
||||
src/powerpc/sysv.S src/powerpc/linux64.S \
|
||||
src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
|
||||
src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S \
|
||||
src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
|
||||
src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
|
||||
src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
|
||||
src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c \
|
||||
src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S \
|
||||
src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c \
|
||||
src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S \
|
||||
src/x86/win32.S src/x86/darwin.S src/x86/win64.S \
|
||||
src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S \
|
||||
src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c \
|
||||
src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c \
|
||||
src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S \
|
||||
src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c \
|
||||
src/tile/ffitarget.h src/tile/tile.S libtool-version \
|
||||
src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S \
|
||||
ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4 \
|
||||
m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
||||
m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh \
|
||||
generate-ios-source-and-headers.py \
|
||||
generate-osx-source-and-headers.py \
|
||||
libffi.xcodeproj/project.pbxproj src/arm/trampoline.S \
|
||||
libtool-ldflags
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
|
@ -69,6 +82,7 @@ AM_MAKEFLAGS = \
|
|||
"exec_prefix=$(exec_prefix)" \
|
||||
"infodir=$(infodir)" \
|
||||
"libdir=$(libdir)" \
|
||||
"mandir=$(mandir)" \
|
||||
"prefix=$(prefix)" \
|
||||
"AR=$(AR)" \
|
||||
"AS=$(AS)" \
|
||||
|
@ -79,14 +93,15 @@ AM_MAKEFLAGS = \
|
|||
"RANLIB=$(RANLIB)" \
|
||||
"DESTDIR=$(DESTDIR)"
|
||||
|
||||
# Subdir rules rely on $(FLAGS_TO_PASS)
|
||||
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
|
||||
|
||||
MAKEOVERRIDES=
|
||||
|
||||
ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
|
||||
|
||||
lib_LTLIBRARIES = libffi.la
|
||||
toolexeclib_LTLIBRARIES = libffi.la
|
||||
noinst_LTLIBRARIES = libffi_convenience.la
|
||||
|
||||
libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
|
||||
libffi_la_SOURCES = src/prep_cif.c src/types.c \
|
||||
src/raw_api.c src/java_raw_api.c src/closures.c
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
@ -94,9 +109,16 @@ pkgconfig_DATA = libffi.pc
|
|||
|
||||
nodist_libffi_la_SOURCES =
|
||||
|
||||
if FFI_DEBUG
|
||||
nodist_libffi_la_SOURCES += src/debug.c
|
||||
endif
|
||||
|
||||
if MIPS
|
||||
nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
|
||||
endif
|
||||
if BFIN
|
||||
nodist_libffi_la_SOURCES += src/bfin/ffi.c src/bfin/sysv.S
|
||||
endif
|
||||
if X86
|
||||
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
|
||||
endif
|
||||
|
@ -127,6 +149,12 @@ endif
|
|||
if M68K
|
||||
nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
|
||||
endif
|
||||
if MOXIE
|
||||
nodist_libffi_la_SOURCES += src/moxie/ffi.c src/moxie/eabi.S
|
||||
endif
|
||||
if MICROBLAZE
|
||||
nodist_libffi_la_SOURCES += src/microblaze/ffi.c src/microblaze/sysv.S
|
||||
endif
|
||||
if POWERPC
|
||||
nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
|
||||
endif
|
||||
|
@ -139,8 +167,14 @@ endif
|
|||
if POWERPC_FREEBSD
|
||||
nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
|
||||
endif
|
||||
if AARCH64
|
||||
nodist_libffi_la_SOURCES += src/aarch64/sysv.S src/aarch64/ffi.c
|
||||
endif
|
||||
if ARM
|
||||
nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
|
||||
if FFI_EXEC_TRAMPOLINE_TABLE
|
||||
nodist_libffi_la_SOURCES += src/arm/trampoline.S
|
||||
endif
|
||||
endif
|
||||
if AVR32
|
||||
nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
|
||||
|
@ -169,18 +203,23 @@ endif
|
|||
if PA_HPUX
|
||||
nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
|
||||
endif
|
||||
if TILE
|
||||
nodist_libffi_la_SOURCES += src/tile/tile.S src/tile/ffi.c
|
||||
endif
|
||||
if XTENSA
|
||||
nodist_libffi_la_SOURCES += src/xtensa/sysv.S src/xtensa/ffi.c
|
||||
endif
|
||||
if METAG
|
||||
nodist_libffi_la_SOURCES += src/metag/sysv.S src/metag/ffi.c
|
||||
endif
|
||||
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
|
||||
AM_CFLAGS = -Wall -g -fexceptions
|
||||
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
|
||||
|
||||
libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
||||
libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
|
||||
|
||||
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
|
||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
|
||||
# No install-html or install-pdf support in automake yet
|
||||
.PHONY: install-html install-pdf
|
||||
install-html:
|
||||
install-pdf:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
Status
|
||||
======
|
||||
|
||||
libffi-3.0.10 was released on XXXXXXXXXX, 2010. Check the libffi web
|
||||
libffi-3.0.13 was released on March 17, 2013. Check the libffi web
|
||||
page for updates: <URL:http://sourceware.org/libffi/>.
|
||||
|
||||
|
||||
|
@ -43,46 +43,70 @@ Libffi has been ported to many different platforms.
|
|||
For specific configuration details and testing status, please
|
||||
refer to the wiki page here:
|
||||
|
||||
http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.10
|
||||
http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.13
|
||||
|
||||
At the time of release, the following basic configurations have been
|
||||
tested:
|
||||
|
||||
|--------------+------------------|
|
||||
| Architecture | Operating System |
|
||||
|--------------+------------------|
|
||||
| Alpha | Linux |
|
||||
| Alpha | Tru64 |
|
||||
| ARM | Linux |
|
||||
| AVR32 | Linux |
|
||||
| HPPA | HPUX |
|
||||
| IA-64 | Linux |
|
||||
| MIPS | IRIX |
|
||||
| MIPS | Linux |
|
||||
| MIPS64 | Linux |
|
||||
| PowerPC | Linux |
|
||||
| PowerPC | Mac OSX |
|
||||
| PowerPC | FreeBSD |
|
||||
| PowerPC64 | Linux |
|
||||
| S390 | Linux |
|
||||
| S390X | Linux |
|
||||
| SPARC | Linux |
|
||||
| SPARC | Solaris |
|
||||
| SPARC64 | Linux |
|
||||
| SPARC64 | FreeBSD |
|
||||
| X86 | FreeBSD |
|
||||
| X86 | kFreeBSD |
|
||||
| X86 | Linux |
|
||||
| X86 | Mac OSX |
|
||||
| X86 | OpenBSD |
|
||||
| X86 | Solaris |
|
||||
| X86 | Windows/Cygwin |
|
||||
| X86 | Windows/MingW |
|
||||
| X86-64 | FreeBSD |
|
||||
| X86-64 | Linux |
|
||||
| X86-64 | OpenBSD |
|
||||
| X86-64 | Windows/MingW |
|
||||
|--------------+------------------|
|
||||
|-----------------+------------------+-------------------------|
|
||||
| Architecture | Operating System | Compiler |
|
||||
|-----------------+------------------+-------------------------|
|
||||
| AArch64 | Linux | GCC |
|
||||
| Alpha | Linux | GCC |
|
||||
| Alpha | Tru64 | GCC |
|
||||
| ARM | Linux | GCC |
|
||||
| ARM | iOS | GCC |
|
||||
| AVR32 | Linux | GCC |
|
||||
| Blackfin | uClinux | GCC |
|
||||
| HPPA | HPUX | GCC |
|
||||
| IA-64 | Linux | GCC |
|
||||
| M68K | FreeMiNT | GCC |
|
||||
| M68K | Linux | GCC |
|
||||
| M68K | RTEMS | GCC |
|
||||
| Meta | Linux | GCC |
|
||||
| MicroBlaze | Linux | GCC |
|
||||
| MIPS | IRIX | GCC |
|
||||
| MIPS | Linux | GCC |
|
||||
| MIPS | RTEMS | GCC |
|
||||
| MIPS64 | Linux | GCC |
|
||||
| Moxie | Bare metal | GCC
|
||||
| PowerPC 32-bit | AIX | IBM XL C |
|
||||
| PowerPC 64-bit | AIX | IBM XL C |
|
||||
| PowerPC | AMIGA | GCC |
|
||||
| PowerPC | Linux | GCC |
|
||||
| PowerPC | Mac OSX | GCC |
|
||||
| PowerPC | FreeBSD | GCC |
|
||||
| PowerPC 64-bit | FreeBSD | GCC |
|
||||
| PowerPC 64-bit | Linux | GCC |
|
||||
| S390 | Linux | GCC |
|
||||
| S390X | Linux | GCC |
|
||||
| SPARC | Linux | GCC |
|
||||
| SPARC | Solaris | GCC |
|
||||
| SPARC | Solaris | Oracle Solaris Studio C |
|
||||
| SPARC64 | Linux | GCC |
|
||||
| SPARC64 | FreeBSD | GCC |
|
||||
| SPARC64 | Solaris | Oracle Solaris Studio C |
|
||||
| TILE-Gx/TILEPro | Linux | GCC |
|
||||
| X86 | FreeBSD | GCC |
|
||||
| X86 | GNU HURD | GCC |
|
||||
| X86 | Interix | GCC |
|
||||
| X86 | kFreeBSD | GCC |
|
||||
| X86 | Linux | GCC |
|
||||
| X86 | Mac OSX | GCC |
|
||||
| X86 | OpenBSD | GCC |
|
||||
| X86 | OS/2 | GCC |
|
||||
| X86 | Solaris | GCC |
|
||||
| X86 | Solaris | Oracle Solaris Studio C |
|
||||
| X86 | Windows/Cygwin | GCC |
|
||||
| X86 | Windows/MingW | GCC |
|
||||
| X86-64 | FreeBSD | GCC |
|
||||
| X86-64 | Linux | GCC |
|
||||
| X86-64 | Linux/x32 | GCC |
|
||||
| X86-64 | OpenBSD | GCC |
|
||||
| X86-64 | Solaris | Oracle Solaris Studio C |
|
||||
| X86-64 | Windows/MingW | GCC |
|
||||
| Xtensa | Linux | GCC |
|
||||
|-----------------+------------------+-------------------------|
|
||||
|
||||
Please send additional platform test results to
|
||||
libffi-discuss@sourceware.org and feel free to update the wiki page
|
||||
|
@ -113,14 +137,20 @@ It's also possible to build libffi on Windows platforms with
|
|||
Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
|
||||
wrapper script during configuration like so:
|
||||
|
||||
path/to/configure --enable-shared --enable-static \
|
||||
CC=path/to/msvcc.sh LD=link \
|
||||
CPP=\"cl -nologo -EP\"
|
||||
path/to/configure CC=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\"
|
||||
|
||||
For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64".
|
||||
You may also need to specify --build appropriately. When building with MSVC
|
||||
under a MingW environment, you may need to remove the line in configure
|
||||
that sets 'fix_srcfile_path' to a 'cygpath' command. ('cygpath' is not
|
||||
present in MingW, and is not required when using MingW-style paths.)
|
||||
|
||||
For iOS builds, the 'libffi.xcodeproj' Xcode project is available.
|
||||
|
||||
Configure has many other options. Use "configure --help" to see them all.
|
||||
|
||||
Once configure has finished, type "make". Note that you must be using
|
||||
GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu.
|
||||
GNU make. You can ftp GNU make from ftp.gnu.org:/pub/gnu/make .
|
||||
|
||||
To ensure that libffi is working as advertised, type "make check".
|
||||
This will require that you have DejaGNU installed.
|
||||
|
@ -133,11 +163,53 @@ History
|
|||
|
||||
See the ChangeLog files for details.
|
||||
|
||||
3.0.10 ???-??-??
|
||||
Fix the N64 build on mips-sgi-irix6.5.
|
||||
Testsuite fixes for Tru64 Unix.
|
||||
3.0.13 Mar-17-13
|
||||
Add Meta support.
|
||||
Add missing Moxie bits.
|
||||
Fix stack alignment bug on 32-bit x86.
|
||||
Build fix for m68000 targets.
|
||||
Build fix for soft-float Power targets.
|
||||
Fix the install dir location for some platforms when building
|
||||
with GCC (OS X, Solaris).
|
||||
Fix Cygwin regression.
|
||||
|
||||
3.0.12 Feb-11-13
|
||||
Add Moxie support.
|
||||
Add AArch64 support.
|
||||
Add Blackfin support.
|
||||
Add TILE-Gx/TILEPro support.
|
||||
Add MicroBlaze support.
|
||||
Add Xtensa support.
|
||||
Add support for PaX enabled kernels with MPROTECT.
|
||||
Add support for native vendor compilers on
|
||||
Solaris and AIX.
|
||||
Work around LLVM/GCC interoperability issue on x86_64.
|
||||
|
||||
3.0.11 Apr-11-12
|
||||
Lots of build fixes.
|
||||
Add Amiga newer MacOS support.
|
||||
Add support for variadic functions (ffi_prep_cif_var).
|
||||
Add Linux/x32 support.
|
||||
Add thiscall, fastcall and MSVC cdecl support on Windows.
|
||||
Add Amiga and newer MacOS support.
|
||||
Add m68k FreeMiNT support.
|
||||
Integration with iOS' xcode build tools.
|
||||
Fix Octeon and MC68881 support.
|
||||
Fix code pessimizations.
|
||||
|
||||
3.0.10 Aug-23-11
|
||||
Add support for Apple's iOS.
|
||||
Add support for ARM VFP ABI.
|
||||
Add RTEMS support for MIPS and M68K.
|
||||
Fix instruction cache clearing problems on
|
||||
ARM and SPARC.
|
||||
Fix the N64 build on mips-sgi-irix6.5.
|
||||
Enable builds with Microsoft's compiler.
|
||||
Enable x86 builds with Sun's compiler.
|
||||
Enable x86 builds with Oracle's Solaris compiler.
|
||||
Fix support for calling code compiled with Oracle's Sparc
|
||||
Solaris compiler.
|
||||
Testsuite fixes for Tru64 Unix.
|
||||
Additional platform support.
|
||||
|
||||
3.0.9 Dec-31-09
|
||||
Add AVR32 and win64 ports. Add ARM softfp support.
|
||||
|
@ -282,15 +354,19 @@ Thorup.
|
|||
Major processor architecture ports were contributed by the following
|
||||
developers:
|
||||
|
||||
aarch64 Marcus Shawcroft, James Greenhalgh
|
||||
alpha Richard Henderson
|
||||
arm Raffaele Sena
|
||||
blackfin Alexandre Keunecke I. de Mendonca
|
||||
cris Simon Posnjak, Hans-Peter Nilsson
|
||||
frv Anthony Green
|
||||
ia64 Hans Boehm
|
||||
m32r Kazuhiro Inaoka
|
||||
m68k Andreas Schwab
|
||||
microblaze Nathan Rossi
|
||||
mips Anthony Green, Casey Marshall
|
||||
mips64 David Daney
|
||||
moxie Anthony Green
|
||||
pa Randolph Chung, Dave Anglin, Andreas Tobler
|
||||
powerpc Geoffrey Keating, Andreas Tobler,
|
||||
David Edelsohn, John Hornkvist
|
||||
|
@ -299,8 +375,10 @@ s390 Gerhard Tonn, Ulrich Weigand
|
|||
sh Kaz Kojima
|
||||
sh64 Kaz Kojima
|
||||
sparc Anthony Green, Gordon Irlam
|
||||
tile-gx/tilepro Walter Lee
|
||||
x86 Anthony Green, Jon Beniston
|
||||
x86-64 Bo Thorsen
|
||||
xtensa Chris Zankel
|
||||
|
||||
Jesper Skov and Andrew Haley both did more than their fair share of
|
||||
stepping through the code and tracking down bugs.
|
||||
|
@ -318,5 +396,6 @@ Alex Oliva solved the executable page problem for SElinux.
|
|||
The list above is almost certainly incomplete and inaccurate. I'm
|
||||
happy to make corrections or additions upon request.
|
||||
|
||||
If you have a problem, or have found a bug, please send a note to
|
||||
green@redhat.com.
|
||||
If you have a problem, or have found a bug, please send a note to the
|
||||
author at green@moxielogic.com, or the project mailing list at
|
||||
libffi-discuss@sourceware.org.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
|
||||
PLATFORM_IOS=/Developer/Platforms/iPhoneOS.platform/
|
||||
PLATFORM_IOS_SIM=/Developer/Platforms/iPhoneSimulator.platform/
|
||||
SDK_IOS_VERSION="4.2"
|
||||
MIN_IOS_VERSION="3.0"
|
||||
OUTPUT_DIR="universal-ios"
|
||||
|
||||
build_target () {
|
||||
local platform=$1
|
||||
local sdk=$2
|
||||
local arch=$3
|
||||
local triple=$4
|
||||
local builddir=$5
|
||||
|
||||
mkdir -p "${builddir}"
|
||||
pushd "${builddir}"
|
||||
export CC="${platform}"/Developer/usr/bin/gcc-4.2
|
||||
export CFLAGS="-arch ${arch} -isysroot ${sdk} -miphoneos-version-min=${MIN_IOS_VERSION}"
|
||||
../configure --host=${triple} && make
|
||||
popd
|
||||
}
|
||||
|
||||
# Build all targets
|
||||
build_target "${PLATFORM_IOS}" "${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/" armv6 arm-apple-darwin10 armv6-ios
|
||||
build_target "${PLATFORM_IOS}" "${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/" armv7 arm-apple-darwin10 armv7-ios
|
||||
build_target "${PLATFORM_IOS_SIM}" "${PLATFORM_IOS_SIM}/Developer/SDKs/iPhoneSimulator${SDK_IOS_VERSION}.sdk/" i386 i386-apple-darwin10 i386-ios-sim
|
||||
|
||||
# Create universal output directories
|
||||
mkdir -p "${OUTPUT_DIR}"
|
||||
mkdir -p "${OUTPUT_DIR}/include"
|
||||
mkdir -p "${OUTPUT_DIR}/include/armv6"
|
||||
mkdir -p "${OUTPUT_DIR}/include/armv7"
|
||||
mkdir -p "${OUTPUT_DIR}/include/i386"
|
||||
|
||||
# Create the universal binary
|
||||
lipo -create armv6-ios/.libs/libffi.a armv7-ios/.libs/libffi.a i386-ios-sim/.libs/libffi.a -output "${OUTPUT_DIR}/libffi.a"
|
||||
|
||||
# Copy in the headers
|
||||
copy_headers () {
|
||||
local src=$1
|
||||
local dest=$2
|
||||
|
||||
# Fix non-relative header reference
|
||||
sed 's/<ffitarget.h>/"ffitarget.h"/' < "${src}/include/ffi.h" > "${dest}/ffi.h"
|
||||
cp "${src}/include/ffitarget.h" "${dest}"
|
||||
}
|
||||
|
||||
copy_headers armv6-ios "${OUTPUT_DIR}/include/armv6"
|
||||
copy_headers armv7-ios "${OUTPUT_DIR}/include/armv7"
|
||||
copy_headers i386-ios-sim "${OUTPUT_DIR}/include/i386"
|
||||
|
||||
# Create top-level header
|
||||
(
|
||||
cat << EOF
|
||||
#ifdef __arm__
|
||||
#include <arm/arch.h>
|
||||
#ifdef _ARM_ARCH_6
|
||||
#include "include/armv6/ffi.h"
|
||||
#elif _ARM_ARCH_7
|
||||
#include "include/armv7/ffi.h"
|
||||
#endif
|
||||
#elif defined(__i386__)
|
||||
#include "include/i386/ffi.h"
|
||||
#endif
|
||||
EOF
|
||||
) > "${OUTPUT_DIR}/ffi.h"
|
|
@ -1,9 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
scriptversion=2009-10-06.20; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -17,8 +18,7 @@ scriptversion=2005-05-14.22
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -103,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then
|
|||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# Note: use `[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
|
@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
|
|||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
|
@ -138,5 +138,6 @@ exit $ret
|
|||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012, 2013 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2009-11-19'
|
||||
timestamp='2012-12-29'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
|
@ -17,26 +17,22 @@ timestamp='2009-11-19'
|
|||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Originally written by Per Bothner. Please send patches (context
|
||||
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
||||
# entry.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
# Originally written by Per Bothner.
|
||||
#
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
#
|
||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
|
@ -56,8 +52,9 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
|
||||
2012, 2013 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -144,7 +141,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# NetBSD (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
|
@ -180,7 +177,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
os=netbsd
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
|
@ -201,6 +198,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:OpenBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
|
@ -223,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
;;
|
||||
*5.*)
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
;;
|
||||
esac
|
||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||
|
@ -269,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit ;;
|
||||
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
||||
exitcode=$?
|
||||
trap '' 0
|
||||
exit $exitcode ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
|
@ -295,12 +299,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
echo s390-ibm-zvmoe
|
||||
exit ;;
|
||||
*:OS400:*:*)
|
||||
echo powerpc-ibm-os400
|
||||
echo powerpc-ibm-os400
|
||||
exit ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
arm:riscos:*:*|arm:RISCOS:*:*)
|
||||
arm*:riscos:*:*|arm*:RISCOS:*:*)
|
||||
echo arm-unknown-riscos
|
||||
exit ;;
|
||||
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
||||
|
@ -333,6 +337,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
|
||||
echo i386-pc-auroraux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
eval $set_cc_for_build
|
||||
SUN_ARCH="i386"
|
||||
|
@ -391,23 +398,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# MiNT. But MiNT is downward compatible to TOS, so this should
|
||||
# be no problem.
|
||||
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
exit ;;
|
||||
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
m68k:machten:*:*)
|
||||
echo m68k-apple-machten${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -477,8 +484,8 @@ EOF
|
|||
echo m88k-motorola-sysv3
|
||||
exit ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
|
@ -491,7 +498,7 @@ EOF
|
|||
else
|
||||
echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit ;;
|
||||
|
@ -548,7 +555,7 @@ EOF
|
|||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit ;;
|
||||
*:AIX:*:[456])
|
||||
*:AIX:*:[4567])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
|
@ -591,52 +598,52 @@ EOF
|
|||
9000/[678][0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
|
@ -727,22 +734,22 @@ EOF
|
|||
exit ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit ;;
|
||||
|
@ -766,14 +773,14 @@ EOF
|
|||
exit ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
5000:UNIX_System_V:4.*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
|
@ -785,30 +792,35 @@ EOF
|
|||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case ${UNAME_PROCESSOR} in
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
*:MINGW64*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw64
|
||||
exit ;;
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:MSYS*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msys
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
# uname -m includes "-pc" on this system.
|
||||
echo ${UNAME_MACHINE}-mingw32
|
||||
# uname -m includes "-pc" on this system.
|
||||
echo ${UNAME_MACHINE}-mingw32
|
||||
exit ;;
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
*:Interix*:*)
|
||||
case ${UNAME_MACHINE} in
|
||||
case ${UNAME_MACHINE} in
|
||||
x86)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -854,6 +866,13 @@ EOF
|
|||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
|
@ -863,7 +882,7 @@ EOF
|
|||
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
|
@ -875,20 +894,29 @@ EOF
|
|||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo crisv32-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo frv-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
hexagon:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
LIBC=gnu
|
||||
|
@ -930,7 +958,7 @@ EOF
|
|||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo or32-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-gnu
|
||||
|
@ -956,7 +984,7 @@ EOF
|
|||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
|
@ -964,14 +992,17 @@ EOF
|
|||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
tile*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
|
@ -980,11 +1011,11 @@ EOF
|
|||
echo i386-sequent-sysv4
|
||||
exit ;;
|
||||
i*86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# I just have to hope. -- rms.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit ;;
|
||||
i*86:OS/2:*:*)
|
||||
|
@ -1016,7 +1047,7 @@ EOF
|
|||
fi
|
||||
exit ;;
|
||||
i*86:*:5:[678]*)
|
||||
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
||||
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
||||
case `/bin/uname -X | grep "^Machine"` in
|
||||
*486*) UNAME_MACHINE=i486 ;;
|
||||
*Pentium) UNAME_MACHINE=i586 ;;
|
||||
|
@ -1044,13 +1075,13 @@ EOF
|
|||
exit ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# Note: whatever this is, it MUST be the same as what config.sub
|
||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||
# this is a cross-build.
|
||||
echo i586-pc-msdosdjgpp
|
||||
exit ;;
|
||||
exit ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-pc-mach3
|
||||
exit ;;
|
||||
|
@ -1085,8 +1116,8 @@ EOF
|
|||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
|
||||
OS_REL='.3'
|
||||
test -r /etc/.relid \
|
||||
|
@ -1129,10 +1160,10 @@ EOF
|
|||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit ;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit ;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
|
@ -1158,11 +1189,11 @@ EOF
|
|||
exit ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||
echo powerpc-be-beos
|
||||
exit ;;
|
||||
|
@ -1175,6 +1206,9 @@ EOF
|
|||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
echo i586-pc-haiku
|
||||
exit ;;
|
||||
x86_64:Haiku:*:*)
|
||||
echo x86_64-unknown-haiku
|
||||
exit ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -1227,7 +1261,10 @@ EOF
|
|||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit ;;
|
||||
NSE-?:NONSTOP_KERNEL:*:*)
|
||||
NEO-?:NONSTOP_KERNEL:*:*)
|
||||
echo neo-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSE-*:NONSTOP_KERNEL:*:*)
|
||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSR-?:NONSTOP_KERNEL:*:*)
|
||||
|
@ -1272,13 +1309,13 @@ EOF
|
|||
echo pdp10-unknown-its
|
||||
exit ;;
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:DragonFly:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit ;;
|
||||
*:*VMS:*:*)
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
case "${UNAME_MACHINE}" in
|
||||
A*) echo alpha-dec-vms ; exit ;;
|
||||
I*) echo ia64-dec-vms ; exit ;;
|
||||
|
@ -1296,11 +1333,11 @@ EOF
|
|||
i*86:AROS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-aros
|
||||
exit ;;
|
||||
x86_64:VMkernel:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-esx
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
|
@ -1318,11 +1355,11 @@ main ()
|
|||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,38 +1,33 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012, 2013 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2009-11-07'
|
||||
timestamp='2012-12-29'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted GNU ChangeLog entry.
|
||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
|
@ -75,8 +70,9 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
|
||||
2012, 2013 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -123,13 +119,18 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
android-linux)
|
||||
os=-linux-android
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
|
@ -152,12 +153,12 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray | -microblaze)
|
||||
-apple | -axis | -knuth | -cray | -microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-bluegene*)
|
||||
os=-cnk
|
||||
-bluegene*)
|
||||
os=-cnk
|
||||
;;
|
||||
-sim | -cisco | -oki | -wec | -winbond)
|
||||
os=
|
||||
|
@ -173,10 +174,10 @@ case $os in
|
|||
os=-chorusos
|
||||
basic_machine=$1
|
||||
;;
|
||||
-chorusrdb)
|
||||
os=-chorusrdb
|
||||
-chorusrdb)
|
||||
os=-chorusrdb
|
||||
basic_machine=$1
|
||||
;;
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
|
@ -221,6 +222,12 @@ case $os in
|
|||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*178)
|
||||
os=-lynxos178
|
||||
;;
|
||||
-lynx*5)
|
||||
os=-lynxos5
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
;;
|
||||
|
@ -245,20 +252,27 @@ case $basic_machine in
|
|||
# Some are omitted here because they have special meanings below.
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| aarch64 | aarch64_be \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| arc \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
|
@ -281,29 +295,39 @@ case $basic_machine in
|
|||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| open8 \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pyramid \
|
||||
| rx \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| spu \
|
||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| we32k \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
|
||||
# Motorola 68HC11/12.
|
||||
c54x)
|
||||
basic_machine=tic54x-unknown
|
||||
;;
|
||||
c55x)
|
||||
basic_machine=tic55x-unknown
|
||||
;;
|
||||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
|
@ -313,6 +337,21 @@ case $basic_machine in
|
|||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
strongarm | thumb | xscale)
|
||||
basic_machine=arm-unknown
|
||||
;;
|
||||
xgate)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
xscaleeb)
|
||||
basic_machine=armeb-unknown
|
||||
;;
|
||||
|
||||
xscaleel)
|
||||
basic_machine=armel-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
|
@ -327,25 +366,30 @@ case $basic_machine in
|
|||
# Recognize the basic CPU types with company name.
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| microblaze-* | microblazeel-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
|
@ -367,25 +411,29 @@ case $basic_machine in
|
|||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* | rx-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile*-* \
|
||||
| tron-* \
|
||||
| ubicom32-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-* | z80-*)
|
||||
|
@ -410,7 +458,7 @@ case $basic_machine in
|
|||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
abacus)
|
||||
abacus)
|
||||
basic_machine=abacus-unknown
|
||||
;;
|
||||
adobe68k)
|
||||
|
@ -480,11 +528,20 @@ case $basic_machine in
|
|||
basic_machine=powerpc-ibm
|
||||
os=-cnk
|
||||
;;
|
||||
c54x-*)
|
||||
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c55x-*)
|
||||
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c6x-*)
|
||||
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cegcc)
|
||||
cegcc)
|
||||
basic_machine=arm-unknown
|
||||
os=-cegcc
|
||||
;;
|
||||
|
@ -516,7 +573,7 @@ case $basic_machine in
|
|||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16)
|
||||
cr16 | cr16-*)
|
||||
basic_machine=cr16-unknown
|
||||
os=-elf
|
||||
;;
|
||||
|
@ -674,7 +731,6 @@ case $basic_machine in
|
|||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i*86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
|
@ -732,9 +788,13 @@ case $basic_machine in
|
|||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze)
|
||||
microblaze*)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-mingw64
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
|
@ -771,10 +831,18 @@ case $basic_machine in
|
|||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i386-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
nacl)
|
||||
basic_machine=le32-unknown
|
||||
os=-nacl
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
|
@ -839,6 +907,12 @@ case $basic_machine in
|
|||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
neo-tandem)
|
||||
basic_machine=neo-tandem
|
||||
;;
|
||||
nse-tandem)
|
||||
basic_machine=nse-tandem
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
|
@ -921,9 +995,10 @@ case $basic_machine in
|
|||
;;
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
ppc-* | ppcbe-*)
|
||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
|
@ -948,7 +1023,11 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
@ -1017,6 +1096,9 @@ case $basic_machine in
|
|||
basic_machine=i860-stratus
|
||||
os=-sysv4
|
||||
;;
|
||||
strongarm-* | thumb-*)
|
||||
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
|
@ -1073,20 +1155,8 @@ case $basic_machine in
|
|||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic55x | c55x*)
|
||||
basic_machine=tic55x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic6x | c6x*)
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
|
@ -1156,6 +1226,9 @@ case $basic_machine in
|
|||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
xscale-* | xscalee[bl]-*)
|
||||
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
|
@ -1253,9 +1326,12 @@ esac
|
|||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-auroraux)
|
||||
os=-auroraux
|
||||
;;
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
|
@ -1277,21 +1353,22 @@ case $os in
|
|||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -kopensolaris* \
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
|
@ -1338,7 +1415,7 @@ case $os in
|
|||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-os400*)
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-wince*)
|
||||
|
@ -1387,7 +1464,7 @@ case $os in
|
|||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-tpf*)
|
||||
-tpf*)
|
||||
os=-tpf
|
||||
;;
|
||||
-triton*)
|
||||
|
@ -1432,6 +1509,8 @@ case $os in
|
|||
-dicos*)
|
||||
os=-dicos
|
||||
;;
|
||||
-nacl*)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
@ -1454,10 +1533,10 @@ else
|
|||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
|
@ -1469,8 +1548,20 @@ case $basic_machine in
|
|||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
tic54x-*)
|
||||
os=-coff
|
||||
;;
|
||||
tic55x-*)
|
||||
os=-coff
|
||||
;;
|
||||
tic6x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
|
@ -1490,14 +1581,11 @@ case $basic_machine in
|
|||
;;
|
||||
m68000-sun)
|
||||
os=-sunos3
|
||||
# This also exists in the configure program, but was not the
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mep-*)
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
|
@ -1524,7 +1612,7 @@ case $basic_machine in
|
|||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-knuth)
|
||||
*-knuth)
|
||||
os=-mmixware
|
||||
;;
|
||||
*-wec)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,11 @@
|
|||
dnl Process this with autoconf to create configure
|
||||
#
|
||||
# file from libffi - slightly patched for ctypes
|
||||
# file from libffi - slightly patched for Python's ctypes
|
||||
#
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
AC_PREREQ(2.68)
|
||||
|
||||
AC_INIT([libffi], [3.0.10rc0], [http://gcc.gnu.org/bugs.html])
|
||||
AC_INIT([libffi], [3.0.13], [http://github.com/atgreen/libffi/issues])
|
||||
AC_CONFIG_HEADERS([fficonfig.h])
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
@ -13,18 +13,24 @@ target_alias=${target_alias-$host_alias}
|
|||
|
||||
. ${srcdir}/configure.host
|
||||
|
||||
AX_ENABLE_BUILDDIR
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
# The same as in boehm-gc and libstdc++. Have to borrow it from there.
|
||||
# We must force CC to /not/ be precious variables; otherwise
|
||||
# the wrong, non-multilib-adjusted value will be used in multilibs.
|
||||
# As a side effect, we have to subst CFLAGS ourselves.
|
||||
# Also save and restore CFLAGS, since AC_PROG_CC will come up with
|
||||
# defaults of its own if none are provided.
|
||||
|
||||
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
||||
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
||||
save_CFLAGS=$CFLAGS
|
||||
AC_PROG_CC
|
||||
CFLAGS=$save_CFLAGS
|
||||
m4_undefine([_AC_ARG_VAR_PRECIOUS])
|
||||
m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
||||
m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
|
@ -33,6 +39,26 @@ AM_PROG_CC_C_O
|
|||
AC_PROG_LIBTOOL
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Test for 64-bit build.
|
||||
AC_CHECK_SIZEOF([size_t])
|
||||
|
||||
AX_COMPILER_VENDOR
|
||||
AX_CC_MAXOPT
|
||||
# The AX_CFLAGS_WARN_ALL macro doesn't currently work for sunpro
|
||||
# compiler.
|
||||
if test "$ax_cv_c_compiler_vendor" != "sun"; then
|
||||
AX_CFLAGS_WARN_ALL
|
||||
fi
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -fexceptions"
|
||||
touch local.exp
|
||||
else
|
||||
cat > local.exp <<EOF
|
||||
set CC_FOR_TARGET "$CC"
|
||||
EOF
|
||||
fi
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_CHECK_HEADERS(sys/mman.h)
|
||||
|
@ -44,9 +70,13 @@ AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
|
|||
|
||||
TARGETDIR="unknown"
|
||||
case "$host" in
|
||||
aarch64*-*-*)
|
||||
TARGET=AARCH64; TARGETDIR=aarch64
|
||||
;;
|
||||
|
||||
alpha*-*-*)
|
||||
TARGET=ALPHA; TARGETDIR=alpha;
|
||||
# Support 128-bit long double, changable via command-line switch.
|
||||
# Support 128-bit long double, changeable via command-line switch.
|
||||
HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)'
|
||||
;;
|
||||
|
||||
|
@ -58,6 +88,10 @@ case "$host" in
|
|||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
amd64-*-freebsd*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
amd64-*-freebsd*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
|
@ -66,6 +100,10 @@ case "$host" in
|
|||
TARGET=AVR32; TARGETDIR=avr32
|
||||
;;
|
||||
|
||||
bfin*)
|
||||
TARGET=BFIN; TARGETDIR=bfin
|
||||
;;
|
||||
|
||||
cris-*-*)
|
||||
TARGET=LIBFFI_CRIS; TARGETDIR=cris
|
||||
;;
|
||||
|
@ -74,7 +112,7 @@ case "$host" in
|
|||
TARGET=FRV; TARGETDIR=frv
|
||||
;;
|
||||
|
||||
hppa*-*-linux* | parisc*-*-linux*)
|
||||
hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*)
|
||||
TARGET=PA_LINUX; TARGETDIR=pa
|
||||
;;
|
||||
hppa*64-*-hpux*)
|
||||
|
@ -87,22 +125,65 @@ case "$host" in
|
|||
i?86-*-freebsd* | i?86-*-openbsd*)
|
||||
TARGET=X86_FREEBSD; TARGETDIR=x86
|
||||
;;
|
||||
i?86-win32* | i?86-*-cygwin* | i?86-*-mingw*)
|
||||
i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
|
||||
TARGET=X86_WIN32; TARGETDIR=x86
|
||||
# All mingw/cygwin/win32 builds require this for sharedlib
|
||||
AM_LTLDFLAGS="-no-undefined"
|
||||
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
|
||||
# We must also check with_cross_host to decide if this is a native
|
||||
# or cross-build and select where to install dlls appropriately.
|
||||
if test -n "$with_cross_host" &&
|
||||
test x"$with_cross_host" != x"no"; then
|
||||
AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
|
||||
else
|
||||
AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
|
||||
fi
|
||||
;;
|
||||
i?86-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
i?86-*-solaris2.1[[0-9]]*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
TARGETDIR=x86
|
||||
if test $ac_cv_sizeof_size_t = 4; then
|
||||
TARGET=X86;
|
||||
else
|
||||
TARGET=X86_64;
|
||||
fi
|
||||
;;
|
||||
|
||||
i*86-*-nto-qnx*)
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
;;
|
||||
i?86-*-*)
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
x86_64-*-cygwin* | x86_64-*-mingw*)
|
||||
TARGET=X86_WIN64; TARGETDIR=x86
|
||||
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
|
||||
# We must also check with_cross_host to decide if this is a native
|
||||
# or cross-build and select where to install dlls appropriately.
|
||||
if test -n "$with_cross_host" &&
|
||||
test x"$with_cross_host" != x"no"; then
|
||||
AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
|
||||
else
|
||||
AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
|
||||
fi
|
||||
;;
|
||||
|
||||
i?86-*-* | x86_64-*-*)
|
||||
TARGETDIR=x86
|
||||
if test $ac_cv_sizeof_size_t = 4; then
|
||||
case "$host" in
|
||||
*-gnux32)
|
||||
TARGET=X86_64
|
||||
;;
|
||||
*)
|
||||
TARGET=X86
|
||||
;;
|
||||
esac
|
||||
else
|
||||
TARGET=X86_64;
|
||||
fi
|
||||
;;
|
||||
|
||||
ia64*-*-*)
|
||||
|
@ -117,10 +198,22 @@ case "$host" in
|
|||
TARGET=M68K; TARGETDIR=m68k
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.*)
|
||||
microblaze*-*-*)
|
||||
TARGET=MICROBLAZE; TARGETDIR=microblaze
|
||||
;;
|
||||
|
||||
moxie-*-*)
|
||||
TARGET=MOXIE; TARGETDIR=moxie
|
||||
;;
|
||||
|
||||
metag-*-*)
|
||||
TARGET=METAG; TARGETDIR=metag
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
mips*-*-linux* | mips*-*-openbsd*)
|
||||
# Support 128-bit long double for NewABI.
|
||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||
TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
|
@ -129,18 +222,24 @@ case "$host" in
|
|||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc-*-amigaos*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc-*-beos*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc-*-darwin*)
|
||||
powerpc-*-darwin* | powerpc64-*-darwin*)
|
||||
TARGET=POWERPC_DARWIN; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc-*-aix* | rs6000-*-aix*)
|
||||
TARGET=POWERPC_AIX; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc-*-freebsd*)
|
||||
powerpc-*-freebsd* | powerpc-*-openbsd*)
|
||||
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc64-*-freebsd*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
;;
|
||||
powerpc*-*-rtems*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
;;
|
||||
|
@ -160,17 +259,14 @@ case "$host" in
|
|||
TARGET=SPARC; TARGETDIR=sparc
|
||||
;;
|
||||
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
tile*-*)
|
||||
TARGET=TILE; TARGETDIR=tile
|
||||
;;
|
||||
|
||||
xtensa*-*)
|
||||
TARGET=XTENSA; TARGETDIR=xtensa
|
||||
;;
|
||||
|
||||
x86_64-*-cygwin* | x86_64-*-mingw*)
|
||||
TARGET=X86_WIN64; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
x86_64-*-*)
|
||||
TARGET=X86_64; TARGETDIR=x86
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(AM_RUNTESTFLAGS)
|
||||
|
@ -181,6 +277,7 @@ if test $TARGETDIR = unknown; then
|
|||
fi
|
||||
|
||||
AM_CONDITIONAL(MIPS,[expr x$TARGET : 'xMIPS' > /dev/null])
|
||||
AM_CONDITIONAL(BFIN, test x$TARGET = xBFIN)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
AM_CONDITIONAL(X86, test x$TARGET = xX86)
|
||||
AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)
|
||||
|
@ -191,10 +288,14 @@ AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
|
|||
AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
|
||||
AM_CONDITIONAL(M32R, test x$TARGET = xM32R)
|
||||
AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
|
||||
AM_CONDITIONAL(MICROBLAZE, test x$TARGET = xMICROBLAZE)
|
||||
AM_CONDITIONAL(METAG, test x$TARGET = xMETAG)
|
||||
AM_CONDITIONAL(MOXIE, test x$TARGET = xMOXIE)
|
||||
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
|
||||
AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
|
||||
AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
|
||||
AM_CONDITIONAL(POWERPC_FREEBSD, test x$TARGET = xPOWERPC_FREEBSD)
|
||||
AM_CONDITIONAL(AARCH64, test x$TARGET = xAARCH64)
|
||||
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
|
||||
AM_CONDITIONAL(AVR32, test x$TARGET = xAVR32)
|
||||
AM_CONDITIONAL(LIBFFI_CRIS, test x$TARGET = xLIBFFI_CRIS)
|
||||
|
@ -206,6 +307,8 @@ AM_CONDITIONAL(SH64, test x$TARGET = xSH64)
|
|||
AM_CONDITIONAL(PA_LINUX, test x$TARGET = xPA_LINUX)
|
||||
AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX)
|
||||
AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX)
|
||||
AM_CONDITIONAL(TILE, test x$TARGET = xTILE)
|
||||
AM_CONDITIONAL(XTENSA, test x$TARGET = xXTENSA)
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_FUNCS(memcpy)
|
||||
|
@ -228,17 +331,7 @@ AC_SUBST(HAVE_LONG_DOUBLE)
|
|||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_CACHE_CHECK([assembler .cfi pseudo-op support],
|
||||
libffi_cv_as_cfi_pseudo_op, [
|
||||
libffi_cv_as_cfi_pseudo_op=unknown
|
||||
AC_TRY_COMPILE([asm (".cfi_startproc\n\t.cfi_endproc");],,
|
||||
[libffi_cv_as_cfi_pseudo_op=yes],
|
||||
[libffi_cv_as_cfi_pseudo_op=no])
|
||||
])
|
||||
if test "x$libffi_cv_as_cfi_pseudo_op" = xyes; then
|
||||
AC_DEFINE(HAVE_AS_CFI_PSEUDO_OP, 1,
|
||||
[Define if your assembler supports .cfi_* directives.])
|
||||
fi
|
||||
GCC_AS_CFI_PSEUDO_OP
|
||||
|
||||
if test x$TARGET = xSPARC; then
|
||||
AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],
|
||||
|
@ -261,7 +354,7 @@ if test x$TARGET = xSPARC; then
|
|||
libffi_cv_as_register_pseudo_op, [
|
||||
libffi_cv_as_register_pseudo_op=unknown
|
||||
# Check if we have .register
|
||||
AC_TRY_COMPILE([asm (".register %g2, #scratch");],,
|
||||
AC_TRY_COMPILE(,[asm (".register %g2, #scratch");],
|
||||
[libffi_cv_as_register_pseudo_op=yes],
|
||||
[libffi_cv_as_register_pseudo_op=no])
|
||||
])
|
||||
|
@ -284,54 +377,122 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
|
|||
AC_DEFINE(HAVE_AS_X86_PCREL, 1,
|
||||
[Define if your assembler supports PC relative relocs.])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([assembler .ascii pseudo-op support],
|
||||
libffi_cv_as_ascii_pseudo_op, [
|
||||
libffi_cv_as_ascii_pseudo_op=unknown
|
||||
# Check if we have .ascii
|
||||
AC_TRY_COMPILE(,[asm (".ascii \\"string\\"");],
|
||||
[libffi_cv_as_ascii_pseudo_op=yes],
|
||||
[libffi_cv_as_ascii_pseudo_op=no])
|
||||
])
|
||||
if test "x$libffi_cv_as_ascii_pseudo_op" = xyes; then
|
||||
AC_DEFINE(HAVE_AS_ASCII_PSEUDO_OP, 1,
|
||||
[Define if your assembler supports .ascii.])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([assembler .string pseudo-op support],
|
||||
libffi_cv_as_string_pseudo_op, [
|
||||
libffi_cv_as_string_pseudo_op=unknown
|
||||
# Check if we have .string
|
||||
AC_TRY_COMPILE(,[asm (".string \\"string\\"");],
|
||||
[libffi_cv_as_string_pseudo_op=yes],
|
||||
[libffi_cv_as_string_pseudo_op=no])
|
||||
])
|
||||
if test "x$libffi_cv_as_string_pseudo_op" = xyes; then
|
||||
AC_DEFINE(HAVE_AS_STRING_PSEUDO_OP, 1,
|
||||
[Define if your assembler supports .string.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC.
|
||||
AC_ARG_ENABLE(pax_emutramp,
|
||||
[ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC],
|
||||
if test "$enable_pax_emutramp" = "yes"; then
|
||||
AC_DEFINE(FFI_MMAP_EXEC_EMUTRAMP_PAX, 1,
|
||||
[Define this if you want to enable pax emulated trampolines])
|
||||
fi)
|
||||
|
||||
if test x$TARGET = xX86_WIN64; then
|
||||
LT_SYS_SYMBOL_USCORE
|
||||
if test "x$sys_symbol_underscore" = xyes; then
|
||||
AC_DEFINE(SYMBOL_UNDERSCORE, 1, [Define if symbols are underscored.])
|
||||
fi
|
||||
fi
|
||||
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=0
|
||||
case "$target" in
|
||||
*-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
*arm*-apple-darwin*)
|
||||
FFI_EXEC_TRAMPOLINE_TABLE=1
|
||||
AC_DEFINE(FFI_EXEC_TRAMPOLINE_TABLE, 1,
|
||||
[Cannot use PROT_EXEC on this target, so, we revert to
|
||||
alternative means])
|
||||
;;
|
||||
*-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
|
||||
[Cannot use malloc on this target, so, we revert to
|
||||
alternative means])
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1)
|
||||
AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE)
|
||||
|
||||
AC_CACHE_CHECK([whether .eh_frame section should be read-only],
|
||||
libffi_cv_ro_eh_frame, [
|
||||
libffi_cv_ro_eh_frame=no
|
||||
echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
|
||||
if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
|
||||
if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
|
||||
libffi_cv_ro_eh_frame=yes
|
||||
elif grep '.section.*eh_frame.*#alloc' conftest.c \
|
||||
| grep -v '#write' > /dev/null; then
|
||||
libffi_cv_ro_eh_frame=yes
|
||||
fi
|
||||
if test x$TARGET = xX86_64; then
|
||||
AC_CACHE_CHECK([assembler supports unwind section type],
|
||||
libffi_cv_as_x86_64_unwind_section_type, [
|
||||
libffi_cv_as_x86_64_unwind_section_type=yes
|
||||
echo '.section .eh_frame,"a",@unwind' > conftest.s
|
||||
if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
|
||||
libffi_cv_as_x86_64_unwind_section_type=no
|
||||
fi
|
||||
rm -f conftest.*
|
||||
])
|
||||
if test "x$libffi_cv_ro_eh_frame" = xyes; then
|
||||
AC_DEFINE(HAVE_RO_EH_FRAME, 1,
|
||||
[Define if .eh_frame sections should be read-only.])
|
||||
AC_DEFINE(EH_FRAME_FLAGS, "a",
|
||||
[Define to the flags needed for the .section .eh_frame directive.])
|
||||
else
|
||||
AC_DEFINE(EH_FRAME_FLAGS, "aw",
|
||||
[Define to the flags needed for the .section .eh_frame directive.])
|
||||
])
|
||||
if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
|
||||
AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1,
|
||||
[Define if your assembler supports unwind section type.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for __attribute__((visibility("hidden")))],
|
||||
libffi_cv_hidden_visibility_attribute, [
|
||||
echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1; }' > conftest.c
|
||||
libffi_cv_hidden_visibility_attribute=no
|
||||
if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
if grep '\.hidden.*foo' conftest.s >/dev/null; then
|
||||
libffi_cv_hidden_visibility_attribute=yes
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.*
|
||||
])
|
||||
if test $libffi_cv_hidden_visibility_attribute = yes; then
|
||||
AC_DEFINE(HAVE_HIDDEN_VISIBILITY_ATTRIBUTE, 1,
|
||||
[Define if __attribute__((visibility("hidden"))) is supported.])
|
||||
if test "x$GCC" = "xyes"; then
|
||||
AC_CACHE_CHECK([whether .eh_frame section should be read-only],
|
||||
libffi_cv_ro_eh_frame, [
|
||||
libffi_cv_ro_eh_frame=no
|
||||
echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
|
||||
if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then
|
||||
objdump -h conftest.o > conftest.dump 2>&1
|
||||
libffi_eh_frame_line=`grep -n eh_frame conftest.dump | cut -d: -f 1`
|
||||
libffi_test_line=`expr $libffi_eh_frame_line + 1`p
|
||||
sed -n $libffi_test_line conftest.dump > conftest.line
|
||||
if grep READONLY conftest.line > /dev/null; then
|
||||
libffi_cv_ro_eh_frame=yes
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.*
|
||||
])
|
||||
if test "x$libffi_cv_ro_eh_frame" = xyes; then
|
||||
AC_DEFINE(HAVE_RO_EH_FRAME, 1,
|
||||
[Define if .eh_frame sections should be read-only.])
|
||||
AC_DEFINE(EH_FRAME_FLAGS, "a",
|
||||
[Define to the flags needed for the .section .eh_frame directive. ])
|
||||
else
|
||||
AC_DEFINE(EH_FRAME_FLAGS, "aw",
|
||||
[Define to the flags needed for the .section .eh_frame directive. ])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for __attribute__((visibility("hidden")))],
|
||||
libffi_cv_hidden_visibility_attribute, [
|
||||
echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1 ; }' > conftest.c
|
||||
libffi_cv_hidden_visibility_attribute=no
|
||||
if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
if grep '\.hidden.*foo' conftest.s >/dev/null; then
|
||||
libffi_cv_hidden_visibility_attribute=yes
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.*
|
||||
])
|
||||
if test $libffi_cv_hidden_visibility_attribute = yes; then
|
||||
AC_DEFINE(HAVE_HIDDEN_VISIBILITY_ATTRIBUTE, 1,
|
||||
[Define if __attribute__((visibility("hidden"))) is supported.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AH_BOTTOM([
|
||||
|
@ -360,12 +521,14 @@ AC_ARG_ENABLE(debug,
|
|||
if test "$enable_debug" = "yes"; then
|
||||
AC_DEFINE(FFI_DEBUG, 1, [Define this if you want extra debugging.])
|
||||
fi)
|
||||
AM_CONDITIONAL(FFI_DEBUG, test "$enable_debug" = "yes")
|
||||
|
||||
AC_ARG_ENABLE(structs,
|
||||
[ --disable-structs omit code for struct support],
|
||||
if test "$enable_structs" = "no"; then
|
||||
AC_DEFINE(FFI_NO_STRUCTS, 1, [Define this is you do not want support for aggregate types.])
|
||||
fi)
|
||||
AM_CONDITIONAL(FFI_DEBUG, test "$enable_debug" = "yes")
|
||||
|
||||
AC_ARG_ENABLE(raw-api,
|
||||
[ --disable-raw-api make the raw api unavailable],
|
||||
|
@ -379,28 +542,28 @@ AC_ARG_ENABLE(purify-safety,
|
|||
AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and want to suppress spurious messages.])
|
||||
fi)
|
||||
|
||||
if test -n "$with_cross_host" &&
|
||||
test x"$with_cross_host" != x"no"; then
|
||||
toolexecdir='$(exec_prefix)/$(target_alias)'
|
||||
toolexeclibdir='$(toolexecdir)/lib'
|
||||
# These variables are only ever used when we cross-build to X86_WIN32.
|
||||
# And we only support this with GCC, so...
|
||||
if test "x$GCC" = "xyes"; then
|
||||
if test -n "$with_cross_host" &&
|
||||
test x"$with_cross_host" != x"no"; then
|
||||
toolexecdir='$(exec_prefix)/$(target_alias)'
|
||||
toolexeclibdir='$(toolexecdir)/lib'
|
||||
else
|
||||
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
|
||||
toolexeclibdir='$(libdir)'
|
||||
fi
|
||||
multi_os_directory=`$CC -print-multi-os-directory`
|
||||
case $multi_os_directory in
|
||||
.) ;; # Avoid trailing /.
|
||||
../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
||||
esac
|
||||
AC_SUBST(toolexecdir)
|
||||
else
|
||||
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
|
||||
toolexeclibdir='$(libdir)'
|
||||
fi
|
||||
multi_os_directory=`$CC -print-multi-os-directory`
|
||||
case $multi_os_directory in
|
||||
.) ;; # Avoid trailing /.
|
||||
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
||||
esac
|
||||
AC_SUBST(toolexecdir)
|
||||
AC_SUBST(toolexeclibdir)
|
||||
|
||||
if test "${multilib}" = "yes"; then
|
||||
multilib_arg="--enable-multilib"
|
||||
else
|
||||
multilib_arg=
|
||||
fi
|
||||
|
||||
AC_CONFIG_COMMANDS(include, [test -d include || mkdir include])
|
||||
AC_CONFIG_COMMANDS(src, [
|
||||
test -d src || mkdir src
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2006-10-15.18
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -17,9 +17,7 @@ scriptversion=2006-10-15.18
|
|||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
|
|||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
|
@ -192,14 +199,14 @@ sgi)
|
|||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
' ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
|
@ -215,34 +222,39 @@ aix)
|
|||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
|
@ -323,7 +335,12 @@ hp2)
|
|||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
|
@ -399,7 +416,7 @@ dashmstdout)
|
|||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
@ -450,32 +467,39 @@ makedepend)
|
|||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
|
@ -495,7 +519,7 @@ cpp)
|
|||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
@ -533,13 +557,27 @@ cpp)
|
|||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
|
@ -552,16 +590,23 @@ msvisualcpp)
|
|||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
@ -580,5 +625,6 @@ exit 0
|
|||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -4,7 +4,7 @@ from ../libffi/doc/libffi.texi.
|
|||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright (C) 2008, 2010 Red Hat, Inc.
|
||||
Copyright (C) 2008, 2010, 2011 Red Hat, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU General Public License as
|
||||
|
@ -27,7 +27,7 @@ libffi
|
|||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright (C) 2008, 2010 Red Hat, Inc.
|
||||
Copyright (C) 2008, 2010, 2011 Red Hat, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU General Public License as
|
||||
|
@ -115,8 +115,6 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
|||
want. *note Multiple ABIs:: for more information.
|
||||
|
||||
NARGS is the number of arguments that this function accepts.
|
||||
`libffi' does not yet handle varargs functions; see *note Missing
|
||||
Features:: for more information.
|
||||
|
||||
RTYPE is a pointer to an `ffi_type' structure that describes the
|
||||
return type of the function. *Note Types::.
|
||||
|
@ -129,6 +127,30 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
|||
properly; `FFI_BAD_TYPEDEF' if one of the `ffi_type' objects is
|
||||
incorrect; or `FFI_BAD_ABI' if the ABI parameter is invalid.
|
||||
|
||||
If the function being called is variadic (varargs) then
|
||||
`ffi_prep_cif_var' must be used instead of `ffi_prep_cif'.
|
||||
|
||||
-- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi
|
||||
varabi, unsigned int NFIXEDARGS, unsigned int varntotalargs,
|
||||
ffi_type *RTYPE, ffi_type **ARGTYPES)
|
||||
This initializes CIF according to the given parameters for a call
|
||||
to a variadic function. In general it's operation is the same as
|
||||
for `ffi_prep_cif' except that:
|
||||
|
||||
NFIXEDARGS is the number of fixed arguments, prior to any variadic
|
||||
arguments. It must be greater than zero.
|
||||
|
||||
NTOTALARGS the total number of arguments, including variadic and
|
||||
fixed arguments.
|
||||
|
||||
Note that, different cif's must be prepped for calls to the same
|
||||
function when different numbers of arguments are passed.
|
||||
|
||||
Also note that a call to `ffi_prep_cif_var' with
|
||||
NFIXEDARGS=NOTOTALARGS is NOT equivalent to a call to
|
||||
`ffi_prep_cif'.
|
||||
|
||||
|
||||
To call a function using an initialized `ffi_cif', use the
|
||||
`ffi_call' function:
|
||||
|
||||
|
@ -147,7 +169,9 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
|||
AVALUES is a vector of `void *' pointers that point to the memory
|
||||
locations holding the argument values for a call. If CIF declares
|
||||
that the function has no arguments (i.e., NARGS was 0), then
|
||||
AVALUES is ignored.
|
||||
AVALUES is ignored. Note that argument values may be modified by
|
||||
the callee (for instance, structs passed by value); the burden of
|
||||
copying pass-by-value arguments is placed on the caller.
|
||||
|
||||
|
||||
File: libffi.info, Node: Simple Example, Next: Types, Prev: The Basics, Up: Using libffi
|
||||
|
@ -294,7 +318,7 @@ is perfectly happy passing structures back and forth. You must first
|
|||
describe the structure to `libffi' by creating a new `ffi_type' object
|
||||
for it.
|
||||
|
||||
-- ffi_type:
|
||||
-- Data type: ffi_type
|
||||
The `ffi_type' has the following members:
|
||||
`size_t size'
|
||||
This is set by `libffi'; you should initialize it to zero.
|
||||
|
@ -509,9 +533,7 @@ File: libffi.info, Node: Missing Features, Next: Index, Prev: Using libffi,
|
|||
`libffi' is missing a few features. We welcome patches to add support
|
||||
for these.
|
||||
|
||||
* There is no support for calling varargs functions. This may work
|
||||
on some platforms, depending on how the ABI is defined, but it is
|
||||
not reliable.
|
||||
* Variadic closures.
|
||||
|
||||
* There is no support for bit fields in structures.
|
||||
|
||||
|
@ -519,6 +541,9 @@ for these.
|
|||
|
||||
* The "raw" API is undocumented.
|
||||
|
||||
Note that variadic support is very new and tested on a relatively
|
||||
small number of platforms.
|
||||
|
||||
|
||||
File: libffi.info, Node: Index, Prev: Missing Features, Up: Top
|
||||
|
||||
|
@ -528,7 +553,6 @@ Index
|
|||
|