build.sh 848 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. set -e
  3. # glibc build script
  4. # This script configures and builds glibc with standard options
  5. # Change to the source directory
  6. cd sources/glibc
  7. # Create a separate build directory as required by glibc
  8. mkdir -p build
  9. cd build
  10. # Configure glibc with standard options
  11. ../configure \
  12. --prefix=${PREFIX} \
  13. --libdir=${LIBDIR} \
  14. --libexecdir=${LIBEXECDIR} \
  15. --includedir=${INCLUDEDIR} \
  16. --datadir=${DATADIR} \
  17. --mandir=${MANDIR} \
  18. --infodir=${INFODIR} \
  19. --localstatedir=${DESTDIR}${LOCALSTATEDIR} \
  20. --sysconfdir=${DESTDIR}${SYSCONFIGDIR} \
  21. --enable-add-ons \
  22. --enable-stack-protector=strong \
  23. --enable-bind-now \
  24. --enable-fortify-source \
  25. --disable-werror \
  26. --with-headers=/usr/include
  27. # Build using all available threads
  28. make -j$(nproc)
  29. echo "glibc build completed successfully"