diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/gccnewlib/gccnewlib.add | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/gccnewlib/gccnewlib.add b/scripts/gccnewlib/gccnewlib.add index feb1338daa..c547660055 100644 --- a/scripts/gccnewlib/gccnewlib.add +++ b/scripts/gccnewlib/gccnewlib.add @@ -99,10 +99,16 @@ This is gcc's and newlib C Library's sources with patches for RTEMS. echo "%dir /opt/rtems/lib/gcc-lib/@target_alias@" >> dirs ; # Collect multilib subdirectories - TGTDIR="$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@" - find $TGTDIR \ - \( -type d -a ! -path "$TGTDIR/include*" \) -print | \ - sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> dirs + TGTDIR="/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@" + f=`gcc/xgcc --print-multi-lib | sed -e 's,;.*$,,'` + for i in $f; do + case $i in + \.) echo "%dir ${TGTDIR}" >> dirs + ;; + *) echo "%dir ${TGTDIR}/$i" >> dirs + ;; + esac + done # Collect files to go into different packages cp dirs files.chill @@ -111,7 +117,7 @@ This is gcc's and newlib C Library's sources with patches for RTEMS. cp dirs files.objc cp dirs files.gcj - f=`find $TGTDIR ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`; + f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`; for i in $f; do case $i in *chill*) echo "$i" >> files.chill ;; |