commit: 03640757f2af1471324fc3e305f899f377d6409d Author: Steve Arnold <nerdboy <AT> gentoo <DOT> org> AuthorDate: Fri Oct 13 04:46:58 2017 +0000 Commit: Steve Arnold <nerdboy <AT> gentoo <DOT> org> CommitDate: Fri Oct 13 04:46:58 2017 +0000 URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=03640757
sys-devel/crossdev: add one more avr-specific hack * link ldscripts to the right place (parameterized and expandable even) Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org> crossdev | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crossdev b/crossdev index 78d63da..8ba0360 100755 --- a/crossdev +++ b/crossdev @@ -228,7 +228,8 @@ parse_target() { LCAT="dev-embedded"; LPKG="avr-libc"; GUSE="-fortran -go" # doesn't work MULTILIB_USE="yes" #377039 - WITH_DEF_HEADERS="no";; + WITH_DEF_HEADERS="no" + MAKE_SYMLINK="yes";; # due to upstream lameness, build C/C++ at first glance *-cygwin) @@ -449,6 +450,7 @@ uninstall() { # clean out files from crossdev itself [[ -e ${EPREFIX}/var/db/pkg/cross-${CTARGET} ]] && rmdir "${EPREFIX}"/var/db/pkg/cross-${CTARGET} rm -f "${EPREFIX}"/usr/bin/${CTARGET}-{emerge,fix-root,pkg-config} "${EPREFIX}"/usr/bin/emerge-${CTARGET} + [[ -e ${EPREFIX}/usr/${CTARGET}/lib/ldscripts ]] && rm "${EPREFIX}"/usr/${CTARGET}/lib/ldscripts for f in make.{conf,globals,profile} ; do f="${EPREFIX}/usr/${CTARGET}/etc/${f}" @@ -1291,7 +1293,15 @@ if ! ex_fast ; then USE="${GUSE} ${USE} ${GUSE_DISABLE_STAGE_2}" \ doemerge ${GPKG} ${GPKG}-stage2 fi +fi +# this is to make sure that avr linker can find its a**, er, ldscripts +if [[ ${MAKE_SYMLINK} == "yes" ]] ; then + case ${CTARGET} in + avr*) ln -s ${EPREFIX}/usr/$CHOST/${CTARGET}/lib/ldscripts ${EPREFIX}/usr/${CTARGET}/lib/ldscripts + ;; + *) ;; + esac fi # all the extra things (like debuggers)