01-binutils 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Build script for binutils.
  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. version=2.30
  17. cd -- "$TMPDIR"
  18. rm -rf binutils-${version}
  19. unpack "${worktree}/sources/binutils-${version}.tar.lz"
  20. # Build instructions
  21. cd binutils-${version}
  22. # Build in a separate directory
  23. rm -rf ../binutils-build
  24. mkdir ../binutils-build
  25. cd ../binutils-build
  26. ../binutils-${version}/configure \
  27. AR="ar" AS="as" CC="$BTCC" CXX="$BTCXX" \
  28. CFLAGS="$BTCFLAGS" CXXFLAGS="$BTCXXFLAGS" LDFLAGS="$BTLDFLAGS" \
  29. --prefix="$crossdir" \
  30. --host=$host \
  31. --target=$target \
  32. --enable-deterministic-archives \
  33. --disable-compressed-debug-sections \
  34. --disable-werror \
  35. --disable-nls \
  36. --disable-ppl-version-check \
  37. --disable-cloog-version-check \
  38. --with-sysroot="${crossdir}/$target" \
  39. $multilib_options
  40. make -j${jobs} MAKEINFO="true"
  41. make -j${jobs} MAKEINFO="true" install
  42. cleanup()
  43. {
  44. cd -- "$TMPDIR" && rm -rf binutils-${version}
  45. }