summaryrefslogtreecommitdiff
path: root/meta/packages/gcc/gcc-package-cross.inc
blob: 86f973e88535369f7f321c766bb6d869e39c957a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
INHIBIT_PACKAGE_STRIP = "1"

do_install () {
	oe_runmake 'DESTDIR=${D}' install-host

	install -d ${D}${target_base_libdir}
	install -d ${D}${target_libdir}
    
	# 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. 
	ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
	ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/gfortran ${STAGING_DIR_NATIVE}/${prefix_native}/${TARGET_SYS}/bin/g77 || true

	# Remove things we don't need but keep share/java
	for d in info man share/doc share/locale share/man share/info; do
		rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d
	done

	# gcc-runtime requires some headers, we stash them here
	if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then
		install -d ${D}${includedir}/gcc-build-internal
		for f in *.h *.c libgcc.mvars; do
			cp ${B}/gcc/$f ${D}${includedir}/gcc-build-internal/
		done
		# Special for PowerPC (and possibly others)
		if [ -f ${B}/gcc/tramp.S ]; then
			cp ${B}/gcc/*.S ${D}${includedir}/gcc-build-internal/
		fi
		if [ -f libgcc.mvars]; then
			cp ${B}/gcc/libgcc.mvars ${D}${includedir}/gcc-build-internal/
		fi
	fi
}