pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS

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

    
11
#!/usr/bin/ksh93
22
33
#
44
# nfstest_gcc_build.ksh93
55
#
66
# Simple NFSv4 torture test by building gcc in parallel
77
# on a NFS filesystem
88
#
99
set -o xtrace
1010
set -o errexit
1111
set -o nounset
1212
1313
#
1414
# build config
1515
#
1616
typeset config_cp_p_function_not_implemented_workaround=false
1717
typeset config_use_posix_ksh93_builtins=true
1818
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+
)
2223
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
2532
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
4044
46-
45+
#
4248
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
4651
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
5566
67+
cd "$PWD/gcc/"
5669
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"
5871
fi
5972
73+
#
6576
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') )
6982
	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
7588
	else
89+
	bash ./configure "${configure_options[@]}"
8090
	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.

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