summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-04-11 09:13:11 +0000
committer <>2014-04-23 12:05:38 +0000
commit6af3fdec2262dd94954acc5e426ef71cbd4521d3 (patch)
tree9be02de9a80f7935892a2d03741adee44723e65d /lto-plugin
parent19be2b4342ac32e9edc78ce6fed8f61b63ae98d1 (diff)
downloadgcc-tarball-6af3fdec2262dd94954acc5e426ef71cbd4521d3.tar.gz
Imported from /home/lorry/working-area/delta_gcc-tarball/gcc-4.7.3.tar.bz2.gcc-4.7.3
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog70
-rw-r--r--lto-plugin/Makefile.am2
-rw-r--r--lto-plugin/Makefile.in4
-rw-r--r--lto-plugin/aclocal.m41
-rwxr-xr-xlto-plugin/configure56
-rw-r--r--lto-plugin/configure.ac1
-rw-r--r--lto-plugin/lto-plugin.c40
7 files changed, 147 insertions, 27 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index 3fc931f9f1..3e6d6938d5 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,20 +1,74 @@
-2011-10-26 Release Manager
+2013-04-11 Release Manager
- * GCC 4.6.2 released.
+ * GCC 4.7.3 released.
-2011-06-27 Release Manager
+2012-09-20 Release Manager
- * GCC 4.6.1 released.
+ * GCC 4.7.2 released.
+
+2012-06-14 Release Manager
+
+ * GCC 4.7.1 released.
+
+2012-03-22 Release Manager
+
+ * GCC 4.7.0 released.
+
+2012-02-22 Kai Tietz <ktietz@redhat.com>
+
+ PR lto/50616
+ * lto-plugin.c (PRI_LL): New macro.
+ (dump_symtab): Use PRI_LL instead of ll in print.
+ (process_symtab): Use PRI_LL instead of ll in scan.
+
+2011-12-20 Andreas Schwab <schwab@linux-m68k.org>
+
+ * configure: Regenerate.
+
+2011-12-19 Andreas Schwab <schwab@linux-m68k.org>
+
+ * configure: Regenerate.
+
+2011-11-21 Andreas Tobler <andreast@fgznet.ch>
+
+ * configure: Regenerate.
+
+2011-10-02 Jan Hubicka <jh@suse.cz>
+
+ PR lto/47247
+ * lto-plugin.c (get_symbols_v2): New variable.
+ (write_resolution): Use V2 API when available.
+ (onload): Handle LDPT_GET_SYMBOLS_V2.
+
+2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
+ Andi Kleen <ak@linux.intel.com>
+
+ PR lto/50568
+ * lto-plugin.c (sym_aux): Change id to unsigned long long.
+ (plugin_symtab): Likewise.
+ (dump_symtab): Likewise.
+ (resolve_conflicts): Likewise.
+ (process_symtab): Likewise.
+
+2011-08-10 Richard Guenther <rguenther@suse.de>
+
+ PR bootstrap/49907
+ lto-plugin/
+ * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
+ * Makefile.am (AM_CFLAGS): Adjust. Do not build with -Werror.
+ * configure: Regenerate.
+ * Makefile.in: Likewise.
+ * aclocal.m4: Likewise.
+
+2011-04-20 Jim Meyering <meyering@redhat.com>
+
+ * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
2011-04-05 Richard Guenther <rguenther@suse.de>
PR bootstrap/48431
* lto-plugin.c (claim_file_handler): Do not declare vars in code.
-2011-03-25 Release Manager
-
- * GCC 4.6.0 released.
-
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index 4067c43150..b24015e137 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -8,7 +8,7 @@ target_noncanonical := @target_noncanonical@
libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
-AM_CFLAGS = -Wall -Werror
+AM_CFLAGS = @ac_lto_plugin_warn_cflags@
AM_LIBTOOLFLAGS = --tag=disable-static
libexecsub_LTLIBRARIES = liblto_plugin.la
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 86edb99bfa..0c8d89fc7e 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -47,6 +47,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lthostflags.m4 \
$(top_srcdir)/../config/override.m4 \
+ $(top_srcdir)/../config/warnings.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
@@ -167,6 +168,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_lto_plugin_warn_cflags = @ac_lto_plugin_warn_cflags@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -227,7 +229,7 @@ AUTOMAKE_OPTIONS = no-dependencies
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
-AM_CFLAGS = -Wall -Werror
+AM_CFLAGS = @ac_lto_plugin_warn_cflags@
AM_LIBTOOLFLAGS = --tag=disable-static
libexecsub_LTLIBRARIES = liblto_plugin.la
gcc_build_dir = ../$(host_subdir)/gcc
diff --git a/lto-plugin/aclocal.m4 b/lto-plugin/aclocal.m4
index 7c370a7d01..ce9a5c2e42 100644
--- a/lto-plugin/aclocal.m4
+++ b/lto-plugin/aclocal.m4
@@ -973,6 +973,7 @@ m4_include([../config/depstand.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/lthostflags.m4])
m4_include([../config/override.m4])
+m4_include([../config/warnings.m4])
m4_include([../libtool.m4])
m4_include([../ltoptions.m4])
m4_include([../ltsugar.m4])
diff --git a/lto-plugin/configure b/lto-plugin/configure
index c9c84a1051..7f1ade113a 100755
--- a/lto-plugin/configure
+++ b/lto-plugin/configure
@@ -622,6 +622,7 @@ EGREP
GREP
SED
LIBTOOL
+ac_lto_plugin_warn_cflags
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -4040,6 +4041,51 @@ rm -rf conftest*
fi
fi
+ac_lto_plugin_warn_cflags=
+save_CFLAGS="$CFLAGS"
+for real_option in -Wall; do
+ # Do the check with the no- prefix removed since gcc silently
+ # accepts any -Wno-* option on purpose
+ case $real_option in
+ -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+ *) option=$real_option ;;
+ esac
+ as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
+$as_echo_n "checking whether $CC supports $option... " >&6; }
+if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ CFLAGS="$option"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_acx_Woption=yes"
+else
+ eval "$as_acx_Woption=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+eval ac_res=\$$as_acx_Woption
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
+ ac_lto_plugin_warn_cflags="$ac_lto_plugin_warn_cflags${ac_lto_plugin_warn_cflags:+ }$real_option"
+fi
+ done
+CFLAGS="$save_CFLAGS"
+
case `pwd` in
*\ * | *\ *)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -8733,7 +8779,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
@@ -9646,7 +9692,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -9664,7 +9710,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
@@ -10498,7 +10544,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10501 "configure"
+#line 10547 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10604,7 +10650,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10607 "configure"
+#line 10653 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac
index 1aba69713f..9a418d231f 100644
--- a/lto-plugin/configure.ac
+++ b/lto-plugin/configure.ac
@@ -6,6 +6,7 @@ AM_INIT_AUTOMAKE([foreign no-dist])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_SYS_LARGEFILE
+ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags])
AM_PROG_LIBTOOL
ACX_LT_HOST_FLAGS
AC_SUBST(target_noncanonical)
diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index 661f10cdf9..8d55cb8f49 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -62,6 +62,14 @@ along with this program; see the file COPYING3. If not see
#include "simple-object.h"
#include "plugin-api.h"
+/* We need to use I64 instead of ll width-specifier on native Windows.
+ The reason for this is that older MS-runtimes don't support the ll. */
+#ifdef __MINGW32__
+#define PRI_LL "I64"
+#else
+#define PRI_LL "ll"
+#endif
+
/* Handle opening elf files on hosts, such as Windows, that may use
text file handling that will break binary access. */
#ifndef O_BINARY
@@ -80,12 +88,13 @@ along with this program; see the file COPYING3. If not see
/* The part of the symbol table the plugin has to keep track of. Note that we
must keep SYMS until all_symbols_read is called to give the linker time to
- copy the symbol information. */
+ copy the symbol information.
+ The id must be 64bit to minimze collisions. */
struct sym_aux
{
uint32_t slot;
- unsigned id;
+ unsigned long long id;
unsigned next_conflict;
};
@@ -94,7 +103,7 @@ struct plugin_symtab
int nsyms;
struct sym_aux *aux;
struct ld_plugin_symbol *syms;
- unsigned id;
+ unsigned long long id;
};
/* Encapsulates object file data during symbol scan. */
@@ -129,7 +138,7 @@ enum symbol_style
static char *arguments_file_name;
static ld_plugin_register_claim_file register_claim_file;
static ld_plugin_register_all_symbols_read register_all_symbols_read;
-static ld_plugin_get_symbols get_symbols;
+static ld_plugin_get_symbols get_symbols, get_symbols_v2;
static ld_plugin_register_cleanup register_cleanup;
static ld_plugin_add_input_file add_input_file;
static ld_plugin_add_input_library add_input_library;
@@ -312,8 +321,7 @@ free_1 (void)
{
struct ld_plugin_symbol *s = &symtab->syms[j];
free (s->name);
- if (s->comdat_key)
- free (s->comdat_key);
+ free (s->comdat_key);
}
free (symtab->syms);
symtab->syms = NULL;
@@ -342,8 +350,7 @@ free_2 (void)
claimed_files = NULL;
num_claimed_files = 0;
- if (arguments_file_name)
- free (arguments_file_name);
+ free (arguments_file_name);
arguments_file_name = NULL;
}
@@ -361,7 +368,8 @@ dump_symtab (FILE *f, struct plugin_symtab *symtab)
assert (resolution != LDPR_UNKNOWN);
- fprintf (f, "%u %x %s %s\n", (unsigned int) slot, symtab->aux[j].id,
+ fprintf (f, "%u %" PRI_LL "x %s %s\n",
+ (unsigned int) slot, symtab->aux[j].id,
lto_resolution_str[resolution],
symtab->syms[j].name);
}
@@ -443,7 +451,12 @@ write_resolution (void)
struct plugin_symtab *symtab = &info->symtab;
struct ld_plugin_symbol *syms = symtab->syms;
- get_symbols (info->handle, symtab->nsyms, syms);
+ /* Version 2 of API supports IRONLY_EXP resolution that is
+ accepted by GCC-4.7 and newer. */
+ if (get_symbols_v2)
+ get_symbols_v2 (info->handle, symtab->nsyms, syms);
+ else
+ get_symbols (info->handle, symtab->nsyms, syms);
finish_conflict_resolution (symtab, &info->conflicts);
@@ -761,7 +774,7 @@ resolve_conflicts (struct plugin_symtab *t, struct plugin_symtab *conflicts)
{
SWAP (struct ld_plugin_symbol, *orig, *s);
SWAP (uint32_t, orig_aux->slot, aux->slot);
- SWAP (unsigned, orig_aux->id, aux->id);
+ SWAP (unsigned long long, orig_aux->id, aux->id);
/* Don't swap conflict chain pointer */
}
@@ -811,7 +824,7 @@ process_symtab (void *data, const char *name, off_t offset, off_t length)
s = strrchr (name, '.');
if (s)
- sscanf (s, ".%x", &obj->out->id);
+ sscanf (s, ".%" PRI_LL "x", &obj->out->id);
secdata = xmalloc (length);
offset += obj->file->offset;
if (offset != lseek (obj->file->fd, offset, SEEK_SET)
@@ -988,6 +1001,9 @@ onload (struct ld_plugin_tv *tv)
case LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK:
register_all_symbols_read = p->tv_u.tv_register_all_symbols_read;
break;
+ case LDPT_GET_SYMBOLS_V2:
+ get_symbols_v2 = p->tv_u.tv_get_symbols;
+ break;
case LDPT_GET_SYMBOLS:
get_symbols = p->tv_u.tv_get_symbols;
break;