sparc ABI test fix.

This commit is contained in:
Anthony Green
2011-02-11 07:11:04 -05:00
parent f1fb139b4e
commit 1833aa0fb9
30 changed files with 5440 additions and 8154 deletions

View File

@@ -147,81 +147,81 @@ Index: libffi/configure
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7841,11 +7847,11 @@ else
@@ -7845,11 +7851,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7844: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7850: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:7848: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7854: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7848: \$? = $ac_status" >&5
+ echo "$as_me:7854: \$? = $ac_status" >&5
- echo "$as_me:7852: \$? = $ac_status" >&5
+ echo "$as_me:7858: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8180,11 +8186,11 @@ else
@@ -8184,11 +8190,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8183: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8189: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:8187: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8193: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8187: \$? = $ac_status" >&5
+ echo "$as_me:8193: \$? = $ac_status" >&5
- echo "$as_me:8191: \$? = $ac_status" >&5
+ echo "$as_me:8197: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8285,11 +8291,11 @@ else
@@ -8289,11 +8295,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8288: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8294: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:8292: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8298: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8292: \$? = $ac_status" >&5
+ echo "$as_me:8298: \$? = $ac_status" >&5
- echo "$as_me:8296: \$? = $ac_status" >&5
+ echo "$as_me:8302: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8340,11 +8346,11 @@ else
@@ -8344,11 +8350,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8343: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8349: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:8347: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8353: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8347: \$? = $ac_status" >&5
+ echo "$as_me:8353: \$? = $ac_status" >&5
- echo "$as_me:8351: \$? = $ac_status" >&5
+ echo "$as_me:8357: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11143,7 +11149,7 @@ else
@@ -11147,7 +11153,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11146 "configure"
+#line 11152 "configure"
-#line 11150 "configure"
+#line 11156 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11239,7 +11245,7 @@ else
@@ -11243,7 +11249,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11242 "configure"
+#line 11248 "configure"
-#line 11246 "configure"
+#line 11252 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14773,6 +14779,14 @@ _ACEOF
@@ -14777,6 +14783,14 @@ _ACEOF
fi
fi
@@ -236,7 +236,7 @@ Index: libffi/configure
# Check whether --enable-structs was given.
if test "${enable_structs+set}" = set; then
@@ -15173,6 +15187,13 @@ Usually this means the macro was only in
@@ -15177,6 +15191,13 @@ Usually this means the macro was only in
{ (exit 1); exit 1; }; }
fi

View File

@@ -2,7 +2,7 @@ Index: libffi/configure
===================================================================
--- libffi.orig/configure
+++ libffi/configure
@@ -12196,7 +12196,7 @@ case "$host" in
@@ -12200,7 +12200,7 @@ case "$host" in
i?86-*-freebsd* | i?86-*-openbsd*)
TARGET=X86_FREEBSD; TARGETDIR=x86
;;

View File

@@ -214,15 +214,7 @@ Index: libffi/Makefile.in
FGREP = @FGREP@
GREP = @GREP@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
@@ -383,6 +386,7 @@ psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
+sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
@@ -396,37 +400,34 @@ top_builddir = @top_builddir@
@@ -397,37 +400,34 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign subdir-objects
SUBDIRS = include testsuite man
@@ -288,7 +280,7 @@ Index: libffi/Makefile.in
info_TEXINFOS = doc/libffi.texi
@@ -485,10 +486,10 @@ nodist_libffi_la_SOURCES = $(am__append_
@@ -486,10 +486,10 @@ nodist_libffi_la_SOURCES = $(am__append_
$(am__append_15) $(am__append_16) $(am__append_17) \
$(am__append_18) $(am__append_19) $(am__append_20) \
$(am__append_21) $(am__append_22) $(am__append_23) \
@@ -301,7 +293,7 @@ Index: libffi/Makefile.in
libffi_la_LDFLAGS = -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)
@@ -724,6 +725,8 @@ src/arm/sysv.lo: src/arm/$(am__dirstamp)
@@ -725,6 +725,8 @@ src/arm/sysv.lo: src/arm/$(am__dirstamp)
src/arm/$(DEPDIR)/$(am__dirstamp)
src/arm/ffi.lo: src/arm/$(am__dirstamp) \
src/arm/$(DEPDIR)/$(am__dirstamp)
@@ -310,7 +302,7 @@ Index: libffi/Makefile.in
src/avr32/$(am__dirstamp):
@$(MKDIR_P) src/avr32
@: > src/avr32/$(am__dirstamp)
@@ -811,6 +814,8 @@ mostlyclean-compile:
@@ -812,6 +814,8 @@ mostlyclean-compile:
-rm -f src/arm/ffi.lo
-rm -f src/arm/sysv.$(OBJEXT)
-rm -f src/arm/sysv.lo
@@ -319,7 +311,7 @@ Index: libffi/Makefile.in
-rm -f src/avr32/ffi.$(OBJEXT)
-rm -f src/avr32/ffi.lo
-rm -f src/avr32/sysv.$(OBJEXT)
@@ -929,6 +934,7 @@ distclean-compile:
@@ -930,6 +934,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/alpha/$(DEPDIR)/osf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/arm/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/arm/$(DEPDIR)/sysv.Plo@am__quote@
@@ -369,16 +361,6 @@ Index: libffi/fficonfig.h.in
/* Cannot use malloc on this target, so, we revert to alternative means */
#undef FFI_MMAP_EXEC_WRIT
@@ -154,6 +157,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define if symbols are underscored. */
+#undef SYMBOL_UNDERSCORE
+
/* Define this if you are using Purify and want to suppress spurious messages.
*/
#undef USING_PURIFY
Index: libffi/src/arm/ffi.c
===================================================================
--- libffi.orig/src/arm/ffi.c

View File

@@ -14,7 +14,7 @@ Index: libffi/configure
===================================================================
--- libffi.orig/configure
+++ libffi/configure
@@ -12245,7 +12245,7 @@ case "$host" in
@@ -12249,7 +12249,7 @@ case "$host" in
powerpc-*-beos*)
TARGET=POWERPC; TARGETDIR=powerpc
;;
@@ -23,7 +23,7 @@ Index: libffi/configure
TARGET=POWERPC_DARWIN; TARGETDIR=powerpc
;;
powerpc-*-aix* | rs6000-*-aix*)
@@ -12254,7 +12254,7 @@ case "$host" in
@@ -12258,7 +12258,7 @@ case "$host" in
powerpc-*-freebsd*)
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
;;

