Commits
Jeremy Huddleston Sequoia authored 4a70349eca6
146 146 | fi; |
147 147 | if [ "x$ARM_MULTILIB_ARCHS" == "x" ] ; then |
148 148 | echo "Error: missing ARM slices in $ARM_SYSROOT" |
149 149 | exit 1 |
150 150 | else |
151 151 | export ARM_MULTILIB_ARCHS |
152 152 | fi |
153 153 | fi |
154 154 | # APPLE LOCAL end ARM |
155 155 | |
156 + | RANLIB=${RANLIB_FOR_HOST-ranlib} |
157 + | STRIP=${STRIP_FOR_HOST-strip} |
158 + | DSYMUTIL=${DSYMUTIL_FOR_HOST-dsymutil} |
159 + | |
156 160 | ######################################## |
157 161 | # Run the build. |
158 162 | |
159 163 | # Create the source tree we'll actually use to build, deleting |
160 164 | # tcl since it doesn't actually build properly in a cross environment |
161 165 | # and we don't really need it. |
162 166 | SRC_DIR=$DIR/src |
163 167 | rm -rf $SRC_DIR || exit 1 |
164 168 | mkdir $SRC_DIR || exit 1 |
165 169 | ln -s $ORIG_SRC_DIR/* $SRC_DIR/ || exit 1 |
525 529 | for t in $TARGETS ; do |
526 530 | if [ "$t" == 'arm' ] ; then |
527 531 | cp -p $ARM_SYSROOT/usr/lib/libstdc++.6.dylib \ |
528 532 | .$DEST_ROOT/lib/apple-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib \ |
529 533 | || exit 1 |
530 534 | else |
531 535 | cp -p /usr/lib/libstdc++.6.dylib \ |
532 536 | .$DEST_ROOT/lib/apple-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib \ |
533 537 | || exit 1 |
534 538 | fi |
535 - | strip -x -c .$DEST_ROOT/lib/apple-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib || exit 1 |
539 + | ${STRIP} -x -c .$DEST_ROOT/lib/apple-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib || exit 1 |
536 540 | done |
537 541 | fi |
538 542 | |
539 543 | # include |
540 544 | HEADERPATH=$DEST_ROOT/include/gcc/darwin/apple-gcc42 |
541 545 | mkdir -p .$HEADERPATH || exit 1 |
542 546 | |
543 547 | # Some headers are installed from more-hdrs/. They all share |
544 548 | # one common feature: they shouldn't be installed here. Sometimes, |
545 549 | # they should be part of FSF GCC and installed from there; sometimes, |
672 676 | ######################################## |
673 677 | # Create SYM_DIR with information required for debugging. |
674 678 | |
675 679 | cd $SYM_DIR || exit 1 |
676 680 | |
677 681 | # Clean out SYM_DIR in case -noclean was passed to buildit. |
678 682 | rm -rf * || exit 1 |
679 683 | |
680 684 | # Generate .dSYM files |
681 685 | find $DEST_DIR -perm -0111 \! -name fixinc.sh \ |
682 - | \! -name mkheaders -type f -print | xargs -n 1 dsymutil |
686 + | \! -name mkheaders -type f -print | xargs -n 1 ${DSYMUTIL} |
683 687 | |
684 688 | # Save .dSYM files and .a archives |
685 689 | cd $DEST_DIR || exit 1 |
686 690 | find . \( -path \*.dSYM/\* -or -name \*.a \) -print \ |
687 691 | | cpio -pdml $SYM_DIR || exit 1 |
688 692 | # Save source files. |
689 693 | mkdir $SYM_DIR/src || exit 1 |
690 694 | cd $DIR || exit 1 |
691 695 | find obj-* -name \*.\[chy\] -print | cpio -pdml $SYM_DIR/src || exit 1 |
692 696 | |
693 697 | ######################################## |
694 698 | # Remove debugging information from DEST_DIR. |
695 699 | |
696 700 | find $DEST_DIR -perm -0111 \! -name fixinc.sh \ |
697 701 | \! -name mkheaders \! -name libstdc++.dylib -type f -print \ |
698 - | | xargs strip || exit 1 |
702 + | | xargs ${STRIP} || exit 1 |
699 703 | |
700 704 | # Ignore errors from this next one due to possible issues on Tiger |
701 - | find $DEST_DIR -name \*.a -print | xargs strip -SX |
705 + | find $DEST_DIR -name \*.a -print | xargs ${STRIP} -SX |
702 706 | |
703 - | find $DEST_DIR -name \*.a -print | xargs ranlib || exit 1 |
707 + | find $DEST_DIR -name \*.a -print | xargs ${RANLIB} || exit 1 |
704 708 | find $DEST_DIR -name \*.dSYM -print | xargs rm -r || exit 1 |
705 709 | chgrp -h -R wheel $DEST_DIR |
706 710 | chgrp -R wheel $DEST_DIR |
707 711 | |
708 712 | # Done! |
709 713 | exit 0 |