Skip to content

Commit 8db40a8

Browse files
oech3oech3
authored andcommitted
build-gnu.sh: Build GNU arch and reduce build time
1 parent 9f1922b commit 8db40a8

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

util/build-gnu.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW
66
# spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) gnproc greadlink gsed multihardlink texinfo CARGOFLAGS
7-
# spell-checker:ignore openat TOCTOU
7+
# spell-checker:ignore openat TOCTOU CFLAGS
88

99
set -e
1010

@@ -131,7 +131,8 @@ else
131131
# Disable useless checks
132132
sed -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
133133
./bootstrap --skip-po
134-
./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
134+
CFLAGS="${CFLAGS} -pipe -O0 -s" ./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
135+
--enable-install-program="arch" \
135136
"$([ "${SELINUX_ENABLED}" = 1 ] && echo --with-selinux || echo --without-selinux)"
136137
#Add timeout to to protect against hangs
137138
sed -i 's|^"\$@|'"${SYSTEM_TIMEOUT}"' 600 "\$@|' build-aux/test-driver
@@ -237,9 +238,6 @@ sed -i "s/\$prog: invalid input/\$prog: error: invalid input/g" tests/basenc/bas
237238
sed -i "s/ {ERR=>\"\$prog: foobar\\\\n\" \. \$try_help }/ {ERR=>\"error: unexpected argument '--foobar' found\n\n tip: to pass '--foobar' as a value, use '-- --foobar'\n\nUsage: basenc [OPTION]... [FILE]\n\nFor more information, try '--help'.\n\"}]/" tests/basenc/basenc.pl
238239
sed -i "s/ {ERR_SUBST=>\"s\/(unrecognized|unknown) option \[-' \]\*foobar\[' \]\*\/foobar\/\"}],//" tests/basenc/basenc.pl
239240

240-
# Remove the check whether a util was built. Otherwise tests against utils like "arch" are not run.
241-
sed -i "s|require_built_ |# require_built_ |g" init.cfg
242-
243241
# exit early for the selinux check. The first is enough for us.
244242
sed -i "s|# Independent of whether SELinux|return 0\n #|g" init.cfg
245243

0 commit comments

Comments
 (0)