/[gentoo-alt]/trunk/prefix/eclass/toolchain.eclass
Gentoo

Diff of /trunk/prefix/eclass/toolchain.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1376 Revision 1377
622 else 622 else
623 gcc_envd_file="${D}${gcc_envd_base}-$1" 623 gcc_envd_file="${D}${gcc_envd_base}-$1"
624 gcc_specs_file="${LIBPATH}/$1.specs" 624 gcc_specs_file="${LIBPATH}/$1.specs"
625 fi 625 fi
626 626
627 echo "PATH=\"${BINPATH}\"" > ${gcc_envd_file} 627 echo "PATH=\"${EPREFIX}/${BINPATH}\"" > ${gcc_envd_file}
628 echo "ROOTPATH=\"${BINPATH}\"" >> ${gcc_envd_file} 628 echo "ROOTPATH=\"${EPREFIX}/${BINPATH}\"" >> ${gcc_envd_file}
629 629
630 if use multilib && ! has_multilib_profile; then 630 if use multilib && ! has_multilib_profile; then
631 LDPATH="${LIBPATH}" 631 LDPATH="${EPREFIX}/${LIBPATH}"
632 for path in 32 64 ; do 632 for path in 32 64 ; do
633 [[ -d ${LIBPATH}/${path} ]] && LDPATH="${LDPATH}:${LIBPATH}/${path}" 633 [[ -d ${EPREFIX}/${LIBPATH}/${path} ]] && LDPATH="${LDPATH}:${EPREFIX}/${LIBPATH}/${path}"
634 done 634 done
635 else 635 else
636 local MULTIDIR 636 local MULTIDIR
637 LDPATH="${LIBPATH}" 637 LDPATH="${EPREFIX}/${LIBPATH}"
638 638
639 # We want to list the default ABI's LIBPATH first so libtool 639 # We want to list the default ABI's LIBPATH first so libtool
640 # searches that directory first. This is a temporary 640 # searches that directory first. This is a temporary
641 # workaround for libtool being stupid and using .la's from 641 # workaround for libtool being stupid and using .la's from
642 # conflicting ABIs by using the first one in the search path 642 # conflicting ABIs by using the first one in the search path
643 643
644 local abi=${DEFAULT_ABI} 644 local abi=${DEFAULT_ABI}
645 local MULTIDIR=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory) 645 local MULTIDIR=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory)
646 if [[ ${MULTIDIR} == "." ]] ; then 646 if [[ ${MULTIDIR} == "." ]] ; then
647 LDPATH=${LIBPATH} 647 LDPATH="${EPREFIX}/${LIBPATH}"
648 else 648 else
649 LDPATH=${LIBPATH}/${MULTIDIR} 649 LDPATH="${EPREFIX}/${LIBPATH}/${MULTIDIR}"
650 fi 650 fi
651 651
652 for abi in $(get_all_abis) ; do 652 for abi in $(get_all_abis) ; do
653 [[ ${abi} == ${DEFAULT_ABI} ]] && continue 653 [[ ${abi} == ${DEFAULT_ABI} ]] && continue
654 654
655 MULTIDIR=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory) 655 MULTIDIR=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory)
656 if [[ ${MULTIDIR} == "." ]] ; then 656 if [[ ${MULTIDIR} == "." ]] ; then
657 LDPATH=${LDPATH}:${LIBPATH} 657 LDPATH=${LDPATH}:${EPREFIX}/${LIBPATH}
658 else 658 else
659 LDPATH=${LDPATH}:${LIBPATH}/${MULTIDIR} 659 LDPATH=${LDPATH}:${EPREFIX}/${LIBPATH}/${MULTIDIR}
660 fi 660 fi
661 done 661 done
662 fi 662 fi
663 663
664 echo "LDPATH=\"${LDPATH}\"" >> ${gcc_envd_file} 664 echo "LDPATH=\"${LDPATH}\"" >> ${gcc_envd_file}
666 local mbits 666 local mbits
667 CC=$(XGCC) has_m32 && mbits="${mbits:+${mbits} }32" 667 CC=$(XGCC) has_m32 && mbits="${mbits:+${mbits} }32"
668 CC=$(XGCC) has_m64 && mbits="${mbits:+${mbits} }64" 668 CC=$(XGCC) has_m64 && mbits="${mbits:+${mbits} }64"
669 echo "GCCBITS=\"${mbits}\"" >> ${gcc_envd_file} 669 echo "GCCBITS=\"${mbits}\"" >> ${gcc_envd_file}
670 670
671 echo "MANPATH=\"${DATAPATH}/man\"" >> ${gcc_envd_file} 671 echo "MANPATH=\"${EPREFIX}/${DATAPATH}/man\"" >> ${gcc_envd_file}
672 echo "INFOPATH=\"${DATAPATH}/info\"" >> ${gcc_envd_file} 672 echo "INFOPATH=\"${EPREFIX}/${DATAPATH}/info\"" >> ${gcc_envd_file}
673 echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${gcc_envd_file} 673 echo "STDCXX_INCDIR=\"${EPREFIX}/${STDCXX_INCDIR##*/}\"" >> ${gcc_envd_file}
674 674
675 is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file} 675 is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file}
676 676
677 # Set which specs file to use 677 # Set which specs file to use
678 [[ -n ${gcc_specs_file} ]] && echo "GCC_SPECS=\"${gcc_specs_file}\"" >> ${gcc_envd_file} 678 [[ -n ${gcc_specs_file} ]] && echo "GCC_SPECS=\"${gcc_specs_file}\"" >> ${gcc_envd_file}
1264 esac 1264 esac
1265 if [[ -n ${needed_libc} ]] ; then 1265 if [[ -n ${needed_libc} ]] ; then
1266 if ! has_version ${CATEGORY}/${needed_libc} ; then 1266 if ! has_version ${CATEGORY}/${needed_libc} ; then
1267 confgcc="${confgcc} --disable-shared --disable-threads --without-headers" 1267 confgcc="${confgcc} --disable-shared --disable-threads --without-headers"
1268 elif built_with_use ${CATEGORY}/${needed_libc} crosscompile_opts_headers-only ; then 1268 elif built_with_use ${CATEGORY}/${needed_libc} crosscompile_opts_headers-only ; then
1269 confgcc="${confgcc} --disable-shared --with-sysroot=${PREFIX}/${CTARGET}" 1269 confgcc="${confgcc} --disable-shared --with-sysroot=${EPREFIX}/${PREFIX}/${CTARGET}"
1270 else 1270 else
1271 confgcc="${confgcc} --with-sysroot=${PREFIX}/${CTARGET}" 1271 confgcc="${confgcc} --with-sysroot=${EPREFIX}/${PREFIX}/${CTARGET}"
1272 fi 1272 fi
1273 fi 1273 fi
1274 1274
1275 if [[ ${GCCMAJOR}.${GCCMINOR} > 4.1 ]] ; then 1275 if [[ ${GCCMAJOR}.${GCCMINOR} > 4.1 ]] ; then
1276 confgcc="${confgcc} --disable-bootstrap" 1276 confgcc="${confgcc} --disable-bootstrap"
1298 [[ ${CTARGET} == *-uclibc* ]] && [[ ${GCCMAJOR}.${GCCMINOR} > 3.3 ]] \ 1298 [[ ${CTARGET} == *-uclibc* ]] && [[ ${GCCMAJOR}.${GCCMINOR} > 3.3 ]] \
1299 && confgcc="${confgcc} --enable-clocale=uclibc" 1299 && confgcc="${confgcc} --enable-clocale=uclibc"
1300 1300
1301 # Nothing wrong with a good dose of verbosity 1301 # Nothing wrong with a good dose of verbosity
1302 echo 1302 echo
1303 einfo "EPREFIX: ${EPREFIX}"
1303 einfo "PREFIX: ${PREFIX}" 1304 einfo "PREFIX: ${PREFIX}"
1304 einfo "BINPATH: ${BINPATH}" 1305 einfo "BINPATH: ${BINPATH}"
1305 einfo "LIBPATH: ${LIBPATH}" 1306 einfo "LIBPATH: ${LIBPATH}"
1306 einfo "DATAPATH: ${DATAPATH}" 1307 einfo "DATAPATH: ${DATAPATH}"
1307 einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}" 1308 einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}"
1568 mkdir -p "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/ 1569 mkdir -p "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/
1569 mv "${D}"${LIBPATH}/* "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/ 1570 mv "${D}"${LIBPATH}/* "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/
1570 mv "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/ "${D}"${LIBPATH} 1571 mv "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/ "${D}"${LIBPATH}
1571 1572
1572 dodir /etc/env.d 1573 dodir /etc/env.d
1573 echo "LDPATH=\"${LIBPATH}/${GCC_LIB_USE_SUBDIR}/\"" >> "${D}"/etc/env.d/99${PN} 1574 echo "LDPATH=\"${EPREFIX}/${LIBPATH}/${GCC_LIB_USE_SUBDIR}/\"" >> "${D}"/etc/env.d/99${PN}
1574 fi 1575 fi
1575 1576
1576 if [[ ${GCC_VAR_TYPE} == "non-versioned" ]] ; then 1577 if [[ ${GCC_VAR_TYPE} == "non-versioned" ]] ; then
1577 # if we're not using versioned directories, we need to use versioned 1578 # if we're not using versioned directories, we need to use versioned
1578 # filenames. 1579 # filenames.

Legend:
Removed from v.1376  
changed lines
  Added in v.1377

  ViewVC Help
Powered by ViewVC 1.1.20