From cc243ce2205180cd81ac5b8dbfdfb4fd8ea85df2 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 8 Sep 2008 12:45:41 +0000 Subject: [PATCH] catch up with latest libffi from the GCC repository svn: r11573 --- src/foreign/gcc/config-ml.in | 7 +- src/foreign/gcc/config.guess | 8 +- src/foreign/gcc/config.sub | 23 +- src/foreign/gcc/config/override.m4 | 251 ++++++++++++++++++ src/foreign/gcc/config/proginstall.m4 | 98 +++++++ src/foreign/gcc/libffi/ChangeLog | 87 ++++++ src/foreign/gcc/libffi/Makefile.am | 4 +- src/foreign/gcc/libffi/aclocal.m4 | 2 + src/foreign/gcc/libffi/configure.ac | 11 +- src/foreign/gcc/libffi/include/Makefile.in | 10 +- src/foreign/gcc/libffi/src/alpha/osf.S | 4 + src/foreign/gcc/libffi/src/arm/sysv.S | 3 + src/foreign/gcc/libffi/src/m68k/sysv.S | 4 + src/foreign/gcc/libffi/src/powerpc/ffi.c | 19 +- .../gcc/libffi/src/powerpc/ffitarget.h | 8 +- .../gcc/libffi/src/powerpc/ppc_closure.S | 4 + src/foreign/gcc/libffi/src/powerpc/sysv.S | 4 + src/foreign/gcc/libffi/src/s390/sysv.S | 3 + src/foreign/gcc/libffi/src/sh/ffi.c | 5 +- src/foreign/gcc/libffi/src/sh/sysv.S | 6 +- src/foreign/gcc/libffi/src/sh64/sysv.S | 6 +- src/foreign/gcc/libffi/src/sparc/v8.S | 4 + src/foreign/gcc/libffi/src/sparc/v9.S | 4 + src/foreign/gcc/libffi/src/x86/sysv.S | 10 + src/foreign/gcc/libffi/src/x86/unix64.S | 4 + src/foreign/gcc/libtool-ldflags | 106 ++++++++ src/foreign/gcc/libtool.m4 | 11 +- src/foreign/gcc/ltsugar.m4 | 26 +- 28 files changed, 690 insertions(+), 42 deletions(-) create mode 100644 src/foreign/gcc/config/override.m4 create mode 100644 src/foreign/gcc/config/proginstall.m4 create mode 100755 src/foreign/gcc/libtool-ldflags diff --git a/src/foreign/gcc/config-ml.in b/src/foreign/gcc/config-ml.in index 3ae19743b7..f2497ada4f 100644 --- a/src/foreign/gcc/config-ml.in +++ b/src/foreign/gcc/config-ml.in @@ -135,7 +135,12 @@ do *) optarg=yes ;; esac enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval $enableopt="$optarg" + # enable_shared and enable_static are handled by configure. + # Don't undo its work. + case $enableopt in + enable_shared | enable_static) ;; + *) eval $enableopt="$optarg" ;; + esac ;; --norecursion | --no-recursion) ml_norecursion=yes diff --git a/src/foreign/gcc/config.guess b/src/foreign/gcc/config.guess index f32079abda..c7607c74f1 100755 --- a/src/foreign/gcc/config.guess +++ b/src/foreign/gcc/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. -timestamp='2008-01-23' +timestamp='2008-04-14' # 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 @@ -985,9 +985,6 @@ EOF a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. @@ -1216,6 +1213,9 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; diff --git a/src/foreign/gcc/config.sub b/src/foreign/gcc/config.sub index 6759825a5b..63bfff0307 100755 --- a/src/foreign/gcc/config.sub +++ b/src/foreign/gcc/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. -timestamp='2008-01-16' +timestamp='2008-04-14' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -250,12 +250,14 @@ case $basic_machine in | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ @@ -331,12 +333,14 @@ case $basic_machine in | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ @@ -364,7 +368,7 @@ case $basic_machine in | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ @@ -526,6 +530,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -1388,6 +1396,9 @@ case $os in -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; -none) ;; *) diff --git a/src/foreign/gcc/config/override.m4 b/src/foreign/gcc/config/override.m4 new file mode 100644 index 0000000000..9bb149620c --- /dev/null +++ b/src/foreign/gcc/config/override.m4 @@ -0,0 +1,251 @@ +dnl Fix Autoconf-2.59 bugs: by overriding broken internal +dnl Autoconf macros with backports of the 2.60+ fix. +dnl - AC_CONFIG_SUBDIRS whitespace mangling, +dnl - more lenient precious variable checks +dnl - better configure error message +dnl - reliance on non-Posix m4wrap (M4 1.6 or newer implement FIFO) +dnl +dnl The override bits of this file should be a no-op for the newest +dnl Autoconf version, which means they can be removed once the complete +dnl tree has moved to a new enough Autoconf version. +dnl +dnl The _GCC_AUTOCONF_VERSION_TEST ensures that exactly the desired +dnl Autoconf version is used. It should be kept for consistency. + +dnl m4_PACKAGE_VERSION is an undocumented Autoconf macro. +dnl We use it because this fix is intended for 2.59 only. +dnl A feature test for the broken AC_CONFIG_SUBDIRS instead +dnl would be better but is tricky. +dnl +dnl Use ifdef/ifelse over m4_ifdef/m4_ifelse to be clean for 2.13. +dnl Redefine AC_CONFIG_SUBDIRS so aclocal pulls in this file +dnl when needed. + +ifdef([m4_PACKAGE_VERSION], +[dnl AC_DEFUN a commonly used macro so this file is picked up. +m4_copy([AC_PREREQ], [_AC_PREREQ]) +AC_DEFUN([AC_PREREQ], [frob]) +m4_copy([_AC_PREREQ], [AC_PREREQ]) + + +dnl Ensure exactly this Autoconf version is used +m4_ifndef([_GCC_AUTOCONF_VERSION], + [m4_define([_GCC_AUTOCONF_VERSION], [2.59])]) + +dnl Test for the exact version when AC_INIT is expanded. +dnl This allows to update the tree in steps (for testing) +dnl by putting +dnl m4_define([_GCC_AUTOCONF_VERSION], [X.Y]) +dnl in configure.ac before AC_INIT, +dnl without rewriting this file. +dnl Or for updating the whole tree at once with the definition above. +AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK], +[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]), + m4_defn([m4_PACKAGE_VERSION]), [], + [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])]) +]) +m4_define([AC_INIT], m4_defn([AC_INIT])[ +_GCC_AUTOCONF_VERSION_CHECK +]) + +m4_version_prereq([2.60],, [ +dnl We use $ac_pwd in some of the overrides below; ensure its definition +m4_divert_push([PARSE_ARGS])dnl +ac_pwd=`pwd` +m4_divert_pop([PARSE_ARGS])dnl +]) + + +m4_version_prereq([2.60],, [ + +# _AC_OUTPUT_SUBDIRS +# ------------------ +# This is a subroutine of AC_OUTPUT, but it does not go into +# config.status, rather, it is called after running config.status. +m4_define([_AC_OUTPUT_SUBDIRS], +[ +# +# CONFIG_SUBDIRS section, as fixed in confsubdir.m4. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="$ac_arg $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d "$srcdir/$ac_dir" || continue + + AC_MSG_NOTICE([configuring in $ac_dir]) + AS_MKDIR_P(["$ac_dir"]) + _AC_SRCPATHS(["$ac_dir"]) + + cd "$ac_dir" + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f "$ac_srcdir/configure.gnu"; then + ac_sub_configure=$ac_srcdir/configure.gnu + elif test -f "$ac_srcdir/configure"; then + ac_sub_configure=$ac_srcdir/configure + elif test -f "$ac_srcdir/configure.in"; then + # This should be Cygnus configure. + ac_sub_configure=$ac_aux_dir/configure + else + AC_MSG_WARN([no configuration information is in $ac_dir]) + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative path. + ac_sub_cache_file=$ac_top_builddir$cache_file ;; + esac + + AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir]) + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir]) + fi + + cd "$ac_popdir" + done +fi +])# _AC_OUTPUT_SUBDIRS +]) + +m4_version_prereq([2.63],, [ + +# _AC_ARG_VAR_VALIDATE +# -------------------- +# The code is the same as autoconf 2.59, but with a more lenient check +# on precious variables and an output of pwd that have been added in +# autoconf 2.62. +m4_define([_AC_ARG_VAR_VALIDATE], +[m4_divert_text([INIT_PREPARE], +[# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2) + ac_cache_corrupted=: ;; + ,set) + AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2) + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2) + ac_cache_corrupted=: + else + AS_MESSAGE([warning: ignoring whitespace changes in `$ac_var' since the previous run:], 2) + eval $ac_var=\$ac_old_val + fi + AS_MESSAGE([ former value: `$ac_old_val'], 2) + AS_MESSAGE([ current value: `$ac_new_val'], 2) + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in +dnl If you change this globbing pattern, test it on an old shell -- +dnl it's sensitive. Putting any kind of quote in it causes syntax errors. +[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)] + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + AS_MESSAGE([error: in `$ac_pwd':], 2) + AS_MESSAGE([error: changes in the environment can compromise the build], 2) + AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over]) +fi])dnl +])# _AC_ARG_VAR_VALIDATE +]) + +m4_version_prereq([2.63],, [ + +# AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1]) +# ---------------------------------------- +# This is the same code as in 2.59 and 2.61, except it also outputs pwd. +m4_define([AC_MSG_FAILURE], +[{ AS_MESSAGE([error: in `$ac_pwd':], 2) +AC_MSG_ERROR([$1 +See `config.log' for more details.], [$2]); }]) +]) +]) + +m4_version_prereq([2.60],, [ +dnl M4 1.6 and newer implement m4wrap using FIFO semantics, as required +dnl by Posix; earlier versions used LIFO semantics. Unfortunately, +dnl Autoconf versions before 2.60 require those LIFO semantics, so +dnl make sure to give it to them. +m4_define([m4_wrap], [m4_ifdef([_$0_text], + [m4_define([_$0_text], [$1]m4_defn([_$0_text]))], + [m4_define([_$0_text], [$1])m4_builtin([m4wrap], + [m4_default(m4_defn([_$0_text])m4_undefine([_$0_text]))])])]) +]) diff --git a/src/foreign/gcc/config/proginstall.m4 b/src/foreign/gcc/config/proginstall.m4 new file mode 100644 index 0000000000..a78a3d4b6c --- /dev/null +++ b/src/foreign/gcc/config/proginstall.m4 @@ -0,0 +1,98 @@ +# AC_PROG_INSTALL +# --------------- +# +# This macro is stolen from Autoconf 2.61a-341. +# It requires `install' to be able to install multiple files at once. +# This file will be obsolete when GCC moves to Autoconf 2.62. + +m4_version_prereq([2.62], [], +[ +AC_DEFUN([AC_PROG_INSTALL], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +dnl AC_REQUIRE_AUX_FILE([install-sh])dnl This line does not work with 2.59. +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +AC_MSG_CHECKING([for a BSD-compatible install]) +if test -z "$INSTALL"; then +AC_CACHE_VAL(ac_cv_path_install, +[_AS_PATH_WALK([$PATH], +[# Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac]) +rm -rf conftest.one conftest.two conftest.dir +])dnl + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +dnl Do special magic for INSTALL instead of AC_SUBST, to get +dnl relative names right. +AC_MSG_RESULT([$INSTALL]) + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +AC_SUBST(INSTALL_PROGRAM)dnl + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +AC_SUBST(INSTALL_SCRIPT)dnl + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +AC_SUBST(INSTALL_DATA)dnl +])# AC_PROG_INSTALL +]) diff --git a/src/foreign/gcc/libffi/ChangeLog b/src/foreign/gcc/libffi/ChangeLog index 7026706836..cffc4d25ff 100644 --- a/src/foreign/gcc/libffi/ChangeLog +++ b/src/foreign/gcc/libffi/ChangeLog @@ -1,3 +1,90 @@ +2008-08-25 Andreas Tobler + + * src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and + FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum. + Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT. + Adjust copyright notice. + * src/powerpc/ffi.c: Add two new flags to indicate if we have one + register or two register to use for FFI_SYSV structs. + (ffi_prep_cif_machdep): Pass the right register flag introduced above. + (ffi_closure_helper_SYSV): Fix the return type for + FFI_SYSV_TYPE_SMALL_STRUCT. Comment. + Adjust copyright notice. + +2008-07-16 Kaz Kojima + + * src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned + int. + +2008-06-17 Ralf Wildenhues + + * configure: Regenerate. + * include/Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2008-06-07 Joseph Myers + + * configure.ac (parisc*-*-linux*, powerpc-*-sysv*, + powerpc-*-beos*): Remove. + * configure: Regenerate. + +2008-05-09 Julian Brown + + * Makefile.am (LTLDFLAGS): New. + (libffi_la_LDFLAGS): Use above. + * Makefile.in: Regenerate. + +2008-04-18 Paolo Bonzini + + PR bootstrap/35457 + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2008-03-26 Kaz Kojima + + * src/sh/sysv.S: Add .note.GNU-stack on Linux. + * src/sh64/sysv.S: Likewise. + +2008-03-26 Daniel Jacobowitz + + * src/arm/sysv.S: Fix ARM comment marker. + +2008-03-26 Jakub Jelinek + + * src/alpha/osf.S: Add .note.GNU-stack on Linux. + * src/s390/sysv.S: Likewise. + * src/powerpc/ppc_closure.S: Likewise. + * src/powerpc/sysv.S: Likewise. + * src/x86/unix64.S: Likewise. + * src/x86/sysv.S: Likewise. + * src/sparc/v8.S: Likewise. + * src/sparc/v9.S: Likewise. + * src/m68k/sysv.S: Likewise. + * src/arm/sysv.S: Likewise. + +2008-03-16 Ralf Wildenhues + + * aclocal.m4: Regenerate. + * configure: Likewise. + * Makefile.in: Likewise. + * include/Makefile.in: Likewise. + * testsuite/Makefile.in: Likewise. + +2008-02-12 Bjoern Koenig + Andreas Tobler + + * configure.ac: Add amd64-*-freebsd* target. + * configure: Regenerate. + +2008-01-30 H.J. Lu + + PR libffi/34612 + * src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when + returning struct. + + * testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer" + tests. + 2008-01-24 David Edelsohn * configure: Regenerate. diff --git a/src/foreign/gcc/libffi/Makefile.am b/src/foreign/gcc/libffi/Makefile.am index 6e86069ebb..6044b62729 100644 --- a/src/foreign/gcc/libffi/Makefile.am +++ b/src/foreign/gcc/libffi/Makefile.am @@ -156,7 +156,9 @@ nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES) AM_CFLAGS = -Wall -g -fexceptions -libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) + +libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src AM_CCASFLAGS = $(AM_CPPFLAGS) diff --git a/src/foreign/gcc/libffi/aclocal.m4 b/src/foreign/gcc/libffi/aclocal.m4 index aaedf3954e..f446b054f6 100644 --- a/src/foreign/gcc/libffi/aclocal.m4 +++ b/src/foreign/gcc/libffi/aclocal.m4 @@ -908,6 +908,8 @@ AC_SUBST([am__untar]) m4_include([../config/depstand.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/multi.m4]) +m4_include([../config/override.m4]) +m4_include([../config/proginstall.m4]) m4_include([../libtool.m4]) m4_include([../ltoptions.m4]) m4_include([../ltsugar.m4]) diff --git a/src/foreign/gcc/libffi/configure.ac b/src/foreign/gcc/libffi/configure.ac index 65764effb7..88e410de96 100644 --- a/src/foreign/gcc/libffi/configure.ac +++ b/src/foreign/gcc/libffi/configure.ac @@ -51,6 +51,10 @@ case "$host" in TARGET=ARM; TARGETDIR=arm ;; + amd64-*-freebsd*) + TARGET=X86_64; TARGETDIR=x86 + ;; + cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris ;; @@ -59,7 +63,7 @@ case "$host" in TARGET=FRV; TARGETDIR=frv ;; - hppa*-*-linux* | parisc*-*-linux*) + hppa*-*-linux*) TARGET=PA_LINUX; TARGETDIR=pa ;; hppa*64-*-hpux*) @@ -101,10 +105,7 @@ case "$host" in TARGET=MIPS; TARGETDIR=mips ;; - powerpc*-*-linux* | powerpc-*-sysv*) - TARGET=POWERPC; TARGETDIR=powerpc - ;; - powerpc-*-beos*) + powerpc*-*-linux*) TARGET=POWERPC; TARGETDIR=powerpc ;; powerpc-*-darwin*) diff --git a/src/foreign/gcc/libffi/include/Makefile.in b/src/foreign/gcc/libffi/include/Makefile.in index d518c1cfc9..1f0dc7ee3b 100644 --- a/src/foreign/gcc/libffi/include/Makefile.in +++ b/src/foreign/gcc/libffi/include/Makefile.in @@ -43,10 +43,12 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ - $(top_srcdir)/../config/multi.m4 $(top_srcdir)/../libtool.m4 \ - $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ - $(top_srcdir)/../ltversion.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/proginstall.m4 \ + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs diff --git a/src/foreign/gcc/libffi/src/alpha/osf.S b/src/foreign/gcc/libffi/src/alpha/osf.S index aba6782e79..a6a7b1fc24 100644 --- a/src/foreign/gcc/libffi/src/alpha/osf.S +++ b/src/foreign/gcc/libffi/src/alpha/osf.S @@ -358,4 +358,8 @@ $LASFDE3: .byte 16 # uleb128 offset 16*-8 .align 3 $LEFDE3: + +#ifdef __linux__ + .section .note.GNU-stack,"",@progbits +#endif #endif diff --git a/src/foreign/gcc/libffi/src/arm/sysv.S b/src/foreign/gcc/libffi/src/arm/sysv.S index 12876d1205..7062addef1 100644 --- a/src/foreign/gcc/libffi/src/arm/sysv.S +++ b/src/foreign/gcc/libffi/src/arm/sysv.S @@ -293,3 +293,6 @@ ARM_FUNC_START ffi_closure_SYSV UNWIND .fnend .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",%progbits +#endif diff --git a/src/foreign/gcc/libffi/src/m68k/sysv.S b/src/foreign/gcc/libffi/src/m68k/sysv.S index d2a4ff1c64..3face83837 100644 --- a/src/foreign/gcc/libffi/src/m68k/sysv.S +++ b/src/foreign/gcc/libffi/src/m68k/sysv.S @@ -207,3 +207,7 @@ ffi_closure_struct_SYSV: rts CFI_ENDPROC() .size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libffi/src/powerpc/ffi.c b/src/foreign/gcc/libffi/src/powerpc/ffi.c index e6b869f873..73c1dd2076 100644 --- a/src/foreign/gcc/libffi/src/powerpc/ffi.c +++ b/src/foreign/gcc/libffi/src/powerpc/ffi.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 1998 Geoffrey Keating - Copyright (C) 2007 Free Software Foundation, Inc + Copyright (C) 2007, 2008 Free Software Foundation, Inc PowerPC Foreign Function Interface @@ -43,6 +43,10 @@ enum { FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */ + FLAG_SYSV_SMST_R4 = 1 << (31-16), /* cr4, use r4 for FFI_SYSV 8 byte + structs. */ + FLAG_SYSV_SMST_R3 = 1 << (31-15), /* cr3, use r3 for FFI_SYSV 4 byte + structs. */ FLAG_ARG_NEEDS_COPY = 1 << (31- 7), FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ FLAG_4_GPR_ARGUMENTS = 1 << (31- 5), @@ -679,14 +683,14 @@ ffi_prep_cif_machdep (ffi_cif *cif) The same applies for the structs returned in r3/r4. */ if (size <= 4) { - flags |= 1 << (31 - FFI_SYSV_TYPE_SMALL_STRUCT - 1); + flags |= FLAG_SYSV_SMST_R3; flags |= 8 * (4 - size) << 4; break; } /* These structs are returned in r3 and r4. See above. */ if (size <= 8) { - flags |= 1 << (31 - FFI_SYSV_TYPE_SMALL_STRUCT - 2); + flags |= FLAG_SYSV_SMST_R4; flags |= 8 * (8 - size) << 4; break; } @@ -1248,10 +1252,15 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue, /* Tell ffi_closure_SYSV how to perform return type promotions. Because the FFI_SYSV ABI returns the structures <= 8 bytes in r3/r4 - we have to tell ffi_closure_SYSV how to treat them. */ + we have to tell ffi_closure_SYSV how to treat them. We combine the base + type FFI_SYSV_TYPE_SMALL_STRUCT - 1 with the size of the struct. + So a one byte struct gets the return type 16. Return type 1 to 15 are + already used and we never have a struct with size zero. That is the reason + for the subtraction of 1. See the comment in ffitarget.h about ordering. + */ if (cif->abi == FFI_SYSV && cif->rtype->type == FFI_TYPE_STRUCT && size <= 8) - return FFI_SYSV_TYPE_SMALL_STRUCT + size; + return (FFI_SYSV_TYPE_SMALL_STRUCT - 1) + size; #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE else if (cif->rtype->type == FFI_TYPE_LONGDOUBLE && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) diff --git a/src/foreign/gcc/libffi/src/powerpc/ffitarget.h b/src/foreign/gcc/libffi/src/powerpc/ffitarget.h index e3fa30be6b..a39a626716 100644 --- a/src/foreign/gcc/libffi/src/powerpc/ffitarget.h +++ b/src/foreign/gcc/libffi/src/powerpc/ffitarget.h @@ -1,6 +1,6 @@ /* -----------------------------------------------------------------*-C-*- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. - Copyright (C) 2007 Free Software Foundation, Inc + Copyright (C) 2007, 2008 Free Software Foundation, Inc Target configuration macros for PowerPC. Permission is hereby granted, free of charge, to any person obtaining @@ -77,6 +77,8 @@ typedef enum ffi_abi { FFI_SYSV, FFI_GCC_SYSV, FFI_LINUX64, + FFI_LINUX, + FFI_LINUX_SOFT_FLOAT, FFI_DEFAULT_ABI = FFI_SYSV, #endif @@ -95,7 +97,9 @@ typedef enum ffi_abi { /* Needed for soft-float long-double-128 support. */ #define FFI_TYPE_UINT128 (FFI_TYPE_LAST + 1) -/* Needed for FFI_SYSV small structure returns. */ +/* Needed for FFI_SYSV small structure returns. + We use two flag bits, (FLAG_SYSV_SMST_R3, FLAG_SYSV_SMST_R4) which are + defined in ffi.c, to determine the exact return type and its size. */ #define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 2) #if defined(POWERPC64) || defined(POWERPC_AIX) diff --git a/src/foreign/gcc/libffi/src/powerpc/ppc_closure.S b/src/foreign/gcc/libffi/src/powerpc/ppc_closure.S index c9f5742f5a..f65784bab1 100644 --- a/src/foreign/gcc/libffi/src/powerpc/ppc_closure.S +++ b/src/foreign/gcc/libffi/src/powerpc/ppc_closure.S @@ -295,3 +295,7 @@ END(ffi_closure_SYSV) .LEFDE1: #endif + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libffi/src/powerpc/sysv.S b/src/foreign/gcc/libffi/src/powerpc/sysv.S index 21367145eb..d402067aab 100644 --- a/src/foreign/gcc/libffi/src/powerpc/sysv.S +++ b/src/foreign/gcc/libffi/src/powerpc/sysv.S @@ -223,3 +223,7 @@ END(ffi_call_SYSV) .align 2 .LEFDE1: #endif + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libffi/src/s390/sysv.S b/src/foreign/gcc/libffi/src/s390/sysv.S index e9cbed977a..09cdec14ac 100644 --- a/src/foreign/gcc/libffi/src/s390/sysv.S +++ b/src/foreign/gcc/libffi/src/s390/sysv.S @@ -427,3 +427,6 @@ ffi_closure_SYSV: #endif +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libffi/src/sh/ffi.c b/src/foreign/gcc/libffi/src/sh/ffi.c index 0cb8c72ccf..850fde0a02 100644 --- a/src/foreign/gcc/libffi/src/sh/ffi.c +++ b/src/foreign/gcc/libffi/src/sh/ffi.c @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Kaz Kojima + ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Kaz Kojima SuperH Foreign Function Interface @@ -459,7 +460,7 @@ ffi_prep_closure_loc (ffi_closure* closure, void *codeloc) { unsigned int *tramp; - unsigned short insn; + unsigned int insn; FFI_ASSERT (cif->abi == FFI_GCC_SYSV); diff --git a/src/foreign/gcc/libffi/src/sh/sysv.S b/src/foreign/gcc/libffi/src/sh/sysv.S index 6628f2d1e5..80df0061d4 100644 --- a/src/foreign/gcc/libffi/src/sh/sysv.S +++ b/src/foreign/gcc/libffi/src/sh/sysv.S @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - sysv.S - Copyright (c) 2002, 2003, 2004, 2006 Kaz Kojima + sysv.S - Copyright (c) 2002, 2003, 2004, 2006, 2008 Kaz Kojima SuperH Foreign Function Interface @@ -701,6 +701,10 @@ L_case_v: .ffi_closure_SYSV_end: .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif + .section ".eh_frame","aw",@progbits __FRAME_BEGIN__: .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */ diff --git a/src/foreign/gcc/libffi/src/sh64/sysv.S b/src/foreign/gcc/libffi/src/sh64/sysv.S index bdee4188ec..5bf6101bbb 100644 --- a/src/foreign/gcc/libffi/src/sh64/sysv.S +++ b/src/foreign/gcc/libffi/src/sh64/sysv.S @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - sysv.S - Copyright (c) 2003, 2004, 2006 Kaz Kojima + sysv.S - Copyright (c) 2003, 2004, 2006, 2008 Kaz Kojima SuperH SHmedia Foreign Function Interface @@ -437,6 +437,10 @@ ENTRY(ffi_closure_SYSV) .ffi_closure_SYSV_end: .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif + .section ".eh_frame","aw",@progbits __FRAME_BEGIN__: .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */ diff --git a/src/foreign/gcc/libffi/src/sparc/v8.S b/src/foreign/gcc/libffi/src/sparc/v8.S index 709423ce90..1d7bfa51da 100644 --- a/src/foreign/gcc/libffi/src/sparc/v8.S +++ b/src/foreign/gcc/libffi/src/sparc/v8.S @@ -265,3 +265,7 @@ done2: .byte 0x1f ! uleb128 0x1f .align WS .LLEFDE2: + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libffi/src/sparc/v9.S b/src/foreign/gcc/libffi/src/sparc/v9.S index d640e0232d..a8e8bf98d1 100644 --- a/src/foreign/gcc/libffi/src/sparc/v9.S +++ b/src/foreign/gcc/libffi/src/sparc/v9.S @@ -300,3 +300,7 @@ longdouble1: .align 8 .LLEFDE2: #endif + +#ifdef __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libffi/src/x86/sysv.S b/src/foreign/gcc/libffi/src/x86/sysv.S index f22c939c0a..4e652207ed 100644 --- a/src/foreign/gcc/libffi/src/x86/sysv.S +++ b/src/foreign/gcc/libffi/src/x86/sysv.S @@ -210,6 +210,8 @@ ffi_closure_SYSV: je .Lcls_retldouble cmpl $FFI_TYPE_SINT64, %eax je .Lcls_retllong + cmpl $FFI_TYPE_STRUCT, %eax + je .Lcls_retstruct .Lcls_epilogue: movl %ebp, %esp popl %ebp @@ -230,6 +232,10 @@ ffi_closure_SYSV: movl (%ecx), %eax movl 4(%ecx), %edx jmp .Lcls_epilogue +.Lcls_retstruct: + movl %ebp, %esp + popl %ebp + ret $4 .LFE2: .size ffi_closure_SYSV, .-ffi_closure_SYSV @@ -424,3 +430,7 @@ ffi_closure_raw_SYSV: #endif #endif /* ifndef __x86_64__ */ + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libffi/src/x86/unix64.S b/src/foreign/gcc/libffi/src/x86/unix64.S index 831e1d7132..a33888180b 100644 --- a/src/foreign/gcc/libffi/src/x86/unix64.S +++ b/src/foreign/gcc/libffi/src/x86/unix64.S @@ -410,3 +410,7 @@ ffi_closure_unix64: .LEFDE3: #endif /* __x86_64__ */ + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/src/foreign/gcc/libtool-ldflags b/src/foreign/gcc/libtool-ldflags new file mode 100755 index 0000000000..e32e37bf10 --- /dev/null +++ b/src/foreign/gcc/libtool-ldflags @@ -0,0 +1,106 @@ +#! /bin/sh + +# Script to translate LDFLAGS into a form suitable for use with libtool. + +# Copyright (C) 2005 Free Software Foundation, Inc. +# +# 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 +# (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. +# +# 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. + +# Contributed by CodeSourcery, LLC. + +# This script is designed to be used from a Makefile that uses libtool +# to build libraries as follows: +# +# LTLDFLAGS = $(shell libtool-ldflags $(LDFLAGS)) +# +# Then, use (LTLDFLAGS) in place of $(LDFLAGS) in your link line. + +# The output of the script. This string is built up as we process the +# arguments. +result= +prev_arg= + +for arg +do + case $arg in + -f*|--*) + # Libtool does not ascribe any special meaning options + # that begin with -f or with a double-dash. So, it will + # think these options are linker options, and prefix them + # with "-Wl,". Then, the compiler driver will ignore the + # options. So, we prefix these options with -Xcompiler to + # make clear to libtool that they are in fact compiler + # options. + case $prev_arg in + -Xpreprocessor|-Xcompiler|-Xlinker) + # This option is already prefixed; don't prefix it again. + ;; + *) + result="$result -Xcompiler" + ;; + esac + ;; + *) + # We do not want to add -Xcompiler to other options because + # that would prevent libtool itself from recognizing them. + ;; + esac + prev_arg=$arg + + # If $(LDFLAGS) is (say): + # a "b'c d" e + # then the user expects that: + # $(LD) $(LDFLAGS) + # will pass three arguments to $(LD): + # 1) a + # 2) b'c d + # 3) e + # We must ensure, therefore, that the arguments are appropriately + # quoted so that using: + # libtool --mode=link ... $(LTLDFLAGS) + # will result in the same number of arguments being passed to + # libtool. In other words, when this script was invoked, the shell + # removed one level of quoting, present in $(LDFLAGS); we have to put + # it back. + + # Quote any embedded single quotes. + case $arg in + *"'"*) + # The following command creates the script: + # 1s,^X,,;s|'|'"'"'|g + # which removes a leading X, and then quotes and embedded single + # quotes. + sed_script="1s,^X,,;s|'|'\"'\"'|g" + # Add a leading "X" so that if $arg starts with a dash, + # the echo command will not try to interpret the argument + # as a command-line option. + arg="X$arg" + # Generate the quoted string. + quoted_arg=`echo "$arg" | sed -e "$sed_script"` + ;; + *) + quoted_arg=$arg + ;; + esac + # Surround the entire argument with single quotes. + quoted_arg="'"$quoted_arg"'" + + # Add it to the string. + result="$result $quoted_arg" +done + +# Output the string we have built up. +echo "$result" diff --git a/src/foreign/gcc/libtool.m4 b/src/foreign/gcc/libtool.m4 index ddc4b1189c..26a039a5a4 100644 --- a/src/foreign/gcc/libtool.m4 +++ b/src/foreign/gcc/libtool.m4 @@ -319,7 +319,7 @@ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) @@ -3419,7 +3419,8 @@ m4_if([$1], [CXX], [ # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3715,7 +3716,8 @@ m4_if([$1], [CXX], [ # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) @@ -3791,7 +3793,8 @@ m4_if([$1], [CXX], [ mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) diff --git a/src/foreign/gcc/ltsugar.m4 b/src/foreign/gcc/ltsugar.m4 index fc51dc7e89..dd4f871ee9 100644 --- a/src/foreign/gcc/ltsugar.m4 +++ b/src/foreign/gcc/ltsugar.m4 @@ -1,13 +1,13 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Gary V. Vaughan. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 3 ltsugar.m4 +# serial 4 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) @@ -46,6 +46,20 @@ m4_define([lt_cdr], m4_define([lt_unquote], $1) +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded. No SEPARATOR is +# output if MACRO-NAME was previously undefined (different than defined +# and empty). +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4 mistakenly expanded SEPARATOR. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of @@ -67,10 +81,10 @@ m4_define([lt_combine], # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], - [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3, - [$5], - [m4_append([$1], [$2], [$3])$4])], - [m4_append([$1], [$2], [$3])$4])]) + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE)