mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-next
This commit is contained in:
commit
b506f93641
@ -140,19 +140,19 @@ do_autoreconf() {
|
||||
|
||||
strip_lto() {
|
||||
# strip out LTO optimization from *FLAGS
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-flto||"`
|
||||
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-flto||"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-flto||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-flto||g"`
|
||||
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-flto||g"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-flto||g"`
|
||||
}
|
||||
|
||||
strip_linker_plugin() {
|
||||
# strip out usage from linker plugin
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-linker-plugin||"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-linker-plugin||g"`
|
||||
}
|
||||
|
||||
strip_gold() {
|
||||
# strip out usage from GOLD linker
|
||||
strip_linker_plugin
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-ld=gold||"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-ld=gold||g"`
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ fi
|
||||
if [ "$OPTIMIZATIONS" = speed ];then
|
||||
GCC_OPTIM="$GCC_OPTIM -O3"
|
||||
GCC_OPTIM="$GCC_OPTIM -fexcess-precision=fast"
|
||||
GCC_OPTIM="$GCC_OPTIM -ffast-math"
|
||||
LD_OPTIM="-Wl,--as-needed"
|
||||
fi
|
||||
|
||||
@ -31,13 +32,15 @@ if [ "$GRAPHITE_SUPPORT" = yes ];then
|
||||
GCC_OPTIM="$GCC_OPTIM -fgraphite-identity"
|
||||
fi
|
||||
|
||||
if [ "$LTO_SUPPORT" = yes ];then
|
||||
GCC_OPTIM="$GCC_OPTIM -flto"
|
||||
if [ "$LTO_SUPPORT" = yes -o "$GOLD_SUPPORT" = yes ];then
|
||||
LD_OPTIM="$LD_OPTIM -fuse-linker-plugin"
|
||||
fi
|
||||
|
||||
if [ "$LTO_SUPPORT" = yes ];then
|
||||
GCC_OPTIM="$GCC_OPTIM -flto"
|
||||
fi
|
||||
|
||||
if [ "$GOLD_SUPPORT" = yes ];then
|
||||
LD_OPTIM="$LD_OPTIM -fuse-linker-plugin"
|
||||
LD_OPTIM="$LD_OPTIM -fuse-ld=gold"
|
||||
fi
|
||||
|
||||
|
@ -22,9 +22,6 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# fails to build with gcc-4.6.1
|
||||
strip_lto
|
||||
|
||||
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=32 -fPIC -DPIC"
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# fails to build with GOLD linker
|
||||
strip_gold
|
||||
|
||||
cd $BUILD/$1
|
||||
make CC=$TARGET_CC \
|
||||
RANLIB=$TARGET_RANLIB \
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# libplist fails to build with GOLD linker
|
||||
strip_gold
|
||||
|
||||
cd $PKG_BUILD
|
||||
mkdir -p build && cd build
|
||||
|
||||
|
@ -22,9 +22,6 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# fails to build with gcc-4.6.1
|
||||
strip_lto
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
mkdir -p m4 && do_autoreconf
|
||||
|
@ -24,7 +24,10 @@
|
||||
|
||||
get_graphicdrivers
|
||||
|
||||
strip_lto # Mesa fails to build with LTO optimization
|
||||
# dont use gold linker because of compiling issues
|
||||
strip_gold
|
||||
strip_linker_plugin
|
||||
strip_lto # Mesa fails to build with LTO optimization
|
||||
|
||||
if [ "$LLVM_SUPPORT" = "yes" ]; then
|
||||
export LLVM_CONFIG="$SYSROOT_PREFIX/usr/bin/llvm-config"
|
||||
|
@ -30,16 +30,6 @@ else
|
||||
BUSYBOX_CFG_FILE=$ROOT/$PKG_DIR/config/$1.conf
|
||||
fi
|
||||
|
||||
# fails to build with gcc-4.6.1
|
||||
strip_lto
|
||||
|
||||
# fails to build with gcc-4.6.1 (ggc bug #49716
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-ftree-loop-distribution||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-floop-interchange||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-floop-strip-mine||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-floop-block||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-fgraphite-identity||"`
|
||||
|
||||
# optimize for size
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-Os|"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-Os|"`
|
||||
|
@ -78,6 +78,8 @@ fi
|
||||
|
||||
# xbmc (ffmpeg) fails to build with LTO optimization
|
||||
strip_lto
|
||||
strip_gold
|
||||
strip_linker_plugin
|
||||
|
||||
# dont use some optimizations because of problems
|
||||
# this fixes problems with faac implementation of ffmpeg
|
||||
|
@ -28,16 +28,6 @@ else
|
||||
BUSYBOX_CFG_FILE=$ROOT/$PKG_DIR/config/$1.conf
|
||||
fi
|
||||
|
||||
# fails to build with gcc-4.6.1
|
||||
strip_lto
|
||||
|
||||
# fails to build with gcc-4.6.1 (ggc bug #49716
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-ftree-loop-distribution||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-floop-interchange||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-floop-strip-mine||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-floop-block||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-fgraphite-identity||"`
|
||||
|
||||
# optimize for size
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-Os|"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-Os|"`
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# parted fails to build with GOLD linker
|
||||
strip_gold
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
|
@ -26,13 +26,13 @@ strip_lto # Fails to compile with GCC's link time optimization.
|
||||
strip_gold # Fails to compile using the gold linker.
|
||||
|
||||
# Filter out some problematic *FLAGS
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-ffast-math||"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-O2|"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-O2|"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-ffast-math||g"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-O2|g"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-O2|g"`
|
||||
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-ffast-math||"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Ofast|-O2|"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-O.|-O2|"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-ffast-math||g"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Ofast|-O2|g"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-O.|-O2|g"`
|
||||
|
||||
# set some CFLAGS we need
|
||||
CFLAGS="$CFLAGS -g -fno-stack-protector"
|
||||
|
@ -49,11 +49,9 @@ mkdir -p objdir-$1 && cd objdir-$1
|
||||
--disable-__cxa_atexit \
|
||||
--disable-libada \
|
||||
--disable-libmudflap \
|
||||
--enable-gold=yes \
|
||||
--enable-ld=default \
|
||||
--enable-gold=both/ld \
|
||||
--enable-plugin \
|
||||
--enable-lto \
|
||||
--disable-libquadmath \
|
||||
--disable-libssp \
|
||||
--disable-libgomp \
|
||||
--disable-shared \
|
||||
|
@ -49,11 +49,9 @@ mkdir -p objdir-$1 && cd objdir-$1
|
||||
--disable-libmudflap \
|
||||
--disable-libssp \
|
||||
--disable-multilib \
|
||||
--enable-gold=yes \
|
||||
--enable-ld=default \
|
||||
--enable-gold=both/ld \
|
||||
--enable-plugin \
|
||||
--enable-lto \
|
||||
--disable-libquadmath \
|
||||
--enable-tls \
|
||||
--enable-shared \
|
||||
--enable-c99 \
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="gcc"
|
||||
PKG_VERSION="4.6.1"
|
||||
PKG_VERSION="4.5.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -1,7 +1,99 @@
|
||||
diff -Naur gcc-4.6.0-old/gcc/collect2.c gcc-4.6.0-new/gcc/collect2.c
|
||||
--- gcc-4.6.0-old/gcc/collect2.c 2011-01-06 10:50:20.000000000 -0800
|
||||
+++ gcc-4.6.0-new/gcc/collect2.c 2011-03-28 21:52:29.000000000 -0700
|
||||
@@ -1075,17 +1075,19 @@
|
||||
diff -Naur gcc-4.5-20101118/configure.ac gcc-4.5-20101118.patch/configure.ac
|
||||
--- gcc-4.5-20101118/configure.ac 2010-10-06 12:29:55.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/configure.ac 2010-11-26 03:48:17.007444557 +0100
|
||||
@@ -174,7 +174,7 @@
|
||||
# know that we are building the simulator.
|
||||
# binutils, gas and ld appear in that order because it makes sense to run
|
||||
# "make check" in that particular order.
|
||||
-# If --enable-gold is used, "gold" will replace "ld".
|
||||
+# If --enable-gold is used, "gold" may replace "ld".
|
||||
host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
|
||||
|
||||
# libgcj represents the runtime libraries only used by gcj.
|
||||
@@ -315,37 +315,57 @@
|
||||
esac
|
||||
|
||||
# Handle --enable-gold.
|
||||
+# --enable-gold Build only gold
|
||||
+# --disable-gold [default] Build only ld
|
||||
+# --enable-gold=both Build both gold and ld, ld is default
|
||||
+# --enable-gold=both/ld Same
|
||||
+# --enable-gold=both/gold Build both gold and ld, gold is default, ld is renamed ld.bfd
|
||||
|
||||
AC_ARG_ENABLE(gold,
|
||||
-[ --enable-gold use gold instead of ld],
|
||||
+[ --enable-gold[[=ARG]] build gold [[ARG={both}[[/{gold,ld}]]]]],
|
||||
ENABLE_GOLD=$enableval,
|
||||
ENABLE_GOLD=no)
|
||||
-if test "${ENABLE_GOLD}" = "yes"; then
|
||||
- # Check for ELF target.
|
||||
- is_elf=no
|
||||
- case "${target}" in
|
||||
- *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
|
||||
- | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
|
||||
- | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*)
|
||||
+ case "${ENABLE_GOLD}" in
|
||||
+ yes|both|both/gold|both/ld)
|
||||
+ # Check for ELF target.
|
||||
+ is_elf=no
|
||||
+ case "${target}" in
|
||||
+ *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
|
||||
+ | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
|
||||
+ | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*)
|
||||
+ case "${target}" in
|
||||
+ *-*-linux*aout* | *-*-linux*oldld*)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ is_elf=yes
|
||||
+ ;;
|
||||
+ esac
|
||||
+ esac
|
||||
+
|
||||
+ if test "$is_elf" = "yes"; then
|
||||
+ # Check for target supported by gold.
|
||||
case "${target}" in
|
||||
- *-*-linux*aout* | *-*-linux*oldld*)
|
||||
- ;;
|
||||
- *)
|
||||
- is_elf=yes
|
||||
+ i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
|
||||
+ case "${ENABLE_GOLD}" in
|
||||
+ both*)
|
||||
+ configdirs="$configdirs gold"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ ENABLE_GOLD=yes
|
||||
;;
|
||||
esac
|
||||
+ fi
|
||||
+ ;;
|
||||
+ no)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ AC_MSG_ERROR([invalid --enable-gold argument])
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
- if test "$is_elf" = "yes"; then
|
||||
- # Check for target supported by gold.
|
||||
- case "${target}" in
|
||||
- i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
|
||||
- configdirs=`echo " ${configdirs} " | sed -e 's/ ld / gold /'`
|
||||
- ;;
|
||||
- esac
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
# Configure extra directories which are host specific
|
||||
|
||||
case "${host}" in
|
||||
diff -Naur gcc-4.5-20101118/gcc/collect2.c gcc-4.5-20101118.patch/gcc/collect2.c
|
||||
--- gcc-4.5-20101118/gcc/collect2.c 2010-06-24 23:06:37.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/collect2.c 2010-11-26 03:42:31.162881405 +0100
|
||||
@@ -1114,17 +1114,19 @@
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@ -29,7 +121,7 @@ diff -Naur gcc-4.6.0-old/gcc/collect2.c gcc-4.6.0-new/gcc/collect2.c
|
||||
|
||||
#ifdef CROSS_DIRECTORY_STRUCTURE
|
||||
/* If we look for a program in the compiler directories, we just use
|
||||
@@ -1095,6 +1097,10 @@
|
||||
@@ -1134,6 +1136,10 @@
|
||||
|
||||
const char *const full_ld_suffix =
|
||||
concat(target_machine, "-", ld_suffix, NULL);
|
||||
@ -40,7 +132,7 @@ diff -Naur gcc-4.6.0-old/gcc/collect2.c gcc-4.6.0-new/gcc/collect2.c
|
||||
const char *const full_plugin_ld_suffix =
|
||||
concat(target_machine, "-", plugin_ld_suffix, NULL);
|
||||
const char *const full_nm_suffix =
|
||||
@@ -1110,15 +1116,17 @@
|
||||
@@ -1149,15 +1155,17 @@
|
||||
const char *const full_gstrip_suffix =
|
||||
concat (target_machine, "-", gstrip_suffix, NULL);
|
||||
#else
|
||||
@ -64,7 +156,7 @@ diff -Naur gcc-4.6.0-old/gcc/collect2.c gcc-4.6.0-new/gcc/collect2.c
|
||||
#endif /* CROSS_DIRECTORY_STRUCTURE */
|
||||
|
||||
const char *arg;
|
||||
@@ -1132,7 +1140,13 @@
|
||||
@@ -1171,7 +1179,13 @@
|
||||
const char **c_ptr;
|
||||
char **ld1_argv;
|
||||
const char **ld1;
|
||||
@ -79,20 +171,37 @@ diff -Naur gcc-4.6.0-old/gcc/collect2.c gcc-4.6.0-new/gcc/collect2.c
|
||||
|
||||
/* The kinds of symbols we will have to consider when scanning the
|
||||
outcome of a first pass link. This is ALL to start with, then might
|
||||
@@ -1209,15 +1223,21 @@
|
||||
else if (! strcmp (argv[i], "-flto-partition=none"))
|
||||
no_partition = true;
|
||||
else if ((! strncmp (argv[i], "-flto=", 6)
|
||||
- || ! strcmp (argv[i], "-flto")) && ! use_plugin)
|
||||
+ || ! strcmp (argv[i], "-flto"))
|
||||
@@ -1188,7 +1202,6 @@
|
||||
int first_file;
|
||||
int num_c_args;
|
||||
char **old_argv;
|
||||
-
|
||||
bool use_verbose = false;
|
||||
|
||||
old_argv = argv;
|
||||
@@ -1244,22 +1257,29 @@
|
||||
{
|
||||
if (! strcmp (argv[i], "-debug"))
|
||||
debug = 1;
|
||||
- else if (! strcmp (argv[i], "-flto") && ! use_plugin)
|
||||
+ else if (! strcmp (argv[i], "-flto")
|
||||
+ && selected_linker != PLUGIN_LINKER)
|
||||
lto_mode = LTO_MODE_WHOPR;
|
||||
else if (!strncmp (argv[i], "-fno-lto", 8))
|
||||
lto_mode = LTO_MODE_NONE;
|
||||
{
|
||||
use_verbose = true;
|
||||
lto_mode = LTO_MODE_LTO;
|
||||
}
|
||||
- else if (! strcmp (argv[i], "-fwhopr") && ! use_plugin)
|
||||
+ else if (! strcmp (argv[i], "-fwhopr")
|
||||
+ && selected_linker != PLUGIN_LINKER)
|
||||
{
|
||||
use_verbose = true;
|
||||
lto_mode = LTO_MODE_WHOPR;
|
||||
}
|
||||
else if (! strcmp (argv[i], "-plugin"))
|
||||
{
|
||||
- use_plugin = true;
|
||||
+ selected_linker = PLUGIN_LINKER;
|
||||
use_verbose = true;
|
||||
lto_mode = LTO_MODE_NONE;
|
||||
}
|
||||
+ else if (! strcmp (argv[i], "-use-gold"))
|
||||
@ -103,7 +212,7 @@ diff -Naur gcc-4.6.0-old/gcc/collect2.c gcc-4.6.0-new/gcc/collect2.c
|
||||
#ifdef COLLECT_EXPORT_LIST
|
||||
/* since -brtl, -bexport, -b64 are not position dependent
|
||||
also check for them here */
|
||||
@@ -1299,35 +1319,108 @@
|
||||
@@ -1339,35 +1359,108 @@
|
||||
/* Try to discover a valid linker/nm/strip to use. */
|
||||
|
||||
/* Maybe we know the right file to use (if not cross). */
|
||||
@ -226,10 +335,10 @@ diff -Naur gcc-4.6.0-old/gcc/collect2.c gcc-4.6.0-new/gcc/collect2.c
|
||||
|
||||
#ifdef REAL_NM_FILE_NAME
|
||||
nm_file_name = find_a_file (&path, REAL_NM_FILE_NAME);
|
||||
diff -Naur gcc-4.6.0-old/gcc/common.opt gcc-4.6.0-new/gcc/common.opt
|
||||
--- gcc-4.6.0-old/gcc/common.opt 2011-03-05 16:38:13.000000000 -0800
|
||||
+++ gcc-4.6.0-new/gcc/common.opt 2011-03-28 21:52:29.000000000 -0700
|
||||
@@ -2019,6 +2019,9 @@
|
||||
diff -Naur gcc-4.5-20101118/gcc/common.opt gcc-4.5-20101118.patch/gcc/common.opt
|
||||
--- gcc-4.5-20101118/gcc/common.opt 2010-03-18 04:01:09.000000000 +0100
|
||||
+++ gcc-4.5-20101118.patch/gcc/common.opt 2010-11-26 03:42:31.164881431 +0100
|
||||
@@ -1401,6 +1401,9 @@
|
||||
Common Report Var(flag_unwind_tables) Optimization
|
||||
Just generate unwind tables for exception handling
|
||||
|
||||
@ -239,10 +348,71 @@ diff -Naur gcc-4.6.0-old/gcc/common.opt gcc-4.6.0-new/gcc/common.opt
|
||||
fuse-linker-plugin
|
||||
Common Undocumented
|
||||
|
||||
diff -Naur gcc-4.6.0-old/gcc/configure.ac gcc-4.6.0-new/gcc/configure.ac
|
||||
--- gcc-4.6.0-old/gcc/configure.ac 2011-02-28 07:36:37.000000000 -0800
|
||||
+++ gcc-4.6.0-new/gcc/configure.ac 2011-03-28 21:58:18.000000000 -0700
|
||||
@@ -1937,6 +1937,17 @@
|
||||
diff -Naur gcc-4.5-20101118/gcc/configure gcc-4.5-20101118.patch/gcc/configure
|
||||
--- gcc-4.5-20101118/gcc/configure 2010-10-06 21:09:10.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/configure 2010-11-26 03:42:31.184881696 +0100
|
||||
@@ -684,6 +684,7 @@
|
||||
gcc_cv_objdump
|
||||
ORIGINAL_NM_FOR_TARGET
|
||||
gcc_cv_nm
|
||||
+ORIGINAL_GOLD_FOR_TARGET
|
||||
ORIGINAL_LD_FOR_TARGET
|
||||
ORIGINAL_PLUGIN_LD_FOR_TARGET
|
||||
gcc_cv_ld
|
||||
@@ -17108,7 +17109,7 @@
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
-#line 17111 "configure"
|
||||
+#line 17112 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -17214,7 +17215,7 @@
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
-#line 17217 "configure"
|
||||
+#line 17218 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -20662,6 +20663,21 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+gcc_cv_ld_gold_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gold
|
||||
+
|
||||
+if test "${gcc_cv_gold+set}" = set; then :
|
||||
+
|
||||
+else
|
||||
+
|
||||
+if test -f $gcc_cv_ld_gold_srcdir/configure.ac \
|
||||
+ && test -f ../gold/Makefile \
|
||||
+ && test x$build = x$host; then
|
||||
+ gcc_cv_gold=../gold/ld-new$build_exeext
|
||||
+else
|
||||
+ gcc_cv_gold=''
|
||||
+fi
|
||||
+fi
|
||||
+
|
||||
ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
|
||||
PLUGIN_LD=`basename $gcc_cv_ld`
|
||||
|
||||
@@ -20688,6 +20704,9 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
+ORIGINAL_GOLD_FOR_TARGET=$gcc_cv_gold
|
||||
+
|
||||
+
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5
|
||||
$as_echo_n "checking what linker to use... " >&6; }
|
||||
if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
|
||||
diff -Naur gcc-4.5-20101118/gcc/configure.ac gcc-4.5-20101118.patch/gcc/configure.ac
|
||||
--- gcc-4.5-20101118/gcc/configure.ac 2010-10-06 21:09:10.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/configure.ac 2010-11-26 03:42:31.201881922 +0100
|
||||
@@ -1947,6 +1947,17 @@
|
||||
AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET)
|
||||
fi])
|
||||
|
||||
@ -260,7 +430,7 @@ diff -Naur gcc-4.6.0-old/gcc/configure.ac gcc-4.6.0-new/gcc/configure.ac
|
||||
ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
|
||||
PLUGIN_LD=`basename $gcc_cv_ld`
|
||||
AC_ARG_WITH(plugin-ld,
|
||||
@@ -1966,6 +1977,9 @@
|
||||
@@ -1965,6 +1976,9 @@
|
||||
*) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;;
|
||||
esac
|
||||
|
||||
@ -270,43 +440,44 @@ diff -Naur gcc-4.6.0-old/gcc/configure.ac gcc-4.6.0-new/gcc/configure.ac
|
||||
AC_MSG_CHECKING(what linker to use)
|
||||
if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
|
||||
# Single tree build which includes ld. We want to prefer it
|
||||
diff -Naur gcc-4.6.0-old/gcc/doc/invoke.texi gcc-4.6.0-new/gcc/doc/invoke.texi
|
||||
--- gcc-4.6.0-old/gcc/doc/invoke.texi 2011-03-18 07:34:52.000000000 -0700
|
||||
+++ gcc-4.6.0-new/gcc/doc/invoke.texi 2011-03-28 21:52:29.000000000 -0700
|
||||
@@ -401,7 +401,7 @@
|
||||
diff -Naur gcc-4.5-20101118/gcc/doc/invoke.texi gcc-4.5-20101118.patch/gcc/doc/invoke.texi
|
||||
--- gcc-4.5-20101118/gcc/doc/invoke.texi 2010-09-08 19:36:40.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/doc/invoke.texi 2010-11-26 03:42:31.218882146 +0100
|
||||
@@ -390,7 +390,7 @@
|
||||
-funit-at-a-time -funroll-all-loops -funroll-loops @gol
|
||||
-funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
|
||||
-fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
|
||||
--fwhole-program -fwpa -fuse-linker-plugin @gol
|
||||
+-fwhole-program -fwpa -fuse-ld -fuse-linker-plugin @gol
|
||||
--fwhole-program -fwhopr -fwpa -fuse-linker-plugin @gol
|
||||
+-fwhole-program -fwhopr -fwpa -fuse-linker-plugin -fuse-ld @gol
|
||||
--param @var{name}=@var{value}
|
||||
-O -O0 -O1 -O2 -O3 -Os -Ofast}
|
||||
-O -O0 -O1 -O2 -O3 -Os}
|
||||
|
||||
@@ -7743,6 +7743,16 @@
|
||||
@@ -7416,6 +7416,16 @@
|
||||
|
||||
Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
|
||||
Disabled by default.
|
||||
|
||||
+@item -fuse-ld=gold
|
||||
+Use the @command{gold} linker instead of the default linker.
|
||||
+This option is only necessary if GCC has been configured with
|
||||
+@option{--enable-gold} and @option{--enable-ld=default}.
|
||||
+@option{--enable-gold=both} or @option{--enable-gold=both/ld}.
|
||||
+
|
||||
+@item -fuse-ld=bfd
|
||||
+Use the @command{ld.bfd} linker instead of the default linker.
|
||||
+This option is only necessary if GCC has been configured with
|
||||
+@option{--enable-gold} and @option{--enable-ld}.
|
||||
+@option{--enable-gold=both/gold}.
|
||||
+
|
||||
@item -fcprop-registers
|
||||
@opindex fcprop-registers
|
||||
After register allocation and post-register allocation instruction splitting,
|
||||
diff -Naur gcc-4.6.0-old/gcc/exec-tool.in gcc-4.6.0-new/gcc/exec-tool.in
|
||||
--- gcc-4.6.0-old/gcc/exec-tool.in 2011-01-03 12:52:22.000000000 -0800
|
||||
+++ gcc-4.6.0-new/gcc/exec-tool.in 2011-03-28 21:52:29.000000000 -0700
|
||||
diff -Naur gcc-4.5-20101118/gcc/doc/invoke.texi.orig gcc-4.5-20101118.patch/gcc/doc/invoke.texi.orig
|
||||
diff -Naur gcc-4.5-20101118/gcc/exec-tool.in gcc-4.5-20101118.patch/gcc/exec-tool.in
|
||||
--- gcc-4.5-20101118/gcc/exec-tool.in 2009-11-08 23:36:51.000000000 +0100
|
||||
+++ gcc-4.5-20101118.patch/gcc/exec-tool.in 2010-11-26 03:42:31.226882250 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
-# Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
|
||||
+# Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
|
||||
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
+# Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
|
||||
# This file is part of GCC.
|
||||
|
||||
# GCC is free software; you can redistribute it and/or modify
|
||||
@ -323,20 +494,29 @@ diff -Naur gcc-4.6.0-old/gcc/exec-tool.in gcc-4.6.0-new/gcc/exec-tool.in
|
||||
+version="1.1"
|
||||
|
||||
invoked=`basename "$0"`
|
||||
id=$invoked
|
||||
@@ -36,15 +38,44 @@
|
||||
case "$invoked" in
|
||||
@@ -34,54 +36,110 @@
|
||||
prog=as-new$exeext
|
||||
dir=gas
|
||||
;;
|
||||
collect-ld)
|
||||
- collect-ld)
|
||||
- # when using a linker plugin, gcc will always pass '-plugin' as the
|
||||
- # first or second option to the linker.
|
||||
- if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then
|
||||
- # first option to the linker.
|
||||
- if test x"$1" = "x-plugin"; then
|
||||
- original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
|
||||
- else
|
||||
- original=$ORIGINAL_LD_FOR_TARGET
|
||||
- fi
|
||||
prog=ld-new$exeext
|
||||
- prog=ld-new$exeext
|
||||
- dir=ld
|
||||
- ;;
|
||||
nm)
|
||||
original=$ORIGINAL_NM_FOR_TARGET
|
||||
prog=nm-new$exeext
|
||||
dir=binutils
|
||||
;;
|
||||
+ collect-ld)
|
||||
+ prog=ld-new$exeext
|
||||
+ # Look for the a command line option
|
||||
+ # specifying the linker to be used.
|
||||
+ case " $* " in
|
||||
@ -374,10 +554,14 @@ diff -Naur gcc-4.6.0-old/gcc/exec-tool.in gcc-4.6.0-new/gcc/exec-tool.in
|
||||
+ # will issue an error message for us.
|
||||
+ fi
|
||||
+ fi
|
||||
id=ld
|
||||
;;
|
||||
nm)
|
||||
@@ -61,29 +92,58 @@
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
case "$original" in
|
||||
../*)
|
||||
- # compute absolute path of the location of this script
|
||||
+ # Compute absolute path to the location of this script.
|
||||
tdir=`dirname "$0"`
|
||||
scriptdir=`cd "$tdir" && pwd`
|
||||
|
||||
if test -x $scriptdir/../$dir/$prog; then
|
||||
@ -390,11 +574,9 @@ diff -Naur gcc-4.6.0-old/gcc/exec-tool.in gcc-4.6.0-new/gcc/exec-tool.in
|
||||
- # libtool has not relinked ld-new yet, but we cannot just use the
|
||||
- # previous stage (because then the relinking would just never happen!).
|
||||
- # So we take extra care to use prev-ld/ld-new *on recursive calls*.
|
||||
- eval LT_RCU="\${LT_RCU_$id}"
|
||||
- test x"$LT_RCU" = x"1" && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
|
||||
-
|
||||
- eval LT_RCU_$id=1
|
||||
- export LT_RCU_$id
|
||||
- LT_RCU=1; export LT_RCU
|
||||
- $scriptdir/../$dir/$prog ${1+"$@"}
|
||||
- result=$?
|
||||
- exit $result
|
||||
@ -409,12 +591,10 @@ diff -Naur gcc-4.6.0-old/gcc/exec-tool.in gcc-4.6.0-new/gcc/exec-tool.in
|
||||
+ # Libtool has not relinked ld-new yet, but we cannot just use the
|
||||
+ # previous stage (because then the relinking would just never happen!).
|
||||
+ # So we take extra care to use prev-ld/ld-new *on recursive calls*.
|
||||
+ eval LT_RCU="\${LT_RCU_$id}"
|
||||
+ if test x"$LT_RCU" = x"1"; then
|
||||
+ original=$scriptdir/../prev-$dir/$prog
|
||||
+ else
|
||||
+ eval LT_RCU_$id=1
|
||||
+ export LT_RCU_$id
|
||||
+ LT_RCU=1; export LT_RCU
|
||||
+ case " $* " in
|
||||
+ *\ -v\ *)
|
||||
+ echo "$invoked $version"
|
||||
@ -435,13 +615,13 @@ diff -Naur gcc-4.6.0-old/gcc/exec-tool.in gcc-4.6.0-new/gcc/exec-tool.in
|
||||
fi
|
||||
;;
|
||||
- *)
|
||||
- exec $original ${1+"$@"}
|
||||
- exec "$original" ${1+"$@"}
|
||||
+ "")
|
||||
+ echo "$invoked: executable not configured"
|
||||
+ exit 1
|
||||
;;
|
||||
esac
|
||||
+
|
||||
|
||||
+# If -v has been used then display our version number
|
||||
+# and then echo the command we are about to invoke.
|
||||
+case " $* " in
|
||||
@ -450,31 +630,31 @@ diff -Naur gcc-4.6.0-old/gcc/exec-tool.in gcc-4.6.0-new/gcc/exec-tool.in
|
||||
+ echo $original $*
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
|
||||
+if test -x $original; then
|
||||
+ exec "$original" ${1+"$@"}
|
||||
+else
|
||||
+ echo "$invoked: unable to locate executable: $original"
|
||||
+ exit 1
|
||||
+fi
|
||||
diff -Naur gcc-4.6.0-old/gcc/gcc.c gcc-4.6.0-new/gcc/gcc.c
|
||||
--- gcc-4.6.0-old/gcc/gcc.c 2011-02-22 18:04:43.000000000 -0800
|
||||
+++ gcc-4.6.0-new/gcc/gcc.c 2011-03-28 21:52:29.000000000 -0700
|
||||
@@ -657,6 +657,9 @@
|
||||
}"PLUGIN_COND_CLOSE" \
|
||||
%{flto|flto=*:%<fcompare-debug*} \
|
||||
%{flto} %{flto=*} %l " LINK_PIE_SPEC \
|
||||
diff -Naur gcc-4.5-20101118/gcc/gcc.c gcc-4.5-20101118.patch/gcc/gcc.c
|
||||
--- gcc-4.5-20101118/gcc/gcc.c 2010-04-18 19:46:08.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/gcc.c 2010-11-26 03:42:31.230882305 +0100
|
||||
@@ -790,6 +790,9 @@
|
||||
%{v:-plugin-opt=-v} \
|
||||
} \
|
||||
%{flto} %{fwhopr} %l " LINK_PIE_SPEC \
|
||||
+ "%{fuse-ld=gold:%{fuse-ld=bfd:%e-fuse-ld=gold and -fuse-ld=bfd may not be used together}} \
|
||||
+ %{fuse-ld=gold:-use-gold} \
|
||||
+ %{fuse-ld=bfd:-use-ld}" \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\
|
||||
"%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
|
||||
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
|
||||
diff -Naur gcc-4.6.0-old/gcc/opts.c gcc-4.6.0-new/gcc/opts.c
|
||||
--- gcc-4.6.0-old/gcc/opts.c 2011-02-17 14:51:57.000000000 -0800
|
||||
+++ gcc-4.6.0-new/gcc/opts.c 2011-03-28 21:52:29.000000000 -0700
|
||||
@@ -1692,8 +1692,9 @@
|
||||
dc->max_errors = value;
|
||||
diff -Naur gcc-4.5-20101118/gcc/opts.c gcc-4.5-20101118.patch/gcc/opts.c
|
||||
--- gcc-4.5-20101118/gcc/opts.c 2010-05-17 12:13:28.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/opts.c 2010-11-26 03:42:31.236882383 +0100
|
||||
@@ -2138,8 +2138,9 @@
|
||||
/* These are no-ops, preserved for backward compatibility. */
|
||||
break;
|
||||
|
||||
+ case OPT_fuse_ld_:
|
@ -1,6 +1,6 @@
|
||||
diff -Naur gcc-4.6.0-old/gcc/config/i386/t-linux64 gcc-4.6.0-new/gcc/config/i386/t-linux64
|
||||
--- gcc-4.6.0-old/gcc/config/i386/t-linux64 2009-04-21 12:03:23.000000000 -0700
|
||||
+++ gcc-4.6.0-new/gcc/config/i386/t-linux64 2011-03-28 21:12:19.000000000 -0700
|
||||
diff -Naur gcc-4.5-20100610-old/gcc/config/i386/t-linux64 gcc-4.5-20100610-new/gcc/config/i386/t-linux64
|
||||
--- gcc-4.5-20100610-old/gcc/config/i386/t-linux64 2010-06-11 09:31:52.000000000 -0700
|
||||
+++ gcc-4.5-20100610-new/gcc/config/i386/t-linux64 2010-06-11 09:39:52.000000000 -0700
|
||||
@@ -23,13 +23,13 @@
|
||||
# it doesn't tell anything about the 32bit libraries on those systems. Set
|
||||
# MULTILIB_OSDIRNAMES according to what is found on the target.
|
@ -1,7 +1,7 @@
|
||||
diff -Naur gcc-4.6.0-old/gcc/config/i386/linux64.h gcc-4.6.0-new/gcc/config/i386/linux64.h
|
||||
--- gcc-4.6.0-old/gcc/config/i386/linux64.h 2011-03-28 21:06:17.000000000 -0700
|
||||
+++ gcc-4.6.0-new/gcc/config/i386/linux64.h 2011-03-28 21:07:35.000000000 -0700
|
||||
@@ -63,7 +63,7 @@
|
||||
diff -Naur gcc-4.5-20100610-old/gcc/config/i386/linux64.h gcc-4.5-20100610-new/gcc/config/i386/linux64.h
|
||||
--- gcc-4.5-20100610-old/gcc/config/i386/linux64.h 2010-06-11 09:40:14.000000000 -0700
|
||||
+++ gcc-4.5-20100610-new/gcc/config/i386/linux64.h 2010-06-11 09:41:13.000000000 -0700
|
||||
@@ -59,7 +59,7 @@
|
||||
done. */
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
|
||||
@ -10,12 +10,12 @@ diff -Naur gcc-4.6.0-old/gcc/config/i386/linux64.h gcc-4.6.0-new/gcc/config/i386
|
||||
|
||||
#if TARGET_64BIT_DEFAULT
|
||||
#define SPEC_32 "m32"
|
||||
diff -Naur gcc-4.6.0-old/gcc/config/mips/iris6.h gcc-4.6.0-new/gcc/config/mips/iris6.h
|
||||
--- gcc-4.6.0-old/gcc/config/mips/iris6.h 2011-03-28 21:06:17.000000000 -0700
|
||||
+++ gcc-4.6.0-new/gcc/config/mips/iris6.h 2011-03-28 21:08:12.000000000 -0700
|
||||
@@ -226,27 +226,27 @@
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shared: \
|
||||
diff -Naur gcc-4.5-20100610-old/gcc/config/mips/iris6.h gcc-4.5-20100610-new/gcc/config/mips/iris6.h
|
||||
--- gcc-4.5-20100610-old/gcc/config/mips/iris6.h 2010-06-11 09:40:14.000000000 -0700
|
||||
+++ gcc-4.5-20100610-new/gcc/config/mips/iris6.h 2010-06-11 09:41:13.000000000 -0700
|
||||
@@ -88,27 +88,27 @@
|
||||
%{mabi=32:%{pg:gcrt1.o%s} \
|
||||
%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
|
||||
%{mabi=n32: \
|
||||
- %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
|
||||
- %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
|
||||
@ -57,10 +57,10 @@ diff -Naur gcc-4.6.0-old/gcc/config/mips/iris6.h gcc-4.6.0-new/gcc/config/mips/i
|
||||
%{!shared:" \
|
||||
SUBTARGET_DONT_WARN_UNUSED_SPEC \
|
||||
" %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
|
||||
@@ -262,10 +262,10 @@
|
||||
#define ENDFILE_SPEC \
|
||||
@@ -125,10 +125,10 @@
|
||||
"crtend.o%s irix-crtn.o%s \
|
||||
%{!shared: \
|
||||
%{mabi=32:crtn.o%s}\
|
||||
- %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
|
||||
- %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
|
||||
- %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
|
||||
@ -70,11 +70,11 @@ diff -Naur gcc-4.6.0-old/gcc/config/mips/iris6.h gcc-4.6.0-new/gcc/config/mips/i
|
||||
+ %{mabi=64:%{mips4:/usr/lib/mips4/crtn.o%s}\
|
||||
+ %{!mips4:/usr/lib/mips3/crtn.o%s}}}"
|
||||
|
||||
/* Generic part of the LINK_SPEC. */
|
||||
#undef LINK_SPEC
|
||||
diff -Naur gcc-4.6.0-old/gcc/config/mips/linux64.h gcc-4.6.0-new/gcc/config/mips/linux64.h
|
||||
--- gcc-4.6.0-old/gcc/config/mips/linux64.h 2011-03-28 21:06:17.000000000 -0700
|
||||
+++ gcc-4.6.0-new/gcc/config/mips/linux64.h 2011-03-28 21:08:52.000000000 -0700
|
||||
#define MIPS_TFMODE_FORMAT mips_extended_format
|
||||
|
||||
diff -Naur gcc-4.5-20100610-old/gcc/config/mips/linux64.h gcc-4.5-20100610-new/gcc/config/mips/linux64.h
|
||||
--- gcc-4.5-20100610-old/gcc/config/mips/linux64.h 2010-06-11 09:40:14.000000000 -0700
|
||||
+++ gcc-4.5-20100610-new/gcc/config/mips/linux64.h 2010-06-11 09:41:13.000000000 -0700
|
||||
@@ -36,9 +36,9 @@
|
||||
%{profile:-lc_p} %{!profile:-lc}}"
|
||||
|
||||
@ -85,13 +85,13 @@ diff -Naur gcc-4.6.0-old/gcc/config/mips/linux64.h gcc-4.6.0-new/gcc/config/mips
|
||||
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
|
||||
+#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1"
|
||||
+#define UCLIBC_DYNAMIC_LINKERN32 "/lib/ld-uClibc.so.0"
|
||||
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
|
||||
#define LINUX_DYNAMIC_LINKERN32 \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
|
||||
diff -Naur gcc-4.6.0-old/gcc/config/rs6000/linux64.h gcc-4.6.0-new/gcc/config/rs6000/linux64.h
|
||||
--- gcc-4.6.0-old/gcc/config/rs6000/linux64.h 2011-03-28 21:06:17.000000000 -0700
|
||||
+++ gcc-4.6.0-new/gcc/config/rs6000/linux64.h 2011-03-28 21:07:35.000000000 -0700
|
||||
@@ -373,7 +373,7 @@
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
|
||||
|
||||
diff -Naur gcc-4.5-20100610-old/gcc/config/rs6000/linux64.h gcc-4.5-20100610-new/gcc/config/rs6000/linux64.h
|
||||
--- gcc-4.5-20100610-old/gcc/config/rs6000/linux64.h 2010-06-11 09:40:14.000000000 -0700
|
||||
+++ gcc-4.5-20100610-new/gcc/config/rs6000/linux64.h 2010-06-11 09:41:13.000000000 -0700
|
||||
@@ -349,7 +349,7 @@
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
|
||||
@ -99,12 +99,12 @@ diff -Naur gcc-4.6.0-old/gcc/config/rs6000/linux64.h gcc-4.6.0-new/gcc/config/rs
|
||||
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
|
||||
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
|
||||
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
|
||||
#if DEFAULT_LIBC == LIBC_UCLIBC
|
||||
diff -Naur gcc-4.6.0-old/gcc/config/sparc/linux64.h gcc-4.6.0-new/gcc/config/sparc/linux64.h
|
||||
--- gcc-4.6.0-old/gcc/config/sparc/linux64.h 2011-03-28 21:06:17.000000000 -0700
|
||||
+++ gcc-4.6.0-new/gcc/config/sparc/linux64.h 2011-03-28 21:07:35.000000000 -0700
|
||||
@@ -102,7 +102,7 @@
|
||||
done. */
|
||||
#if UCLIBC_DEFAULT
|
||||
diff -Naur gcc-4.5-20100610-old/gcc/config/sparc/linux64.h gcc-4.5-20100610-new/gcc/config/sparc/linux64.h
|
||||
--- gcc-4.5-20100610-old/gcc/config/sparc/linux64.h 2010-06-11 09:40:14.000000000 -0700
|
||||
+++ gcc-4.5-20100610-new/gcc/config/sparc/linux64.h 2010-06-11 09:41:13.000000000 -0700
|
||||
@@ -110,7 +110,7 @@
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
|
||||
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
|
||||
@ -112,21 +112,21 @@ diff -Naur gcc-4.6.0-old/gcc/config/sparc/linux64.h gcc-4.6.0-new/gcc/config/spa
|
||||
|
||||
#ifdef SPARC_BI_ARCH
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
%{static:-static}} \
|
||||
@@ -130,7 +130,7 @@
|
||||
%{static:-static}}} \
|
||||
"
|
||||
|
||||
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
|
||||
+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
@@ -193,7 +193,7 @@
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
@@ -211,7 +211,7 @@
|
||||
#else /* !SPARC_BI_ARCH */
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
@ -0,0 +1,126 @@
|
||||
diff -Naur gcc-4.5-20101118/gcc/ChangeLog gcc-4.5-20101118.patch/gcc/ChangeLog
|
||||
diff -Naur gcc-4.5-20101118/gcc/doc/invoke.texi gcc-4.5-20101118.patch/gcc/doc/invoke.texi
|
||||
--- gcc-4.5-20101118/gcc/doc/invoke.texi 2010-09-08 19:36:40.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/doc/invoke.texi 2010-11-26 03:05:14.029157093 +0100
|
||||
@@ -9382,6 +9382,18 @@
|
||||
%@{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)@}
|
||||
@end smallexample
|
||||
|
||||
+@item @code{pass-through-libs}
|
||||
+The @code{pass-through-libs} spec function takes any number of arguments. It
|
||||
+finds any @option{-l} options and any non-options ending in ".a" (which it
|
||||
+assumes are the names of linker input library archive files) and returns a
|
||||
+result containing all the found arguments each prepended by
|
||||
+@option{-plugin-opt=-pass-through=} and joined by spaces. This list is
|
||||
+intended to be passed to the LTO linker plugin.
|
||||
+
|
||||
+@smallexample
|
||||
+%:pass-through-libs(%G %L %G)
|
||||
+@end smallexample
|
||||
+
|
||||
@item @code{print-asm-header}
|
||||
The @code{print-asm-header} function takes no arguments and simply
|
||||
prints a banner like:
|
||||
diff -Naur gcc-4.5-20101118/gcc/gcc.c gcc-4.5-20101118.patch/gcc/gcc.c
|
||||
--- gcc-4.5-20101118/gcc/gcc.c 2010-04-18 19:46:08.000000000 +0200
|
||||
+++ gcc-4.5-20101118.patch/gcc/gcc.c 2010-11-26 03:03:47.120008881 +0100
|
||||
@@ -407,6 +407,7 @@
|
||||
static const char *compare_debug_dump_opt_spec_function (int, const char **);
|
||||
static const char *compare_debug_self_opt_spec_function (int, const char **);
|
||||
static const char *compare_debug_auxbase_opt_spec_function (int, const char **);
|
||||
+static const char *pass_through_libs_spec_func (int, const char **);
|
||||
|
||||
/* The Specs Language
|
||||
|
||||
@@ -781,8 +782,7 @@
|
||||
-plugin %(linker_plugin_file) \
|
||||
-plugin-opt=%(lto_wrapper) \
|
||||
-plugin-opt=%(lto_gcc) \
|
||||
- %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \
|
||||
- %{static:-plugin-opt=-pass-through=-lc} \
|
||||
+ %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} \
|
||||
%{O*:-plugin-opt=-O%*} \
|
||||
%{w:-plugin-opt=-w} \
|
||||
%{f*:-plugin-opt=-f%*} \
|
||||
@@ -841,7 +841,6 @@
|
||||
static const char *linker_plugin_file_spec = "";
|
||||
static const char *lto_wrapper_spec = "";
|
||||
static const char *lto_gcc_spec = "";
|
||||
-static const char *lto_libgcc_spec = "";
|
||||
static const char *link_command_spec = LINK_COMMAND_SPEC;
|
||||
static const char *link_libgcc_spec = LINK_LIBGCC_SPEC;
|
||||
static const char *startfile_prefix_spec = STARTFILE_PREFIX_SPEC;
|
||||
@@ -1688,7 +1687,6 @@
|
||||
INIT_STATIC_SPEC ("linker_plugin_file", &linker_plugin_file_spec),
|
||||
INIT_STATIC_SPEC ("lto_wrapper", <o_wrapper_spec),
|
||||
INIT_STATIC_SPEC ("lto_gcc", <o_gcc_spec),
|
||||
- INIT_STATIC_SPEC ("lto_libgcc", <o_libgcc_spec),
|
||||
INIT_STATIC_SPEC ("link_libgcc", &link_libgcc_spec),
|
||||
INIT_STATIC_SPEC ("md_exec_prefix", &md_exec_prefix),
|
||||
INIT_STATIC_SPEC ("md_startfile_prefix", &md_startfile_prefix),
|
||||
@@ -1730,6 +1728,7 @@
|
||||
{ "compare-debug-dump-opt", compare_debug_dump_opt_spec_function },
|
||||
{ "compare-debug-self-opt", compare_debug_self_opt_spec_function },
|
||||
{ "compare-debug-auxbase-opt", compare_debug_auxbase_opt_spec_function },
|
||||
+ { "pass-through-libs", pass_through_libs_spec_func },
|
||||
#ifdef EXTRA_SPEC_FUNCTIONS
|
||||
EXTRA_SPEC_FUNCTIONS
|
||||
#endif
|
||||
@@ -7580,10 +7579,6 @@
|
||||
if (!linker_plugin_file_spec)
|
||||
fatal ("-fuse-linker-plugin, but liblto_plugin.so not found");
|
||||
|
||||
- lto_libgcc_spec = find_a_file (&startfile_prefixes, "libgcc.a",
|
||||
- R_OK, true);
|
||||
- if (!lto_libgcc_spec)
|
||||
- fatal ("could not find libgcc.a");
|
||||
}
|
||||
lto_gcc_spec = argv[0];
|
||||
|
||||
@@ -8977,3 +8972,46 @@
|
||||
|
||||
return name;
|
||||
}
|
||||
+
|
||||
+/* %:pass-through-libs spec function. Finds all -l options and input
|
||||
+ file names in the lib spec passed to it, and makes a list of them
|
||||
+ prepended with the plugin option to cause them to be passed through
|
||||
+ to the final link after all the new object files have been added. */
|
||||
+
|
||||
+const char *
|
||||
+pass_through_libs_spec_func (int argc, const char **argv)
|
||||
+{
|
||||
+ char *prepended = xstrdup (" ");
|
||||
+ int n;
|
||||
+ /* Shlemiel the painter's algorithm. Innately horrible, but at least
|
||||
+ we know that there will never be more than a handful of strings to
|
||||
+ concat, and it's only once per run, so it's not worth optimising. */
|
||||
+ for (n = 0; n < argc; n++)
|
||||
+ {
|
||||
+ char *old = prepended;
|
||||
+ /* Anything that isn't an option is a full path to an output
|
||||
+ file; pass it through if it ends in '.a'. Among options,
|
||||
+ pass only -l. */
|
||||
+ if (argv[n][0] == '-' && argv[n][1] == 'l')
|
||||
+ {
|
||||
+ const char *lopt = argv[n] + 2;
|
||||
+ /* Handle both joined and non-joined -l options. If for any
|
||||
+ reason there's a trailing -l with no joined or following
|
||||
+ arg just discard it. */
|
||||
+ if (!*lopt && ++n >= argc)
|
||||
+ break;
|
||||
+ else if (!*lopt)
|
||||
+ lopt = argv[n];
|
||||
+ prepended = concat (prepended, "-plugin-opt=-pass-through=-l",
|
||||
+ lopt, " ", NULL);
|
||||
+ }
|
||||
+ else if (!strcmp (".a", argv[n] + strlen (argv[n]) - 2))
|
||||
+ {
|
||||
+ prepended = concat (prepended, "-plugin-opt=-pass-through=",
|
||||
+ argv[n], " ", NULL);
|
||||
+ }
|
||||
+ if (prepended != old)
|
||||
+ free (old);
|
||||
+ }
|
||||
+ return prepended;
|
||||
+}
|
@ -1,6 +1,6 @@
|
||||
diff -Naur gcc-4.6.0-old/libstdc++-v3/config.h.in gcc-4.6.0-new/libstdc++-v3/config.h.in
|
||||
--- gcc-4.6.0-old/libstdc++-v3/config.h.in 2011-03-28 21:07:18.000000000 -0700
|
||||
+++ gcc-4.6.0-new/libstdc++-v3/config.h.in 2011-03-28 21:10:03.000000000 -0700
|
||||
diff -Naur gcc-4.5-20100610-old/libstdc++-v3/config.h.in gcc-4.5-20100610-new/libstdc++-v3/config.h.in
|
||||
--- gcc-4.5-20100610-old/libstdc++-v3/config.h.in 2010-06-11 09:40:55.000000000 -0700
|
||||
+++ gcc-4.5-20100610-new/libstdc++-v3/config.h.in 2010-06-11 09:41:44.000000000 -0700
|
||||
@@ -115,7 +115,7 @@
|
||||
#undef HAVE_FABSL
|
||||
|
||||
@ -46,7 +46,7 @@ diff -Naur gcc-4.6.0-old/libstdc++-v3/config.h.in gcc-4.6.0-new/libstdc++-v3/con
|
||||
|
||||
/* Define if strerror_r is available in <string.h>. */
|
||||
#undef HAVE_STRERROR_R
|
||||
@@ -360,7 +360,7 @@
|
||||
@@ -356,7 +356,7 @@
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ipc.h> header file. */
|
||||
@ -55,7 +55,7 @@ diff -Naur gcc-4.6.0-old/libstdc++-v3/config.h.in gcc-4.6.0-new/libstdc++-v3/con
|
||||
|
||||
/* Define to 1 if you have the <sys/isa_defs.h> header file. */
|
||||
#undef HAVE_SYS_ISA_DEFS_H
|
||||
@@ -372,16 +372,16 @@
|
||||
@@ -368,16 +368,16 @@
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
@ -75,7 +75,7 @@ diff -Naur gcc-4.6.0-old/libstdc++-v3/config.h.in gcc-4.6.0-new/libstdc++-v3/con
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
@@ -411,7 +411,7 @@
|
||||
@@ -407,7 +407,7 @@
|
||||
#undef HAVE_TGMATH_H
|
||||
|
||||
/* Define to 1 if the target supports thread-local storage. */
|
||||
@ -84,7 +84,7 @@ diff -Naur gcc-4.6.0-old/libstdc++-v3/config.h.in gcc-4.6.0-new/libstdc++-v3/con
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
@@ -624,7 +624,7 @@
|
||||
@@ -620,7 +620,7 @@
|
||||
#undef HAVE__TANL
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
@ -71,8 +71,8 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build optimizations (size/normal/speed/fast)
|
||||
OPTIMIZATIONS="fast"
|
||||
# Build optimizations (size/speed)
|
||||
OPTIMIZATIONS="speed"
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS=""
|
||||
|
@ -71,11 +71,11 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build optimizations (size/normal/speed/fast)
|
||||
OPTIMIZATIONS="fast"
|
||||
# Build optimizations (size/normal/speed)
|
||||
OPTIMIZATIONS="speed"
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3 -ftree-vectorize"
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3"
|
||||
|
||||
# LTO (Link Time Optimazion) support
|
||||
LTO_SUPPORT="no"
|
||||
|
@ -71,8 +71,8 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build optimizations (size/normal/speed/fast)
|
||||
OPTIMIZATIONS="fast"
|
||||
# Build optimizations (size/speed)
|
||||
OPTIMIZATIONS="speed"
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS="-mmmx -msse -msse2 -mfpmath=sse"
|
||||
|
@ -71,11 +71,11 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build optimizations (size/normal/speed/fast)
|
||||
OPTIMIZATIONS="fast"
|
||||
# Build optimizations (size/normal/speed)
|
||||
OPTIMIZATIONS="speed"
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3 -mmovbe -ftree-vectorize"
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3 -mmovbe"
|
||||
|
||||
# LTO (Link Time Optimazion) support
|
||||
LTO_SUPPORT="no"
|
||||
|
@ -71,11 +71,11 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build optimizations (size/normal/speed/fast)
|
||||
OPTIMIZATIONS="fast"
|
||||
# Build optimizations (size/speed)
|
||||
OPTIMIZATIONS="speed"
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3 -mmovbe -ftree-vectorize"
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3"
|
||||
|
||||
# LTO (Link Time Optimazion) support
|
||||
LTO_SUPPORT="no"
|
||||
|
@ -71,14 +71,14 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build optimizations (size/normal/speed/fast)
|
||||
OPTIMIZATIONS="fast"
|
||||
# Build optimizations (size/normal/speed)
|
||||
OPTIMIZATIONS="speed"
|
||||
|
||||
# Project CFLAGS
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3 -mmovbe -ftree-vectorize"
|
||||
PROJECT_CFLAGS="-mfpmath=sse -msse2 -mssse3 -mmovbe"
|
||||
|
||||
# LTO (Link Time Optimazion) support
|
||||
LTO_SUPPORT="no"
|
||||
LTO_SUPPORT="yes"
|
||||
|
||||
# GOLD (Google Linker) support
|
||||
GOLD_SUPPORT="yes"
|
||||
|
Loading…
x
Reference in New Issue
Block a user