Difference between
modified post ee16e184 by Anonymous on Mon 18th Mar 2024 11:07
original post 7a2d by Anonymous on Thu 29th Feb 2024 12:50
Download diff
Show
old version |
new version |
both versions
| 1 | 1 | #!/usr/bin/ksh93 | |
| 2 | 2 | ||
| 3 | 3 | # | |
| 4 | 4 | # nfstest_gcc_build.ksh93 | |
| 5 | 5 | # | |
| 6 | 6 | # Simple NFSv4 torture test by building gcc in parallel | |
| 7 | 7 | # on a NFS filesystem | |
| 8 | 8 | # | |
| 9 | 9 | set -o xtrace | |
| 10 | 10 | set -o errexit | |
| 11 | 11 | set -o nounset | |
| 12 | 12 | ||
| 13 | 13 | # | |
| 14 | 14 | # build config | |
| 15 | 15 | # | |
| 16 | 16 | typeset config_cp_p_function_not_implemented_workaround=false | |
| 17 | 17 | typeset config_use_posix_ksh93_builtins=true | |
| 18 | 18 | ||
| 19 | - | # | |
| 19 | + | compound gitdata=( | |
| 20 | - | # source checkout | |
| 20 | + | typeset url='git://repo.or.cz/gcc.git' | |
| 21 | - | # | |
| 21 | + | typeset tag='releases/gcc-13.1.0' | |
| 22 | + | ) | |
| 22 | 23 | ||
| 23 | - | #time git -c checkout.workers=16 clone -b 'releases/gcc-13.2.0' --single-branch git://gcc.gnu.org/git/gcc.git | |
| 24 | + | typeset -a configure_options=( | |
| 24 | - | #time git -c checkout.workers=16 clone -b 'releases/gcc-13.2.0' --single-branch https://github.com/gcc-mirror/gcc.git | |
| 25 | + | # Per irc://irc.oftc.net/#gcc: | |
| 26 | + | # ".. pch is broken on windows as allocation using the fixed | |
| 25 | 32 | ||
| 26 | - | if [[ -f '../gcc.bundle' ]] ; then | |
| 33 | + | # | |
| 27 | - | # Use local bundle as cache | |
| 34 | + | # temp dir setup | |
| 28 | - | # The bundle was created like this: | |
| 35 | + | # | |
| 29 | - | # ---- snip ---- | |
| 36 | + | ||
| 30 | - | # git clone git://repo.or.cz/gcc.git | |
| 37 | + | # fixme: Does not work with NFSv4.1 filesystem from exported Linux tmpfs - why ? | |
| 31 | - | # cd gcc | |
| 38 | + | #tmpdir='/cygdrive/m/tmpdir' | |
| 32 | - | # git bundle create '../gcc.bundle' --all | |
| 39 | + | #mkdir -p "$tmpdir" | |
| 33 | - | # cd .. | |
| 40 | + | #chmod a=rwxt "$tmpdir" | |
| 34 | - | # rm -Rf gcc | |
| 41 | + | #if [[ -d "$tmpdir" && -w "$tmpdir" ]] ; then | |
| 35 | - | # ---- snip ---- | |
| 42 | + | # export TMPDIR="$tmpdir" | |
| 36 | - | time git -c checkout.workers=16 clone -b 'releases/gcc-13.2.0' --single-branch '../gcc.bundle' | |
| 43 | + | #fi | |
| 40 | 44 | ||
| 46 | - | ||
| 45 | + | # | |
| 42 | 48 | ||
| 43 | - | if $config_use_posix_ksh93_builtins ; then | |
| 49 | + | #time git -c checkout.workers=16 clone -b "${gitdata.tag}" --single-branch git://gcc.gnu.org/git/gcc.git | |
| 44 | - | PATH="/usr/ast/bin:/opt/ast/bin:$PATH" | |
| 50 | + | #time git -c checkout.workers=16 clone -b "${gitdata.tag}" --single-branch https://github.com/gcc-mirror/gcc.git | |
| 46 | 51 | ||
| 47 | - | # | |
| 52 | + | if [[ -f '../gcc.bundle' ]] ; then | |
| 48 | - | # patch sources and configure build | |
| 53 | + | # Use local bundle as cache | |
| 49 | - | # | |
| 54 | + | # The bundle was created like this: | |
| 50 | - | ||
| 55 | + | # ---- snip ---- | |
| 51 | - | # Cygwin: workaround for configure using cp -p where ln -s should be used | |
| 56 | + | # git clone git://repo.or.cz/gcc.git | |
| 52 | - | # (this is an automake/autoconf issue, they should trust Cygwin and not use | |
| 57 | + | # cd gcc | |
| 53 | - | # ancient workarounds for issues which no longer exists) | |
| 58 | + | # git bundle create '../gcc.bundle' --all | |
| 54 | - | (set -o xtrace ; sed -i "s/as_ln_s='cp -pR'/as_ln_s='ln -s'/g" $(find . -name 'configure') ) | |
| 59 | + | # cd .. | |
| 60 | + | # rm -Rf gcc | |
| 55 | 66 | ||
| 67 | + | cd "$PWD/gcc/" | |
| 56 | 69 | if $config_use_posix_ksh93_builtins ; then | |
| 57 | - | (set -o xtrace ; sed -i "s/\/bin\/sh/\/bin\/ksh93/g" $(find . -name 'configure') ) | |
| 70 | + | PATH="/usr/ast/bin:/opt/ast/bin:$PATH" | |
| 58 | 71 | fi | |
| 59 | 72 | ||
| 73 | + | # | |
| 65 | 76 | ||
| 66 | - | if $config_cp_p_function_not_implemented_workaround ; then | |
| 77 | + | # Cygwin: workaround for configure using cp -p where ln -s should be used | |
| 67 | - | # workaround for $ cp -p # failing with "Function not | |
| 78 | + | # (this is an automake/autoconf issue, they should trust Cygwin and not use | |
| 68 | - | # implemented" in older versions of ms-nfs41-client | |
| 79 | + | # ancient workarounds for issues which no longer exists) | |
| 80 | + | (set -o xtrace ; sed -i "s/as_ln_s='cp -pR'/as_ln_s='ln -s'/g" $(find . -name 'configure') ) | |
| 69 | 82 | if $config_use_posix_ksh93_builtins ; then | |
| 70 | - | ( | |
| 83 | + | (set -o xtrace ; sed -i "s/\/bin\/sh/\/bin\/ksh93/g" $(find . -name 'configure') ) | |
| 84 | + | fi | |
| 75 | 88 | else | |
| 89 | + | bash ./configure "${configure_options[@]}" | |
| 80 | 90 | fi | |
| 91 | + |
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.
nrubsig.kpaste.net RSS