View File

@@ -17,3 +17,4 @@ fix-xfails
interix
ppc64-darwin
irix
sparc-abi-check

45
patches/sparc-abi-check Normal file
View File

@@ -0,0 +1,45 @@
Index: libffi/ChangeLog
===================================================================
--- libffi.orig/ChangeLog
+++ libffi/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-11 Anthony Green <green@moxielogic.com>
+
+ * src/sparc/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
+ just return FFI_BAD_ABI when things are wrong.
+
2011-02-09 Stuart Shelton <srcshelton@gmail.com>
http://bugs.gentoo.org/show_bug.cgi?id=286911
Index: libffi/src/sparc/ffi.c
===================================================================
--- libffi.orig/src/sparc/ffi.c
+++ libffi/src/sparc/ffi.c
@@ -1,5 +1,6 @@
/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 1996, 2003, 2004, 2007, 2008 Red Hat, Inc.
+ ffi.c - Copyright (c) 2011 Anthony Green
+ Copyright (c) 1996, 2003-2004, 2007-2008 Red Hat, Inc.
SPARC Foreign Function Interface
@@ -485,7 +486,8 @@ ffi_prep_closure_loc (ffi_closure* closu
#ifdef SPARC64
/* Trampoline address is equal to the closure address. We take advantage
of that to reduce the trampoline size by 8 bytes. */
- FFI_ASSERT (cif->abi == FFI_V9);
+ if (cif->abi != FFI_V9)
+ return FFI_BAD_ABI;
fn = (unsigned long) ffi_closure_v9;
tramp[0] = 0x83414000; /* rd %pc, %g1 */
tramp[1] = 0xca586010; /* ldx [%g1+16], %g5 */
@@ -494,7 +496,8 @@ ffi_prep_closure_loc (ffi_closure* closu
*((unsigned long *) &tramp[4]) = fn;
#else
unsigned long ctx = (unsigned long) codeloc;
- FFI_ASSERT (cif->abi == FFI_V8);
+ if (cif->abi != FFI_V8)
+ return FFI_BAD_ABI;
fn = (unsigned long) ffi_closure_v8;
tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */
tramp[1] = 0x05000000 | ctx >> 10; /* sethi %hi(ctx), %g2 */

View File

@@ -94,9 +94,9 @@ Index: libffi/aclocal.m4
===================================================================
--- libffi.orig/aclocal.m4
+++ libffi/aclocal.m4
@@ -7968,6 +7968,811 @@ m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_D
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
@@ -19,6 +19,811 @@ You have another version of autoconf. I
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
+# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
+#
@@ -944,81 +944,81 @@ Index: libffi/configure
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7847,11 +7848,11 @@ else
@@ -7851,11 +7852,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7850: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7851: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:7854: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7855: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7854: \$? = $ac_status" >&5
+ echo "$as_me:7855: \$? = $ac_status" >&5
- echo "$as_me:7858: \$? = $ac_status" >&5
+ echo "$as_me:7859: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8186,11 +8187,11 @@ else
@@ -8190,11 +8191,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8189: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8190: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:8193: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8194: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8193: \$? = $ac_status" >&5
+ echo "$as_me:8194: \$? = $ac_status" >&5
- echo "$as_me:8197: \$? = $ac_status" >&5
+ echo "$as_me:8198: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8291,11 +8292,11 @@ else
@@ -8295,11 +8296,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8294: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8295: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:8298: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8299: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8298: \$? = $ac_status" >&5
+ echo "$as_me:8299: \$? = $ac_status" >&5
- echo "$as_me:8302: \$? = $ac_status" >&5
+ echo "$as_me:8303: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8346,11 +8347,11 @@ else
@@ -8350,11 +8351,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8349: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8350: $lt_compile\"" >&5)
- (eval echo "\"\$as_me:8353: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8354: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8353: \$? = $ac_status" >&5
+ echo "$as_me:8354: \$? = $ac_status" >&5
- echo "$as_me:8357: \$? = $ac_status" >&5
+ echo "$as_me:8358: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11149,7 +11150,7 @@ else
@@ -11153,7 +11154,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11152 "configure"
+#line 11153 "configure"
-#line 11156 "configure"
+#line 11157 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11245,7 +11246,7 @@ else
@@ -11249,7 +11250,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11248 "configure"
+#line 11249 "configure"
-#line 11252 "configure"
+#line 11253 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14654,6 +14655,63 @@ _ACEOF
@@ -14658,6 +14659,63 @@ _ACEOF
fi
fi

View File

@@ -15,7 +15,7 @@ Index: libffi/configure
===================================================================
--- libffi.orig/configure
+++ libffi/configure
@@ -14513,10 +14513,10 @@ if test "${libffi_cv_as_x86_pcrel+set}"
@@ -14517,10 +14517,10 @@ if test "${libffi_cv_as_x86_pcrel+set}"
$as_echo_n "(cached) " >&6
else