aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gcc
diff options
context:
space:
mode:
authorMichael Smith <msmith@cbnco.com>2010-10-21 16:55:19 -0400
committerMichael Smith <msmith@cbnco.com>2010-10-22 09:08:23 -0400
commitfb2c1fb732a865743c1dfd2d48d9c7d96be92f33 (patch)
tree68a6abda504d4a6afe42bb96a6318c12233eb874 /recipes/gcc
parent1e47e9629ed5e0ea7542bea28d7a53c91e2488b5 (diff)
downloadopenembedded-fb2c1fb732a865743c1dfd2d48d9c7d96be92f33.tar.gz
openembedded-fb2c1fb732a865743c1dfd2d48d9c7d96be92f33.tar.bz2
openembedded-fb2c1fb732a865743c1dfd2d48d9c7d96be92f33.zip
gcc 4.3.4: backport -print-sysroot for libtool
libtoolized configure scripts need this in order to autodetect sysroot path when --with-sysroot is passed. Signed-off-by: Michael Smith <msmith@cbnco.com> Acked-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/gcc')
-rw-r--r--recipes/gcc/gcc-4.3.4.inc3
-rw-r--r--recipes/gcc/gcc-4.3.4/gcc-4.3-backport-print-sysroot.patch69
2 files changed, 71 insertions, 1 deletions
diff --git a/recipes/gcc/gcc-4.3.4.inc b/recipes/gcc/gcc-4.3.4.inc
index 5aef5e5c92..3f3809cbac 100644
--- a/recipes/gcc/gcc-4.3.4.inc
+++ b/recipes/gcc/gcc-4.3.4.inc
@@ -8,7 +8,7 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
NATIVEDEPS = "mpfr-native gmp-native"
-INC_PR = "r12"
+INC_PR = "r13"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \
@@ -62,6 +62,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
file://gcc-4.3.x-fix-EXTRA_BUILD.patch \
file://gcc-flags-for-build.patch \
file://Makefile.in.patch \
+ file://gcc-4.3-backport-print-sysroot.patch \
"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch "
diff --git a/recipes/gcc/gcc-4.3.4/gcc-4.3-backport-print-sysroot.patch b/recipes/gcc/gcc-4.3.4/gcc-4.3-backport-print-sysroot.patch
new file mode 100644
index 0000000000..c44d050f56
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.4/gcc-4.3-backport-print-sysroot.patch
@@ -0,0 +1,69 @@
+Backport "gcc -print-sysroot" from 4.4.x, required by some tools
+that auto-detect sysroot (e.g. libtool configured with --with-sysroot).
+
+Source: http://gcc.gnu.org/viewcvs/trunk/gcc/gcc.c?r1=137548&r2=137584&view=patch
+
+--- trunk/gcc/gcc.c 2008/07/07 00:48:55 137548
++++ trunk/gcc/gcc.c 2008/07/07 18:20:06 137584
+@@ -155,6 +155,8 @@
+
+ static int print_multi_directory;
+
++static int print_sysroot;
++
+ /* Flag saying to print the relative path we'd use to
+ find OS libraries given the current compiler flags. */
+
+@@ -1162,6 +1164,7 @@
+ {"--print-multi-directory", "-print-multi-directory", 0},
+ {"--print-multi-os-directory", "-print-multi-os-directory", 0},
+ {"--print-prog-name", "-print-prog-name=", "aj"},
++ {"--print-sysroot", "-print-sysroot", 0},
+ {"--print-sysroot-headers-suffix", "-print-sysroot-headers-suffix", 0},
+ {"--profile", "-p", 0},
+ {"--profile-blocks", "-a", 0},
+@@ -3244,6 +3247,7 @@
+ -print-multi-lib Display the mapping between command line options and\n\
+ multiple library search directories\n"), stdout);
+ fputs (_(" -print-multi-os-directory Display the relative path to OS libraries\n"), stdout);
++ fputs (_(" -print-sysroot Display the target libraries directory\n"), stdout);
+ fputs (_(" -print-sysroot-headers-suffix Display the sysroot suffix used to find headers\n"), stdout);
+ fputs (_(" -Wa,<options> Pass comma-separated <options> on to the assembler\n"), stdout);
+ fputs (_(" -Wp,<options> Pass comma-separated <options> on to the preprocessor\n"), stdout);
+@@ -3686,6 +3690,8 @@
+ print_multi_lib = 1;
+ else if (! strcmp (argv[i], "-print-multi-directory"))
+ print_multi_directory = 1;
++ else if (! strcmp (argv[i], "-print-sysroot"))
++ print_sysroot = 1;
+ else if (! strcmp (argv[i], "-print-multi-os-directory"))
+ print_multi_os_directory = 1;
+ else if (! strcmp (argv[i], "-print-sysroot-headers-suffix"))
+@@ -4126,6 +4132,8 @@
+ ;
+ else if (! strcmp (argv[i], "-print-multi-directory"))
+ ;
++ else if (! strcmp (argv[i], "-print-sysroot"))
++ ;
+ else if (! strcmp (argv[i], "-print-multi-os-directory"))
+ ;
+ else if (! strcmp (argv[i], "-print-sysroot-headers-suffix"))
+@@ -6529,6 +6537,18 @@
+ return (0);
+ }
+
++ if (print_sysroot)
++ {
++ if (target_system_root)
++ {
++ if (target_sysroot_suffix)
++ printf ("%s%s\n", target_system_root, target_sysroot_suffix);
++ else
++ printf ("%s\n", target_system_root);
++ }
++ return (0);
++ }
++
+ if (print_multi_os_directory)
+ {
+ if (multilib_os_dir == NULL)