aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-20 06:48:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-20 06:48:29 +0000
commit4136623a5fbfe6c501130f53dbd9f432fdf4d3b6 (patch)
treeee71213f01343c64cd423826ea26efc590660a04
parentc96312958c0621e72c9b32da5bc224ffe2161384 (diff)
downloadupstream-4136623a5fbfe6c501130f53dbd9f432fdf4d3b6.tar.gz
upstream-4136623a5fbfe6c501130f53dbd9f432fdf4d3b6.tar.bz2
upstream-4136623a5fbfe6c501130f53dbd9f432fdf4d3b6.zip
gcc: backport libgcc_pic changes to older gcc4 versions, install the libgcc map file as well
SVN-Revision: 18087
-rw-r--r--toolchain/gcc/patches/4.1.2/820-libgcc_pic.patch99
-rw-r--r--toolchain/gcc/patches/4.2.4/820-libgcc_pic.patch75
-rw-r--r--toolchain/gcc/patches/4.3.3+cs/820-libgcc_pic.patch2
-rw-r--r--toolchain/gcc/patches/4.3.3/820-libgcc_pic.patch2
-rw-r--r--toolchain/gcc/patches/4.3.4/820-libgcc_pic.patch2
-rw-r--r--toolchain/gcc/patches/4.4.0/820-libgcc_pic.patch2
-rw-r--r--toolchain/gcc/patches/4.4.1/820-libgcc_pic.patch2
7 files changed, 179 insertions, 5 deletions
diff --git a/toolchain/gcc/patches/4.1.2/820-libgcc_pic.patch b/toolchain/gcc/patches/4.1.2/820-libgcc_pic.patch
new file mode 100644
index 0000000000..671d6594bc
--- /dev/null
+++ b/toolchain/gcc/patches/4.1.2/820-libgcc_pic.patch
@@ -0,0 +1,99 @@
+--- a/gcc/mklibgcc.in
++++ b/gcc/mklibgcc.in
+@@ -195,6 +195,7 @@ for ml in $MULTILIBS; do
+ flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
+ shlib_slibdir_qual=
+ libgcc_a=$dir/libgcc.a
++ libgcc_pic_a=$dir/libgcc_pic.a
+ libgcov_a=$dir/libgcov.a
+ libgcc_eh_a=
+ libgcc_s_so=
+@@ -261,6 +262,7 @@ for ml in $MULTILIBS; do
+ echo "${outV}: ${outS}; \$(gen-hide-list)"
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -301,6 +303,7 @@ for ml in $MULTILIBS; do
+ -c '$(srcdir)/libgcc2.c' -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -336,6 +339,7 @@ for ml in $MULTILIBS; do
+ -fexceptions -fnon-call-exceptions -c '$(srcdir)/libgcc2.c' -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -369,6 +373,7 @@ for ml in $MULTILIBS; do
+ '$(vis_hide)' -c $FPBIT -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -400,6 +405,7 @@ for ml in $MULTILIBS; do
+ '$(vis_hide)' -c $DPBIT -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -430,6 +436,7 @@ for ml in $MULTILIBS; do
+ '$(vis_hide)' -c $TPBIT -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -482,6 +489,7 @@ for ml in $MULTILIBS; do
+ esac
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -601,6 +609,7 @@ for ml in $MULTILIBS; do
+ *) echo "Unhandled extension: $file">&2; exit 1 ;;
+ esac
+
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -773,6 +782,13 @@ EOF
+ echo "all: $libgcc_a"
+
+ echo ""
++ echo "$libgcc_pic_a: stmp-dirs"
++ echo " -rm -f $libgcc_pic_a"
++ echo ' $(AR_CREATE_FOR_TARGET)' $libgcc_pic_a '$(objects)'
++ echo ' $(RANLIB_FOR_TARGET)' $libgcc_pic_a
++ echo "all: $libgcc_pic_a"
++
++ echo ""
+ echo "$libgcov_a: stmp-dirs"
+ echo " -rm -f $libgcov_a"
+ echo ' $(AR_CREATE_FOR_TARGET)' $libgcov_a '$(objects)'
+@@ -874,6 +890,10 @@ for ml in $MULTILIBS; do
+ echo ' chmod 644' ${ldir}/libgcc_eh.a
+ echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
+
++ echo ' $(INSTALL_DATA)' ${dir}/libgcc_pic.a ${mapfile} ${ldir}/
++ echo ' chmod 644' ${ldir}/libgcc_pic.a
++ echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_pic.a
++
+ shlib_slibdir_qual=
+ os_multilib_dir=`$GCC_FOR_TARGET $flags --print-multi-os-directory`
+ if [ "$os_multilib_dir" != . ]; then
diff --git a/toolchain/gcc/patches/4.2.4/820-libgcc_pic.patch b/toolchain/gcc/patches/4.2.4/820-libgcc_pic.patch
new file mode 100644
index 0000000000..ab29b528b7
--- /dev/null
+++ b/toolchain/gcc/patches/4.2.4/820-libgcc_pic.patch
@@ -0,0 +1,75 @@
+--- a/gcc/mklibgcc.in
++++ b/gcc/mklibgcc.in
+@@ -214,6 +214,7 @@ for ml in $MULTILIBS; do
+ flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
+ shlib_slibdir_qual=
+ libgcc_a=$dir/libgcc.a
++ libgcc_pic_a=$dir/libgcc_pic.a
+ libgcov_a=$dir/libgcov.a
+ libgcc_eh_a=
+ libgcc_s_so=
+@@ -320,6 +321,7 @@ for ml in $MULTILIBS; do
+ -c '$(srcdir)/libgcc2.c' -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -355,6 +357,7 @@ for ml in $MULTILIBS; do
+ -fexceptions -fnon-call-exceptions -c '$(srcdir)/libgcc2.c' -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -397,6 +400,7 @@ for ml in $MULTILIBS; do
+ '$(vis_hide)' -c $fpbit -o $out
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -502,6 +506,7 @@ for ml in $MULTILIBS; do
+ esac
+
+ echo $libgcc_a: $out
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -621,6 +626,7 @@ for ml in $MULTILIBS; do
+ *) echo "Unhandled extension: $file">&2; exit 1 ;;
+ esac
+
++ echo $libgcc_pic_a: $outS
+ echo $libgcc_s_so: $outS
+ if [ "$SHLIB_MKMAP" ]; then
+ echo libgcc/${dir}/libgcc.map: $outS
+@@ -793,6 +799,13 @@ EOF
+ echo "all: $libgcc_a"
+
+ echo ""
++ echo "$libgcc_pic_a: stmp-dirs"
++ echo " -rm -f $libgcc_pic_a"
++ echo ' $(AR_CREATE_FOR_TARGET)' $libgcc_pic_a '$(objects)'
++ echo ' $(RANLIB_FOR_TARGET)' $libgcc_pic_a
++ echo "all: $libgcc_pic_a"
++
++ echo ""
+ echo "$libgcov_a: stmp-dirs"
+ echo " -rm -f $libgcov_a"
+ echo ' $(AR_CREATE_FOR_TARGET)' $libgcov_a '$(objects)'
+@@ -894,6 +907,10 @@ for ml in $MULTILIBS; do
+ echo ' chmod 644' ${ldir}/libgcc_eh.a
+ echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
+
++ echo ' $(INSTALL_DATA)' ${dir}/libgcc_pic.a ${mapfile} ${ldir}/
++ echo ' chmod 644' ${ldir}/libgcc_pic.a
++ echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_pic.a
++
+ shlib_slibdir_qual=
+ os_multilib_dir=`$GCC_FOR_TARGET $flags --print-multi-os-directory`
+ if [ "$os_multilib_dir" != . ]; then
diff --git a/toolchain/gcc/patches/4.3.3+cs/820-libgcc_pic.patch b/toolchain/gcc/patches/4.3.3+cs/820-libgcc_pic.patch
index 978ebbaf99..dc714e4b49 100644
--- a/toolchain/gcc/patches/4.3.3+cs/820-libgcc_pic.patch
+++ b/toolchain/gcc/patches/4.3.3+cs/820-libgcc_pic.patch
@@ -27,7 +27,7 @@
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-+ $(INSTALL_DATA) libgcc_pic.a $(DESTDIR)$(inst_libdir)/
++ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+
diff --git a/toolchain/gcc/patches/4.3.3/820-libgcc_pic.patch b/toolchain/gcc/patches/4.3.3/820-libgcc_pic.patch
index 5ed5c0b333..0e326a82b2 100644
--- a/toolchain/gcc/patches/4.3.3/820-libgcc_pic.patch
+++ b/toolchain/gcc/patches/4.3.3/820-libgcc_pic.patch
@@ -27,7 +27,7 @@
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-+ $(INSTALL_DATA) libgcc_pic.a $(DESTDIR)$(inst_libdir)/
++ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+
diff --git a/toolchain/gcc/patches/4.3.4/820-libgcc_pic.patch b/toolchain/gcc/patches/4.3.4/820-libgcc_pic.patch
index 5ed5c0b333..0e326a82b2 100644
--- a/toolchain/gcc/patches/4.3.4/820-libgcc_pic.patch
+++ b/toolchain/gcc/patches/4.3.4/820-libgcc_pic.patch
@@ -27,7 +27,7 @@
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-+ $(INSTALL_DATA) libgcc_pic.a $(DESTDIR)$(inst_libdir)/
++ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+
diff --git a/toolchain/gcc/patches/4.4.0/820-libgcc_pic.patch b/toolchain/gcc/patches/4.4.0/820-libgcc_pic.patch
index 925c96f846..18386dfd42 100644
--- a/toolchain/gcc/patches/4.4.0/820-libgcc_pic.patch
+++ b/toolchain/gcc/patches/4.4.0/820-libgcc_pic.patch
@@ -27,7 +27,7 @@
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-+ $(INSTALL_DATA) libgcc_pic.a $(DESTDIR)$(inst_libdir)/
++ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+
diff --git a/toolchain/gcc/patches/4.4.1/820-libgcc_pic.patch b/toolchain/gcc/patches/4.4.1/820-libgcc_pic.patch
index 925c96f846..18386dfd42 100644
--- a/toolchain/gcc/patches/4.4.1/820-libgcc_pic.patch
+++ b/toolchain/gcc/patches/4.4.1/820-libgcc_pic.patch
@@ -27,7 +27,7 @@
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-+ $(INSTALL_DATA) libgcc_pic.a $(DESTDIR)$(inst_libdir)/
++ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
+