16-symlinks 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Build script for essential symlinks.
  2. #
  3. # Copyright (c) 2014-2018 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Essential symbolic links for rootdir
  17. # Binaries
  18. for file in awk bash cat dd echo env file grep ln ls pwd rm sed sh stty
  19. do
  20. ln -sf "/tools/bin/${file}" "${rootdir}/bin"
  21. done
  22. ln -sf gcc /tools/bin/cc
  23. ln -sf /tools/bin/perl "${rootdir}/usr/bin"
  24. ln -sf /tools/bin/install "${rootdir}/usr/bin"
  25. ln -sf /proc/self/mounts "${rootdir}/etc/mtab"
  26. # Libraries
  27. ln -sf /tools/lib${libSuffix}/libgcc_s.so "${rootdir}/usr/lib${libSuffix}"
  28. ln -sf /tools/lib${libSuffix}/libgcc_s.so.1 "${rootdir}/usr/lib${libSuffix}"
  29. ln -sf /tools/lib${libSuffix}/libstdc++.so "${rootdir}/usr/lib${libSuffix}"
  30. ln -sf /tools/lib${libSuffix}/libstdc++.so.6 "${rootdir}/usr/lib${libSuffix}"
  31. ln -sf /tools/lib${libSuffix}/libstdc++.a "${rootdir}/usr/lib${libSuffix}"
  32. ln -sf /tools/lib${libSuffix}/libssp.so "${rootdir}/usr/lib${libSuffix}"
  33. ln -sf /tools/lib${libSuffix}/libssp.so.0 "${rootdir}/usr/lib${libSuffix}"
  34. ln -sf /tools/lib${libSuffix}/libssp.so.0.0.0 "${rootdir}/usr/lib${libSuffix}"
  35. ln -sf /tools/lib${libSuffix}/libssp.a "${rootdir}/usr/lib${libSuffix}"
  36. ln -sf /tools/lib${libSuffix}/libssp_nonshared.a "${rootdir}/usr/lib${libSuffix}"
  37. # Strip temporary prefix
  38. sed -e 's/tools/usr/' /tools/lib${libSuffix}/libstdc++.la \
  39. > "${rootdir}/usr/lib${libSuffix}/libstdc++.la"