summaryrefslogtreecommitdiff
path: root/recipes/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/gcc')
-rw-r--r--recipes/gcc/gcc-configure-canadian-sdk.inc7
-rw-r--r--recipes/gcc/gcc-configure-cross.inc7
-rw-r--r--recipes/gcc/gcc-configure-sdk.inc8
3 files changed, 22 insertions, 0 deletions
diff --git a/recipes/gcc/gcc-configure-canadian-sdk.inc b/recipes/gcc/gcc-configure-canadian-sdk.inc
index 83ae6f548d..5e27358d04 100644
--- a/recipes/gcc/gcc-configure-canadian-sdk.inc
+++ b/recipes/gcc/gcc-configure-canadian-sdk.inc
@@ -71,6 +71,13 @@ EXTRA_OECONF_PATHS = " \
do_configure () {
# Work around Hardcoded path assumptions in gcc
+ # Make sure we use GMP/MPFR statically
+ sed -i 's/^\(HOST_GMPLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_GMPLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
+ sed -i 's/^\(HOST_PPLLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_PPLLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
+ sed -i 's/^\(HOST_LIBELFLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_LIBELFLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
(cd ${S}/libstdc++-v3 && autoreconf)
canadian_sdk_runconf
diff --git a/recipes/gcc/gcc-configure-cross.inc b/recipes/gcc/gcc-configure-cross.inc
index c3c2b665e4..7041fcfafc 100644
--- a/recipes/gcc/gcc-configure-cross.inc
+++ b/recipes/gcc/gcc-configure-cross.inc
@@ -17,6 +17,13 @@ do_configure_prepend () {
export OBJCOPY_FOR_TARGET="${TARGET_SYS}-objcopy"
export STRIP_FOR_TARGET="${TARGET_SYS}-strip"
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
+ # Make sure we use GMP/MPFR statically
+ sed -i 's/^\(HOST_GMPLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_GMPLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
+ sed -i 's/^\(HOST_PPLLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_PPLLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
+ sed -i 's/^\(HOST_LIBELFLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_LIBELFLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
}
LIBGCCS_VAR = "-lgcc_s"
diff --git a/recipes/gcc/gcc-configure-sdk.inc b/recipes/gcc/gcc-configure-sdk.inc
index 328e780082..c8fae11413 100644
--- a/recipes/gcc/gcc-configure-sdk.inc
+++ b/recipes/gcc/gcc-configure-sdk.inc
@@ -35,6 +35,14 @@ do_configure () {
export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
+ # Make sure we use GMP/MPFR statically
+ sed -i 's/^\(HOST_GMPLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_GMPLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
+ sed -i 's/^\(HOST_PPLLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_PPLLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
+ sed -i 's/^\(HOST_LIBELFLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.tpl
+ sed -i 's/^\(HOST_LIBELFLIBS =\) \(.*\)$/\1 -Wl,-Bstatic \2 -Wl,-Bdynamic/' ${S}/Makefile.in
+
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}