|
406 | 406 | # Make some directories
|
407 | 407 | mkdir -p "$build_dir/$arch/musl" \
|
408 | 408 | "$build_dir/$arch/runtimes" \
|
409 |
| - "$sdk_root/$arch/usr" |
| 409 | + "$sdk_root/usr" |
410 | 410 |
|
411 | 411 | # -----------------------------------------------------------------------
|
412 | 412 |
|
@@ -653,23 +653,17 @@ EOF
|
653 | 653 |
|
654 | 654 | # -----------------------------------------------------------------------
|
655 | 655 |
|
656 |
| - header "Building bzip2 for $arch" |
| 656 | + header "Building and installing bzip2 for $arch" |
| 657 | + |
| 658 | + # We do this in a single step because bzip2's Makefile has |
| 659 | + # its `test` action as a dependency of `all`, and that won't work |
| 660 | + # when we're cross-compiling unless we've got the right binformat |
| 661 | + # modules installed. |
| 662 | + # |
| 663 | + # The `install` action doesn't have this problem. |
657 | 664 |
|
658 | 665 | rm -rf ${build_dir}/$arch/bzip2
|
659 | 666 | cp -R ${source_dir}/bzip2 ${build_dir}/$arch/bzip2
|
660 |
| - quiet_pushd $build_dir/$arch/bzip2 |
661 |
| - run make \ |
662 |
| - CC="$cc" \ |
663 |
| - CXX="$cxx" \ |
664 |
| - LDFLAGS="$ldflags" \ |
665 |
| - CXXLDFLAGS="$cxxldflags" \ |
666 |
| - AS="$as" \ |
667 |
| - AR="ar" RANLIB="ranlib" \ |
668 |
| - PREFIX=$sdk_root/usr |
669 |
| - quiet_popd |
670 |
| - |
671 |
| - header "Installing bzip2 for $arch" |
672 |
| - |
673 | 667 | quiet_pushd $build_dir/$arch/bzip2
|
674 | 668 | run make install \
|
675 | 669 | CC="$cc" \
|
|
699 | 693 |
|
700 | 694 | quiet_pushd ${build_dir}/$arch/xz
|
701 | 695 | run ninja -j$parallel_jobs install
|
| 696 | + |
702 | 697 | quiet_popd
|
703 | 698 |
|
704 | 699 | # -----------------------------------------------------------------------
|
|
954 | 949 | $sdk_root/usr/lib/swift/linux \
|
955 | 950 | $sdk_root/usr/lib/swift_static/linux
|
956 | 951 |
|
| 952 | + # ----------------------------------------------------------------------- |
| 953 | + |
| 954 | + header "Removing unnecessary files" |
| 955 | + |
| 956 | + # Some of the scripts that get installed into /usr/bin are GPL'd. |
| 957 | + # We don't want those, but also we don't really need the things in |
| 958 | + # /usr/bin at all here. Same goes for the man pages and documentation |
| 959 | + # that get installed; if users want those things, installing the |
| 960 | + # package on the host system makes more sense. |
| 961 | + |
| 962 | + for dir in usr/bin man usr/share/doc usr/share/man; do |
| 963 | + echo " $dir" |
| 964 | + rm -rf ${sdk_root}/$dir |
| 965 | + done |
| 966 | + |
957 | 967 | done
|
958 | 968 |
|
959 | 969 | # Now generate the bundle
|
|
0 commit comments