pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


nfstest_gcc_build.ksh93
Posted by Anonymous on Mon 12th Feb 2024 10:00
raw | new post
view followups (newest first): nfstest_gcc_build.ksh93 by Anonymous
modification of post by Anonymous (view diff)

  1. #!/usr/bin/ksh93
  2.  
  3. #
  4. # nfstest_gcc_build.ksh93
  5. #
  6. # Simple NFSv4 torture test by building gcc in parallel
  7. # on a NFS filesystem
  8. #
  9. set -o xtrace
  10. set -o errexit
  11.  
  12. #
  13. # build config
  14. #
  15. typeset config_cp_p_function_not_implemented_workaround=false
  16. typeset config_use_posix_ksh93_builtins=true
  17.  
  18. #
  19. # source checkout
  20. #
  21.  
  22. #git -c checkout.workers=16 clone -b 'releases/gcc-13.2.0' git://gcc.gnu.org/git/gcc.git
  23. #git -c checkout.workers=16 clone -b 'releases/gcc-13.2.0' https://github.com/gcc-mirror/gcc.git
  24. git -c checkout.workers=16 clone -b 'releases/gcc-13.2.0' git://repo.or.cz/gcc.git
  25.  
  26.  
  27. cd "$PWD/gcc/" || { sync ; sleep 5 ; cd gcc ; }
  28.  
  29. if $config_use_posix_ksh93_builtins ; then
  30.         PATH="/usr/ast/bin:/opt/ast/bin:$PATH"
  31. fi
  32.  
  33. #
  34. # patch sources and configure build
  35. #
  36.  
  37. # Cygwin: workaround for configure using cp -p where ln -s should be used
  38. # (this is an automake/autoconf issue, they should trust Cygwin and not use
  39. # ancient workarounds for issues which no longer exists)
  40. (set -o xtrace ; sed -i "s/as_ln_s='cp -pR'/as_ln_s='ln -s'/g" $(find . -name configure) )
  41.  
  42. if $config_use_posix_ksh93_builtins ; then
  43.         (set -o xtrace ; sed -i "s/\/bin\/sh/\/bin\/ksh93/g" $(find . -name configure) )
  44. fi
  45.  
  46. ksh93 ./configure
  47. if $config_cp_p_function_not_implemented_workaround ; then
  48.         # workaround for $ cp -p # failing with "Function not
  49.         # implemented" in older versions of ms-nfs41-client
  50.         (set -o xtrace ; sed -i -r 's/(cp.*)([[:space:]]+-p[[:space:]]+)/\1\2 -A pt /g' $(find . -name Makefile -o -name Makefile.in) )
  51. fi
  52.  
  53. if $config_use_posix_ksh93_builtins ; then
  54.         # replace /bin/sh with /bin/ksh93 for speed
  55.         (set -o xtrace ; sed -i -r 's/\/bin\/sh/\/bin\/ksh93/g' $(find . -name Makefile -o -name Makefile.in) )
  56. fi
  57.  
  58. #
  59. # build gcc
  60. #
  61. ksh93 -c 'export SHELL=/bin/ksh93 ; (yes | make -j10 all)'
  62. echo $?
  63.  
  64. echo "#Done."

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at