summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-12-09 16:58:50 -0800
committerKhem Raj <raj.khem@gmail.com>2010-12-09 17:02:42 -0800
commita91b9a2922d5eb61ad89524b5dab7da524ce00bf (patch)
treec4772eea6b00b3c9302c394b18947323ba721c37
parent6c0ce137ba0781bb7d3ddd6dfcf6d7d6af3f58df (diff)
downloadopenembedded-a91b9a2922d5eb61ad89524b5dab7da524ce00bf.tar.gz
gcc/gcc-cross/gcc-cross-intermediate: Generate libgcc_s.so as a linker script stub
Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Eric BĂ©nard <eric@eukrea.com>
-rw-r--r--recipes/gcc/gcc-4.3.3.inc2
-rw-r--r--recipes/gcc/gcc-4.5.inc2
-rw-r--r--recipes/gcc/gcc-configure-sdk.inc10
-rw-r--r--recipes/gcc/gcc-cross-intermediate.inc6
-rw-r--r--recipes/gcc/gcc-package-cross.inc11
-rw-r--r--recipes/gcc/gcc-package-sdk.inc4
-rw-r--r--recipes/gcc/gcc-package-target.inc11
7 files changed, 35 insertions, 11 deletions
diff --git a/recipes/gcc/gcc-4.3.3.inc b/recipes/gcc/gcc-4.3.3.inc
index f0e4945f5c..8f818340ef 100644
--- a/recipes/gcc/gcc-4.3.3.inc
+++ b/recipes/gcc/gcc-4.3.3.inc
@@ -8,7 +8,7 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
NATIVEDEPS = "mpfr-native gmp-native"
-INC_PR = "r21"
+INC_PR = "r22"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \
diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
index 9842946eb7..512bc1750c 100644
--- a/recipes/gcc/gcc-4.5.inc
+++ b/recipes/gcc/gcc-4.5.inc
@@ -8,7 +8,7 @@ DEPENDS = "mpfr gmp libmpc libelf"
NATIVEDEPS = "mpfr-native gmp-native libmpc-native"
-INC_PR = "r23"
+INC_PR = "r24"
SRCREV = "167449"
PV = "4.5"
diff --git a/recipes/gcc/gcc-configure-sdk.inc b/recipes/gcc/gcc-configure-sdk.inc
index 6be5d72b12..d4d61aa947 100644
--- a/recipes/gcc/gcc-configure-sdk.inc
+++ b/recipes/gcc/gcc-configure-sdk.inc
@@ -28,6 +28,16 @@ export WINDRES_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/windres"
#
export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
+do_configure_prepend (){
+ # 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
+}
+
do_compile () {
export CC="${BUILD_CC}"
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
diff --git a/recipes/gcc/gcc-cross-intermediate.inc b/recipes/gcc/gcc-cross-intermediate.inc
index 2b6b24fb4c..c2ec66d8ad 100644
--- a/recipes/gcc/gcc-cross-intermediate.inc
+++ b/recipes/gcc/gcc-cross-intermediate.inc
@@ -28,6 +28,12 @@ do_install () {
mv -f ${D}${prefix}/$d/* ${D}${target_libdir} || true
fi
done
+ rm -f ${D}${target_base_libdir}/libgcc_s.so
+ rm -f ${D}${target_libdir}/libgcc_s.so
+ echo "/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library. */
+GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${target_libdir}/libgcc_s.so
# If this is important, we should remove the staging package here
# get rid of dummy libc.so
#if [ -z "`file ${STAGING_DIR_TARGET}${target_libdir}/libc.so | grep "ASCII C program text"`" ]; then
diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
index 85139a22ef..f9a7eebca0 100644
--- a/recipes/gcc/gcc-package-cross.inc
+++ b/recipes/gcc/gcc-package-cross.inc
@@ -29,6 +29,13 @@ do_install () {
mv -f ${D}${prefix}/$d/* ${D}${target_libdir} || true
fi
done
+ rm -f ${D}${target_base_libdir}/libgcc_s.so
+ rm -f ${D}${target_libdir}/libgcc_s.so
+ echo "/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library. */
+GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${target_libdir}/libgcc_s.so
+
# since we are moving the .la files to target sysroot we need to make sure that
# libdir points to right place within the target sysroot
for la in ${D}${target_libdir}/libstdc++.la ${D}${target_libdir}/libsupc++.la; do
@@ -45,14 +52,14 @@ do_install () {
${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
fi
-
+
# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
# gfortran is fully backwards compatible. This is a safe and practical solution.
if [ -f ${D}${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gfortran ]; then
currdir="$PWD"
cd ${D}${TOOLCHAIN_PATH}/bin/
ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
- if [ -d ${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/ ] ; then
+ if [ -d ${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/ ] ; then
cd ${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/
ln -sf gfortran g77 || true
fi
diff --git a/recipes/gcc/gcc-package-sdk.inc b/recipes/gcc/gcc-package-sdk.inc
index 014897a52d..1b6529f99b 100644
--- a/recipes/gcc/gcc-package-sdk.inc
+++ b/recipes/gcc/gcc-package-sdk.inc
@@ -56,9 +56,9 @@ do_install () {
# the packaging.
if [ "x${OLD_PACKAGE_STRIP}" != "xno" ]; then
for soFile in ${D}${prefix}/${TARGET_SYS}/lib/libstdc++.so.* ${D}${prefix}/${TARGET_SYS}/lib/libg2c.so.* ${D}${prefix}/${TARGET_SYS}/lib/libgcc_s.so.*; do
- if echo ${soFile} | grep '.py$' ; then
+ if echo ${soFile} | grep '.py$' ; then
echo "Not stripping .py file ${soFile}"
- elif echo ${soFile} | grep '*' ; then
+ elif echo ${soFile} | grep '*' ; then
echo "Not stripping non-existent mask ${soFile}"
else
${TARGET_PREFIX}strip ${soFile}
diff --git a/recipes/gcc/gcc-package-target.inc b/recipes/gcc/gcc-package-target.inc
index d2c9a80ef4..438c314b6f 100644
--- a/recipes/gcc/gcc-package-target.inc
+++ b/recipes/gcc/gcc-package-target.inc
@@ -127,11 +127,12 @@ do_install () {
else
mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir} || true
fi
- rm -f ${D}${libdir}/libgcc_s.so || true
- ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
- | tr -s / \
- | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
- ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
+ rm -f ${D}${libdir}/libgcc_s.so || true
+ rm -f ${D}${base_libdir}/libgcc_s.so || true
+ echo "/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library. */
+GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${libdir}/libgcc_s.so
# We don't need libtool libraries
rm -f ${D}${libdir}/libg2c.la &>/dev/null || true