mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-14 22:35:25 +01:00
gcc: sync with yocto
* don't duplicate .inc files, use the ones from the main layer(s) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
parent
fe622c76c5
commit
8d6c7b3ee2
|
|
@ -1,4 +1,4 @@
|
|||
require gcc-common.inc
|
||||
require recipes-devtools/gcc/gcc-common.inc
|
||||
|
||||
DEPENDS =+ "mpfr gmp libmpc elfutils"
|
||||
NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native elfutils-native"
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
DESCRIPTION = "The GNU cc and gcc C compilers."
|
||||
HOMEPAGE = "http://www.gnu.org/software/gcc/"
|
||||
SECTION = "devel"
|
||||
LICENSE = "GPL"
|
||||
|
||||
NATIVEDEPS = ""
|
||||
|
||||
inherit autotools gettext
|
||||
|
||||
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
|
||||
|
||||
def get_gcc_fpu_setting(bb, d):
|
||||
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
|
||||
return "--with-float=soft"
|
||||
return ""
|
||||
|
||||
def get_gcc_mips_plt_setting(bb, d):
|
||||
if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'mips', 'mipsel' ] and 'mplt' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
|
||||
return "--with-mips-plt"
|
||||
return ""
|
||||
|
||||
# We really need HOST_SYS here for some packages and TARGET_SYS for others.
|
||||
# For now, libgcc is most important so we fix for that - RP.
|
||||
SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
|
||||
|
||||
DEBIANNAME_libgcc = "libgcc1"
|
||||
|
||||
MIRRORS_prepend () {
|
||||
${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
|
||||
${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
|
||||
${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
|
||||
${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
|
||||
}
|
||||
|
||||
#
|
||||
# Set some default values
|
||||
#
|
||||
gcclibdir = "${libdir}/gcc"
|
||||
BINV = "${PV}"
|
||||
S = "${WORKDIR}/gcc-${PV}"
|
||||
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
|
||||
|
||||
target_includedir ?= "${includedir}"
|
||||
target_libdir ?= "${libdir}"
|
||||
target_base_libdir ?= "${base_libdir}"
|
||||
target_prefix ?= "${prefix}"
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
#
|
||||
# Build the list of lanaguages to build.
|
||||
#
|
||||
# These can be overridden by the version specific .inc file.
|
||||
|
||||
# Java (gcj doesn't work on all architectures)
|
||||
JAVA ?= ",java"
|
||||
JAVA_arm ?= ""
|
||||
JAVA_armeb ?= ""
|
||||
JAVA_mipsel ?= ""
|
||||
JAVA_sh3 ?= ""
|
||||
# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
|
||||
FORTRAN ?= ",f77"
|
||||
LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
|
||||
# disable --enable-target-optspace for powerpc SPE
|
||||
# at -Os libgcc.so.1 creates references into
|
||||
# hidden symbols in libgcc.a which linker complains
|
||||
# when linking shared libraries further in the build like (gnutls)
|
||||
|
||||
SPECIAL_ARCH_LIST = "powerpc"
|
||||
OPTSPACE = ${@base_contains("SPECIAL_ARCH_LIST", "${TARGET_ARCH}", "", "--enable-target-optspace",d)}
|
||||
|
||||
EXTRA_OECONF_BASE ?= ""
|
||||
EXTRA_OECONF_PATHS ?= ""
|
||||
EXTRA_OECONF_INITIAL ?= ""
|
||||
EXTRA_OECONF_INTERMEDIATE ?= ""
|
||||
|
||||
GCCMULTILIB = "--disable-multilib"
|
||||
|
||||
EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
|
||||
--with-gnu-ld \
|
||||
--enable-shared \
|
||||
--enable-languages=${LANGUAGES} \
|
||||
--enable-threads=posix \
|
||||
${GCCMULTILIB} \
|
||||
--enable-c99 \
|
||||
--enable-long-long \
|
||||
--enable-symvers=gnu \
|
||||
--enable-libstdcxx-pch \
|
||||
--program-prefix=${TARGET_PREFIX} \
|
||||
${OPTSPACE} \
|
||||
${EXTRA_OECONF_BASE} \
|
||||
${EXTRA_OECONF_FPU} \
|
||||
${EXTRA_OECONF_PATHS} \
|
||||
${@get_gcc_mips_plt_setting(bb, d)}"
|
||||
|
||||
# Build uclibc compilers without cxa_atexit support
|
||||
EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
|
||||
EXTRA_OECONF_append_linux-gnueabi = " --enable-__cxa_atexit"
|
||||
EXTRA_OECONF_append_linux-uclibc = " --disable-__cxa_atexit"
|
||||
EXTRA_OECONF_append_linux-uclibcgnueabi = " --disable-__cxa_atexit"
|
||||
EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
|
||||
CPPFLAGS = ""
|
||||
|
||||
# Used by configure to define additional values for FLAGS_FOR_TARGET -
|
||||
# passed to all the compilers.
|
||||
ARCH_FLAGS_FOR_TARGET = "${TARGET_CC_ARCH}"
|
||||
EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
|
||||
|
||||
SYSTEMHEADERS = "${target_includedir}"
|
||||
SYSTEMLIBS = "${target_base_libdir}/"
|
||||
SYSTEMLIBS1 = "${target_libdir}/"
|
||||
|
||||
do_configure () {
|
||||
# Setup these vars for cross building only
|
||||
# ... because foo_FOR_TARGET apparently gets misinterpreted inside the
|
||||
# gcc build stuff when the build is producing a cross compiler - i.e.
|
||||
# when the 'current' target is the 'host' system, and the host is not
|
||||
# the target (because the build is actually making a cross compiler!)
|
||||
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
|
||||
export CC_FOR_TARGET="${CC}"
|
||||
export GCC_FOR_TARGET="${CC}"
|
||||
export CXX_FOR_TARGET="${CXX}"
|
||||
export AS_FOR_TARGET="${HOST_PREFIX}as"
|
||||
export LD_FOR_TARGET="${HOST_PREFIX}ld"
|
||||
export NM_FOR_TARGET="${HOST_PREFIX}nm"
|
||||
export AR_FOR_TARGET="${HOST_PREFIX}ar"
|
||||
export GFORTRAN_FOR_TARGET="gfortran"
|
||||
export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
|
||||
fi
|
||||
export CC_FOR_BUILD="${BUILD_CC}"
|
||||
export CXX_FOR_BUILD="${BUILD_CXX}"
|
||||
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
|
||||
export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
|
||||
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
|
||||
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
|
||||
export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
|
||||
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
|
||||
|
||||
# teach gcc to find correct target includedir when checking libc ssp support
|
||||
sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\":\1glibc_header_dir=\"${with_build_sysroot}${SYSTEMHEADERS}\":g' ${S}/gcc/configure.ac
|
||||
sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\":\1glibc_header_dir=\"${with_build_sysroot}${SYSTEMHEADERS}\":g' ${S}/gcc/configure
|
||||
|
||||
# splice our idea of where the headers live into gcc's world
|
||||
echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${T}/t-oe
|
||||
sed 's%^tmake_file=.*$%& ${T}/t-oe%' < ${S}/gcc/Makefile.in >${S}/gcc/Makefile.in.new
|
||||
mv ${S}/gcc/Makefile.in.new ${S}/gcc/Makefile.in
|
||||
cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${S}/gcc/defaults.h.new
|
||||
echo "#ifndef STANDARD_INCLUDE_DIR" >> ${S}/gcc/defaults.h.new
|
||||
echo "#define STANDARD_INCLUDE_DIR \"${SYSTEMHEADERS}\"" >> ${S}/gcc/defaults.h.new
|
||||
echo "#endif" >> ${S}/gcc/defaults.h.new
|
||||
echo "#ifndef STANDARD_STARTFILE_PREFIX_1" >> ${S}/gcc/defaults.h.new
|
||||
echo "#define STANDARD_STARTFILE_PREFIX_1 \"${SYSTEMLIBS}\"" >> ${S}/gcc/defaults.h.new
|
||||
echo "#endif" >> ${S}/gcc/defaults.h.new
|
||||
echo "#ifndef STANDARD_STARTFILE_PREFIX_2" >> ${S}/gcc/defaults.h.new
|
||||
echo "#define STANDARD_STARTFILE_PREFIX_2 \"${SYSTEMLIBS1}\"" >> ${S}/gcc/defaults.h.new
|
||||
echo "#endif" >> ${S}/gcc/defaults.h.new
|
||||
echo "#endif /* ! GCC_DEFAULTS_H */" >> ${S}/gcc/defaults.h.new
|
||||
mv ${S}/gcc/defaults.h.new ${S}/gcc/defaults.h
|
||||
oe_runconf
|
||||
}
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
require gcc-configure-common.inc
|
||||
|
||||
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
|
||||
|
||||
EXTRA_OECONF += " --enable-poison-system-directories "
|
||||
|
||||
EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${target_exec_prefix} \
|
||||
--with-gxx-include-dir=${target_includedir}/c++ \
|
||||
--with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--with-build-sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
do_compile_prepend () {
|
||||
export CC="${BUILD_CC}"
|
||||
export AR_FOR_TARGET="${TARGET_SYS}-ar"
|
||||
export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
|
||||
export LD_FOR_TARGET="${TARGET_SYS}-ld"
|
||||
export NM_FOR_TARGET="${TARGET_SYS}-nm"
|
||||
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
|
||||
}
|
||||
|
||||
LIBGCCS_VAR = "-lgcc_s"
|
||||
LIBGCCS_VAR_avr32 = ""
|
||||
|
||||
do_package_write_ipk[depends] += "virtual/libc:do_package"
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
require gcc-configure-common.inc
|
||||
|
||||
EXTRA_OECONF_PATHS = " \
|
||||
--with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
|
||||
--with-gxx-include-dir=${includedir}/c++/ \
|
||||
--with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--with-build-sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
RUNTIMETARGET = "libssp libstdc++-v3"
|
||||
# ?
|
||||
# libiberty
|
||||
# libmudflap
|
||||
# libgfortran
|
||||
|
||||
do_configure () {
|
||||
export CXX="${CXX} -nostdinc++ -nostdlib++"
|
||||
for d in ${RUNTIMETARGET}; do
|
||||
echo "Configuring $d"
|
||||
mkdir -p ${B}/$d/
|
||||
cd ${B}/$d/
|
||||
chmod a+x ${S}/$d/configure
|
||||
${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
|
||||
done
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
for d in ${RUNTIMETARGET}; do
|
||||
cd ${B}/$d/
|
||||
oe_runmake
|
||||
done
|
||||
}
|
||||
|
||||
do_install () {
|
||||
for d in ${RUNTIMETARGET}; do
|
||||
cd ${B}/$d/
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
done
|
||||
}
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
|
||||
|
||||
BBCLASSEXTEND = "nativesdk"
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
require gcc-configure-common.inc
|
||||
|
||||
# The two lines below conflict, this needs fixing - RP
|
||||
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
|
||||
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
|
||||
|
||||
EXTRA_OECONF_PATHS = "--with-local-prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
|
||||
--with-gxx-include-dir=${target_includedir}/c++ \
|
||||
--with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
|
||||
--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
|
||||
--with-build-sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
#
|
||||
# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
|
||||
# for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
|
||||
#
|
||||
export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
|
||||
export AS_FOR_TARGET = "${TARGET_PREFIX}as"
|
||||
export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool"
|
||||
export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
|
||||
export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
|
||||
export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
|
||||
export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo"
|
||||
export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
|
||||
export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump"
|
||||
export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
|
||||
export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip"
|
||||
export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres"
|
||||
|
||||
#
|
||||
# We need to override this and make sure the compiler can find staging
|
||||
#
|
||||
export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
do_configure () {
|
||||
export CC_FOR_BUILD="${BUILD_CC}"
|
||||
export CXX_FOR_BUILD="${BUILD_CXX}"
|
||||
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
|
||||
export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
|
||||
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
|
||||
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
|
||||
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
|
||||
oe_runconf
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
oe_runmake all-host all-target-libgcc
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
require gcc-configure-common.inc
|
||||
|
||||
EXTRA_OECONF_PATHS = " \
|
||||
--with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
|
||||
--with-gxx-include-dir=${includedir}/c++/"
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
inherit cross-canadian
|
||||
|
||||
DEPENDS = "virtual/${HOST_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc gettext-nativesdk"
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
inherit cross-canadian
|
||||
|
||||
require gcc-${PV}.inc
|
||||
require gcc-cross-canadian.inc
|
||||
require gcc-configure-sdk.inc
|
||||
require gcc-package-sdk.inc
|
||||
require recipes-devtools/gcc/gcc-${PV}.inc
|
||||
require recipes-devtools/gcc/gcc-cross-canadian.inc
|
||||
require recipes-devtools/gcc/gcc-configure-sdk.inc
|
||||
require recipes-devtools/gcc/gcc-package-sdk.inc
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
DEPENDS = "virtual/${TARGET_PREFIX}binutils gettext-native ${NATIVEDEPS}"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
|
||||
PACKAGES = ""
|
||||
|
||||
# This is intended to be a -very- basic config
|
||||
# sysroot is needed in case we use libc-initial
|
||||
EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
|
||||
--with-newlib \
|
||||
--without-headers \
|
||||
--disable-shared \
|
||||
--disable-threads \
|
||||
--disable-multilib \
|
||||
--disable-__cxa_atexit \
|
||||
--enable-languages=c \
|
||||
${OPTSPACE} \
|
||||
--program-prefix=${TARGET_PREFIX} \
|
||||
--with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--with-build-sysroot=${STAGING_DIR_TARGET} \
|
||||
${EXTRA_OECONF_INITIAL} \
|
||||
${@get_gcc_fpu_setting(bb, d)}"
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
require gcc-cross_${PV}.bb
|
||||
require gcc-cross-initial.inc
|
||||
require recipes-devtools/gcc/gcc-cross_${PV}.bb
|
||||
require recipes-devtools/gcc/gcc-cross-initial.inc
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
DEPENDS = "virtual/${TARGET_PREFIX}binutils ${NATIVEDEPS}"
|
||||
DEPENDS += "virtual/${TARGET_PREFIX}libc-initial gettext-native"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate"
|
||||
PACKAGES = ""
|
||||
|
||||
# This is intended to be a -very- basic config
|
||||
# sysroot is needed in case we use libc-initial
|
||||
EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
|
||||
--enable-shared \
|
||||
--disable-multilib \
|
||||
--disable-threads \
|
||||
--enable-languages=c \
|
||||
${OPTSPACE} \
|
||||
--program-prefix=${TARGET_PREFIX} \
|
||||
--with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--with-build-sysroot=${STAGING_DIR_TARGET} \
|
||||
${EXTRA_OECONF_INTERMEDIATE} \
|
||||
${@get_gcc_fpu_setting(bb, d)}"
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
install -d ${D}${target_base_libdir}/
|
||||
mv ${D}${exec_prefix}/${TARGET_SYS}/lib/* ${D}${target_base_libdir}/
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
require gcc-cross_${PV}.bb
|
||||
require gcc-cross-intermediate.inc
|
||||
require recipes-devtools/gcc/gcc-cross_${PV}.bb
|
||||
require recipes-devtools/gcc/gcc-cross-intermediate.inc
|
||||
PR = "${INC_PR}.0"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
# Cut-down gcc for kernel builds
|
||||
# Only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
|
||||
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
|
||||
|
||||
do_install () {
|
||||
cd gcc
|
||||
oe_runmake 'DESTDIR=${D}' install-common install-headers install-libgcc
|
||||
install -m 0755 xgcc ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
inherit cross
|
||||
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${NATIVEDEPS}"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
|
||||
|
||||
require gcc-configure-cross.inc
|
||||
require gcc-package-cross.inc
|
||||
|
||||
do_compile () {
|
||||
oe_runmake all-host all-target-libgcc
|
||||
}
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
require gcc-cross.inc
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
PR = "${INC_PR}.2"
|
||||
|
||||
require gcc-${PV}.inc
|
||||
require gcc-cross4.inc
|
||||
require recipes-devtools/gcc/gcc-${PV}.inc
|
||||
require recipes-devtools/gcc/gcc-cross4.inc
|
||||
|
||||
EXTRA_OECONF += "--disable-libunwind-exceptions \
|
||||
--with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
inherit crosssdk
|
||||
|
||||
SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
|
||||
SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
|
||||
SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
|
||||
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native ${NATIVEDEPS}"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial-crosssdk"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
require gcc-cross-initial_${PV}.bb
|
||||
require gcc-crosssdk-initial.inc
|
||||
require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
|
||||
require recipes-devtools/gcc/gcc-crosssdk-initial.inc
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
inherit crosssdk
|
||||
|
||||
SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
|
||||
SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
|
||||
SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
|
||||
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native"
|
||||
DEPENDS += "virtual/${TARGET_PREFIX}libc-initial-nativesdk"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate-crosssdk"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
require gcc-cross-intermediate_${PV}.bb
|
||||
require gcc-crosssdk-intermediate.inc
|
||||
require recipes-devtools/gcc/gcc-cross-intermediate_${PV}.bb
|
||||
require recipes-devtools/gcc/gcc-crosssdk-intermediate.inc
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
inherit crosssdk
|
||||
|
||||
SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
|
||||
SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
|
||||
SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
|
||||
|
||||
GCCMULTILIB = "--disable-multilib"
|
||||
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc-nativesdk gettext-native"
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/${TARGET_PREFIX}g++-crosssdk"
|
||||
|
||||
do_configure_prepend () {
|
||||
# Change the default dynamic linker path to the one in the SDK
|
||||
sed -i ${S}/gcc/config/*/linux*.h -e 's#\(GLIBC_DYNAMIC_LINKER.*\)/lib/#\1${SYSTEMLIBS}#'
|
||||
sed -i ${S}/gcc/config/*/linux*.h -e 's#\(GLIBC_DYNAMIC_LINKER.*\)/lib64/#\1${SYSTEMLIBS}#'
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
require gcc-cross_${PV}.bb
|
||||
require gcc-crosssdk.inc
|
||||
require recipes-devtools/gcc/gcc-cross_${PV}.bb
|
||||
require recipes-devtools/gcc/gcc-crosssdk.inc
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
|
||||
# Compute how to get from libexecdir to bindir in python (easier than shell)
|
||||
BINRELPATH = "${@oe.path.relative(bb.data.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}", d), bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}", d))}"
|
||||
|
||||
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
|
||||
|
||||
|
||||
# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
|
||||
# found. These need to be relative paths so they work in different locations.
|
||||
dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
|
||||
install -d $dest
|
||||
for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
|
||||
ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
|
||||
done
|
||||
|
||||
# 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 installs libgcc into a special location in staging since it breaks doing a standalone build
|
||||
if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then
|
||||
dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
|
||||
oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc
|
||||
|
||||
# Ideally here we'd override the libgcc Makefile's idea of slibdir but
|
||||
# for now, we just move the files to the correct location
|
||||
|
||||
install -d $dest${target_base_libdir}
|
||||
mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir}
|
||||
rm -rf $dest${target_exec_prefix}/${TARGET_SYS}
|
||||
|
||||
# Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files
|
||||
|
||||
mv $dest${target_libdir}/gcc/* $dest${target_libdir}/
|
||||
rmdir $dest${target_libdir}/gcc
|
||||
fi
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
PACKAGES = "\
|
||||
libstdc++ \
|
||||
libstdc++-precompile-dev \
|
||||
libstdc++-dev \
|
||||
libg2c \
|
||||
libg2c-dev \
|
||||
libssp \
|
||||
libssp-dev \
|
||||
libgfortran \
|
||||
libgfortran-dev \
|
||||
libmudflap \
|
||||
libmudflap-dev \
|
||||
"
|
||||
|
||||
FILES_libg2c = "${target_libdir}/libg2c.so.*"
|
||||
FILES_libg2c-dev = "\
|
||||
${libdir}/libg2c.so \
|
||||
${libdir}/libg2c.a \
|
||||
${libdir}/libfrtbegin.a"
|
||||
|
||||
FILES_libstdc++ = "${libdir}/libstdc++.so.*"
|
||||
FILES_libstdc++-dev = "\
|
||||
${includedir}/c++/ \
|
||||
${libdir}/libstdc++.so \
|
||||
${libdir}/libstdc++.la \
|
||||
${libdir}/libstdc++.a \
|
||||
${libdir}/libsupc++.la \
|
||||
${libdir}/libsupc++.a"
|
||||
|
||||
FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
|
||||
|
||||
FILES_libssp = "${libdir}/libssp.so.*"
|
||||
FILES_libssp-dev = " \
|
||||
${libdir}/libssp*.so \
|
||||
${libdir}/libssp*.a \
|
||||
${libdir}/libssp*.la \
|
||||
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
|
||||
|
||||
FILES_libgfortran = "${libdir}/libgfortran.so.*"
|
||||
FILES_libgfortran-dev = " \
|
||||
${libdir}/libgfortran.a \
|
||||
${libdir}/libgfortran.so \
|
||||
${libdir}/libgfortranbegin.a"
|
||||
|
||||
FILES_libmudflap = "${libdir}/libmudflap*.so.*"
|
||||
FILES_libmudflap-dev = "\
|
||||
${libdir}/libmudflap*.so \
|
||||
${libdir}/libmudflap*.a \
|
||||
${libdir}/libmudflap*.la"
|
||||
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
|
||||
# Having anything auto depending on gcc-cross-sdk is a really bad idea...
|
||||
EXCLUDE_FROM_SHLIBS = "1"
|
||||
|
||||
PACKAGES = "${PN} ${PN}-doc"
|
||||
|
||||
FILES_${PN} = "\
|
||||
${bindir}/* \
|
||||
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/include \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
|
||||
${includedir}/c++/${BINV} \
|
||||
${prefix}/${TARGET_SYS}/bin/* \
|
||||
${prefix}/${TARGET_SYS}/lib/* \
|
||||
${prefix}/${TARGET_SYS}/usr/include/* \
|
||||
"
|
||||
FILES_${PN}-doc = "\
|
||||
${infodir} \
|
||||
${mandir} \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
|
||||
"
|
||||
|
||||
do_install () {
|
||||
oe_runmake 'DESTDIR=${D}' install-host
|
||||
|
||||
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
|
||||
rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
|
||||
rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
|
||||
|
||||
# We care about g++ not c++
|
||||
rm -f ${D}${bindir}/*c++
|
||||
|
||||
# We don't care about the gcc-<version> copies
|
||||
rm -f ${D}${bindir}/*gcc-?.?*
|
||||
|
||||
# We use libiberty from binutils
|
||||
rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
|
||||
rm -f ${D}${libdir}/libiberty.a
|
||||
|
||||
# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
|
||||
# found.
|
||||
dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
|
||||
install -d $dest
|
||||
for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
|
||||
ln -sf ${bindir}/${TARGET_PREFIX}$t $dest$t
|
||||
done
|
||||
}
|
||||
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
PACKAGES = "\
|
||||
${PN} ${PN}-symlinks \
|
||||
g++ g++-symlinks \
|
||||
cpp cpp-symlinks \
|
||||
g77 g77-symlinks \
|
||||
gfortran gfortran-symlinks \
|
||||
gcov gcov-symlinks \
|
||||
${PN}-doc \
|
||||
"
|
||||
|
||||
FILES_${PN} = "\
|
||||
${bindir}/${TARGET_PREFIX}gcc \
|
||||
${bindir}/${TARGET_PREFIX}gccbug \
|
||||
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/include \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
|
||||
"
|
||||
FILES_${PN}-symlinks = "\
|
||||
${bindir}/cc \
|
||||
${bindir}/gcc \
|
||||
${bindir}/gccbug \
|
||||
"
|
||||
|
||||
FILES_g77 = "\
|
||||
${bindir}/${TARGET_PREFIX}g77 \
|
||||
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
|
||||
"
|
||||
FILES_g77-symlinks = "\
|
||||
${bindir}/g77 \
|
||||
${bindir}/f77 \
|
||||
"
|
||||
FILES_gfortran = "\
|
||||
${bindir}/${TARGET_PREFIX}gfortran \
|
||||
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
|
||||
"
|
||||
FILES_gfortran-symlinks = "\
|
||||
${bindir}/gfortran \
|
||||
${bindir}/f95"
|
||||
|
||||
FILES_cpp = "\
|
||||
${bindir}/${TARGET_PREFIX}cpp \
|
||||
${base_libdir}/cpp \
|
||||
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
|
||||
FILES_cpp-symlinks = "${bindir}/cpp"
|
||||
|
||||
FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
|
||||
FILES_gcov-symlinks = "${bindir}/gcov"
|
||||
|
||||
FILES_g++ = "\
|
||||
${bindir}/${TARGET_PREFIX}g++ \
|
||||
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
|
||||
"
|
||||
FILES_g++-symlinks = "\
|
||||
${bindir}/c++ \
|
||||
${bindir}/g++ \
|
||||
"
|
||||
|
||||
|
||||
FILES_${PN}-doc = "\
|
||||
${infodir} \
|
||||
${mandir} \
|
||||
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
|
||||
"
|
||||
|
||||
do_install () {
|
||||
oe_runmake 'DESTDIR=${D}' install-host
|
||||
|
||||
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
|
||||
rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
|
||||
rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
|
||||
|
||||
# Hack around specs file assumptions
|
||||
test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
|
||||
|
||||
# Cleanup manpages..
|
||||
rm -rf ${D}${mandir}/man7
|
||||
|
||||
cd ${D}${bindir}
|
||||
|
||||
# We care about g++ not c++
|
||||
rm -f *c++
|
||||
|
||||
# We don't care about the gcc-<version> ones for this
|
||||
rm -f *gcc-?.?*
|
||||
|
||||
# Symlinks so we can use these trivially on the target
|
||||
ln -sf ${TARGET_SYS}-g77 g77 || true
|
||||
ln -sf ${TARGET_SYS}-gfortran gfortran || true
|
||||
ln -sf ${TARGET_SYS}-g++ g++
|
||||
ln -sf ${TARGET_SYS}-gcc gcc
|
||||
ln -sf g77 f77 || true
|
||||
ln -sf gfortran f95 || true
|
||||
ln -sf g++ c++
|
||||
ln -sf gcc cc
|
||||
ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
PR = "${INC_PR}.0"
|
||||
|
||||
require gcc-${PV}.inc
|
||||
require gcc-configure-runtime.inc
|
||||
require gcc-package-runtime.inc
|
||||
require recipes-devtools/gcc/gcc-${PV}.inc
|
||||
require recipes-devtools/gcc/gcc-configure-runtime.inc
|
||||
require recipes-devtools/gcc/gcc-package-runtime.inc
|
||||
|
||||
SRC_URI_append = "file://fortran-cross-compile-hack.patch"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
PR = "${INC_PR}.1"
|
||||
|
||||
require gcc-${PV}.inc
|
||||
require gcc-configure-target.inc
|
||||
require gcc-package-target.inc
|
||||
require recipes-devtools/gcc/gcc-${PV}.inc
|
||||
require recipes-devtools/gcc/gcc-configure-target.inc
|
||||
require recipes-devtools/gcc/gcc-package-target.inc
|
||||
|
||||
SRC_URI_append = "file://fortran-cross-compile-hack.patch"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require gcc-${PV}.inc
|
||||
require recipes-devtools/gcc/gcc-${PV}.inc
|
||||
|
||||
PR = "r0"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user