01-binutils 1.5 KB

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