summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-16 23:36:11 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-16 23:36:11 +0000
commitec22e232d4b35eaa8c70d46335dfb52199fe1fca (patch)
treeb3f51d9cfca46baf7229ef3b04786fd5a81b8871 /meta/packages/gcc
parent977b3fe5545c699e438866b834c9af949680aaab (diff)
downloadpoky-ec22e232d4b35eaa8c70d46335dfb52199fe1fca.tar.gz
gcc: Convert cross recipes to stage in do_install. Also moves stdc++ and other libs into the sysroot
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/gcc')
-rw-r--r--meta/packages/gcc/gcc-configure-cross.inc29
-rw-r--r--meta/packages/gcc/gcc-cross-initial.inc4
-rw-r--r--meta/packages/gcc/gcc-cross-initial_4.3.1.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-initial_4.3.2.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-initial_4.3.3.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate.inc2
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb4
-rw-r--r--meta/packages/gcc/gcc-cross-kernel.inc10
-rw-r--r--meta/packages/gcc/gcc-cross.inc13
-rw-r--r--meta/packages/gcc/gcc-package-cross.inc84
16 files changed, 65 insertions, 117 deletions
diff --git a/meta/packages/gcc/gcc-configure-cross.inc b/meta/packages/gcc/gcc-configure-cross.inc
index 8a47a45bc9..569d4b7a82 100644
--- a/meta/packages/gcc/gcc-configure-cross.inc
+++ b/meta/packages/gcc/gcc-configure-cross.inc
@@ -19,33 +19,4 @@ do_compile_prepend () {
19LIBGCCS_VAR = "-lgcc_s" 19LIBGCCS_VAR = "-lgcc_s"
20LIBGCCS_VAR_avr32 = "" 20LIBGCCS_VAR_avr32 = ""
21 21
22do_stage_append () {
23 for d in info man share/doc share/locale ; do
24 rm -rf ${CROSS_DIR}/$d
25 done
26
27 # We use libiberty from binutils
28 rm -f ${CROSS_DIR}/lib/libiberty.a
29
30 # We probably don't need these
31 rmdir ${CROSS_DIR}/include || :
32
33 # Move libssp into staging
34 install -d ${STAGING_DIR_TARGET}${target_base_libdir}/
35 mv ${CROSS_DIR}/${TARGET_SYS}/lib/libssp* ${STAGING_DIR_TARGET}${target_base_libdir}/ || true
36
37 # We don't really need to keep this around
38 # rm -rf ${CROSS_DIR}/share but leave java there
39 for d in share/man share/info;
40 do
41 rm -rf ${CROSS_DIR}/$d
42 done
43
44 #fix up libsupc++ and libstdc++ la files
45 for d in lib lib/nof; do
46 sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libsupc++.la || true
47 sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libstdc++.la || true
48 done
49}
50
51do_package_write_ipk[depends] += "virtual/libc:do_package" 22do_package_write_ipk[depends] += "virtual/libc:do_package"
diff --git a/meta/packages/gcc/gcc-cross-initial.inc b/meta/packages/gcc/gcc-cross-initial.inc
index a2c4445578..8da7d7968f 100644
--- a/meta/packages/gcc/gcc-cross-initial.inc
+++ b/meta/packages/gcc/gcc-cross-initial.inc
@@ -17,7 +17,3 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
17 --with-sysroot=${STAGING_DIR_TARGET} \ 17 --with-sysroot=${STAGING_DIR_TARGET} \
18 --with-build-sysroot=${STAGING_DIR_TARGET} \ 18 --with-build-sysroot=${STAGING_DIR_TARGET} \
19 ${@get_gcc_fpu_setting(bb, d)}" 19 ${@get_gcc_fpu_setting(bb, d)}"
20
21do_install () {
22 :
23}
diff --git a/meta/packages/gcc/gcc-cross-initial_4.3.1.bb b/meta/packages/gcc/gcc-cross-initial_4.3.1.bb
index 1543f72c9a..2cd2adc486 100644
--- a/meta/packages/gcc/gcc-cross-initial_4.3.1.bb
+++ b/meta/packages/gcc/gcc-cross-initial_4.3.1.bb
@@ -9,7 +9,7 @@ EXTRA_OECONF += " --disable-libmudflap \
9 --disable-libssp" 9 --disable-libssp"
10 10
11# Hack till we fix *libc properly 11# Hack till we fix *libc properly
12do_stage_append() { 12do_install_append() {
13 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 13 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
14} 14}
15 15
diff --git a/meta/packages/gcc/gcc-cross-initial_4.3.2.bb b/meta/packages/gcc/gcc-cross-initial_4.3.2.bb
index 1543f72c9a..2cd2adc486 100644
--- a/meta/packages/gcc/gcc-cross-initial_4.3.2.bb
+++ b/meta/packages/gcc/gcc-cross-initial_4.3.2.bb
@@ -9,7 +9,7 @@ EXTRA_OECONF += " --disable-libmudflap \
9 --disable-libssp" 9 --disable-libssp"
10 10
11# Hack till we fix *libc properly 11# Hack till we fix *libc properly
12do_stage_append() { 12do_install_append() {
13 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 13 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
14} 14}
15 15
diff --git a/meta/packages/gcc/gcc-cross-initial_4.3.3.bb b/meta/packages/gcc/gcc-cross-initial_4.3.3.bb
index 1543f72c9a..2cd2adc486 100644
--- a/meta/packages/gcc/gcc-cross-initial_4.3.3.bb
+++ b/meta/packages/gcc/gcc-cross-initial_4.3.3.bb
@@ -9,7 +9,7 @@ EXTRA_OECONF += " --disable-libmudflap \
9 --disable-libssp" 9 --disable-libssp"
10 10
11# Hack till we fix *libc properly 11# Hack till we fix *libc properly
12do_stage_append() { 12do_install_append() {
13 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 13 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
14} 14}
15 15
diff --git a/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb b/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb
index 99656dbe83..1a921d2d9c 100644
--- a/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb
+++ b/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb
@@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2"
6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " 6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap "
7 7
8# Hack till we fix *libc properly 8# Hack till we fix *libc properly
9do_stage_append() { 9do_install_append() {
10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
11} 11}
12 12
diff --git a/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb b/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb
index 99656dbe83..1a921d2d9c 100644
--- a/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb
+++ b/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb
@@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2"
6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " 6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap "
7 7
8# Hack till we fix *libc properly 8# Hack till we fix *libc properly
9do_stage_append() { 9do_install_append() {
10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
11} 11}
12 12
diff --git a/meta/packages/gcc/gcc-cross-intermediate.inc b/meta/packages/gcc/gcc-cross-intermediate.inc
index 57fa949485..7cc822fb76 100644
--- a/meta/packages/gcc/gcc-cross-intermediate.inc
+++ b/meta/packages/gcc/gcc-cross-intermediate.inc
@@ -17,5 +17,5 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
17 ${@get_gcc_fpu_setting(bb, d)}" 17 ${@get_gcc_fpu_setting(bb, d)}"
18 18
19do_install () { 19do_install () {
20 : 20 oe_runmake 'DESTDIR=${D}' install
21} 21}
diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb b/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb
index b0932f520d..854911552e 100644
--- a/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb
+++ b/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb
@@ -8,7 +8,7 @@ EXTRA_OECONF += " --disable-libmudflap \
8 --disable-libssp" 8 --disable-libssp"
9 9
10# Hack till we fix *libc properly 10# Hack till we fix *libc properly
11do_stage_append() { 11do_install_append() {
12 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 12 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
13} 13}
14 14
diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb b/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb
index b0932f520d..854911552e 100644
--- a/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb
+++ b/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb
@@ -8,7 +8,7 @@ EXTRA_OECONF += " --disable-libmudflap \
8 --disable-libssp" 8 --disable-libssp"
9 9
10# Hack till we fix *libc properly 10# Hack till we fix *libc properly
11do_stage_append() { 11do_install_append() {
12 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 12 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
13} 13}
14 14
diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb b/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb
index b0932f520d..854911552e 100644
--- a/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb
+++ b/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb
@@ -8,7 +8,7 @@ EXTRA_OECONF += " --disable-libmudflap \
8 --disable-libssp" 8 --disable-libssp"
9 9
10# Hack till we fix *libc properly 10# Hack till we fix *libc properly
11do_stage_append() { 11do_install_append() {
12 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 12 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
13} 13}
14 14
diff --git a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
index 114d9831c6..0dabd0b8db 100644
--- a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
+++ b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
@@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2"
6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " 6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap "
7 7
8# Hack till we fix *libc properly 8# Hack till we fix *libc properly
9do_stage_append() { 9do_install_append() {
10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
11} 11}
12 12
diff --git a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
index 114d9831c6..0dabd0b8db 100644
--- a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
+++ b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
@@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2"
6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " 6EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap "
7 7
8# Hack till we fix *libc properly 8# Hack till we fix *libc properly
9do_stage_append() { 9do_install_append() {
10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ 10 ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
11} 11}
12 12
diff --git a/meta/packages/gcc/gcc-cross-kernel.inc b/meta/packages/gcc/gcc-cross-kernel.inc
index fe6539b808..c602d72514 100644
--- a/meta/packages/gcc/gcc-cross-kernel.inc
+++ b/meta/packages/gcc/gcc-cross-kernel.inc
@@ -4,11 +4,11 @@
4PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}" 4PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
5 5
6do_install () { 6do_install () {
7 : 7 cd gcc
8 oe_runmake 'DESTDIR=${D}' install-common install-headers install-libgcc
9 install -m 0755 xgcc ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
8} 10}
9 11
10do_stage () { 12do_stage () {
11 cd gcc 13 use_do_install_for_stage
12 oe_runmake install-common install-headers install-libgcc 14} \ No newline at end of file
13 install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
14}
diff --git a/meta/packages/gcc/gcc-cross.inc b/meta/packages/gcc/gcc-cross.inc
index 3485824b8a..2ba47fef5b 100644
--- a/meta/packages/gcc/gcc-cross.inc
+++ b/meta/packages/gcc/gcc-cross.inc
@@ -1,13 +1,8 @@
1# Path mangling needed by the cross packaging
2# Note that we use := here, and require that this is included at the correct
3# point (before inheriting cross) to ensure that libdir and includedir are
4# target paths, not CROSS_DIR paths.
5target_libdir := "${libdir}"
6target_includedir := "${includedir}"
7target_base_libdir := "${base_libdir}"
8target_prefix := "${prefix}"
9
10inherit cross 1inherit cross
11 2
12DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc" 3DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
13PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" 4PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
5
6do_stage () {
7 use_do_install_for_stage
8}
diff --git a/meta/packages/gcc/gcc-package-cross.inc b/meta/packages/gcc/gcc-package-cross.inc
index 9e54af8564..cb23b23f22 100644
--- a/meta/packages/gcc/gcc-package-cross.inc
+++ b/meta/packages/gcc/gcc-package-cross.inc
@@ -18,55 +18,41 @@ FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
18do_install () { 18do_install () {
19 oe_runmake 'DESTDIR=${D}' install 19 oe_runmake 'DESTDIR=${D}' install
20 20
21 # Move libgcc_s into /lib 21 install -d ${D}${target_base_libdir}
22 mkdir -p ${D}${target_base_libdir} 22 install -d ${D}${target_libdir}
23 if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then 23
24 # Already in the right location 24 for d in ${TARGET_SYS}/lib/nof ${TARGET_SYS}/lib64 ${TARGET_SYS}/lib; do
25 : 25 if [ -d ${D}${prefix}/$d/ ]; then
26 elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then 26 mv -f ${D}${prefix}/$d/libgcc* ${D}${target_base_libdir} || true
27 mv -f ${D}${prefix}/lib/libgcc_s.so* ${D}${target_base_libdir} || true 27 mv -f ${D}${prefix}/$d/* ${D}${target_libdir} || true
28 elif [ -f ${D}${prefix}/*/lib/nof/libgcc_s.so.? ]; then 28 fi
29 mv -f ${D}${prefix}/*/lib/nof/libgcc_s.so* ${D}${target_base_libdir} 29 done
30 elif [ -f ${D}${prefix}/*/lib64/libgcc_s.so.? ]; then 30
31 mv -f ${D}${prefix}/*/lib64/libgcc_s.so* ${D}${target_base_libdir} || true 31 # Manually run the target stripper since we won't get it run by
32 else 32 # the packaging.
33 mv -f ${D}${prefix}/*/lib/libgcc_s.so* ${D}${target_base_libdir} || true 33 if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
34 fi 34 ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* || true
35 35 ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
36 36 ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
37 37 ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
38 # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
39 mkdir -p ${D}${target_libdir}
40
41 if [ -f ${D}${prefix}/*/lib/nof/libstdc++.so ]; then
42
43 mv -f ${D}${prefix}/*/lib/nof/libstdc++.so* ${D}${target_libdir} || true
44 mv -f ${D}${prefix}/*/lib/nof/libg2c.so* ${D}${target_libdir} || true
45 mv -f ${D}${prefix}/*/lib/nof/libgfortran*.so* ${D}${target_libdir} || true
46 mv -f ${D}${prefix}/*/lib/nof/libssp*.so* ${D}${target_libdir} || true
47 elif [ -f ${D}${prefix}/*/lib64/libstdc++.so ]; then
48 mv -f ${D}${prefix}/*/lib64/libstdc++.so* ${D}${target_libdir} || true
49 mv -f ${D}${prefix}/*/lib64/libg2c.so* ${D}${target_libdir} || true
50 mv -f ${D}${prefix}/*/lib64/libgfortran*.so* ${D}${target_libdir} || true
51 mv -f ${D}${prefix}/*/lib64/libssp*.so* ${D}${target_libdir} || true
52 else
53 mv -f ${D}${prefix}/*/lib/libstdc++.so* ${D}${target_libdir} || true
54 mv -f ${D}${prefix}/*/lib/libg2c.so* ${D}${target_libdir} || true
55 mv -f ${D}${prefix}/*/lib/libgfortran*.so* ${D}${target_libdir} || true
56 mv -f ${D}${prefix}/*/lib/libssp*.so* ${D}${target_libdir} || true
57 fi
58
59 # Manually run the target stripper since we won't get it run by
60 # the packaging.
61 if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
62 ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.*
63 ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
64 ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
65 ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
66 fi 38 fi
67 39
68 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 40 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
69 # gfortran is fully backwards compatible. This is a safe and practical solution. 41 # gfortran is fully backwards compatible. This is a safe and practical solution.
70 ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true 42 ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true
71 ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true 43 ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true
44
45 # Remove things we don't need but keep share/java
46 for d in info man share/doc share/locale share/man share/info; do
47 rm -rf ${D}${CROSS_DIR}/$d
48 done
49
50 #fix up libsupc++ and libstdc++ la files
51 for f in libssp.la libssp_nonshared.la libsupc++.la libstdc++.la ; do
52 # Remove any -L options from dependency_libs - we should never need them as the
53 # files are in the sysroot
54 sed -i "s|\(dependency_libs\s*=.*\)-L\s*[^ ]*\(.*\)|\1\2|g" ${D}${target_libdir}/$f || true
55 # Set libdir correctly
56 sed -i "s|libdir\s*=.*|libdir='${target_libdir}'|g" ${D}${target_libdir}/$f || true
57 done
72} 58}