forked from StephanTLavavej/mingw-distro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coreutils.sh
36 lines (26 loc) · 845 Bytes
/
coreutils.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
source ./0_append_distro_path.sh
untar_file coreutils-8.30.tar
patch -d /c/temp/gcc/coreutils-8.30 -p1 < coreutils.patch
cd /c/temp/gcc
mv coreutils-8.30 src
mkdir -p build dest/bin
# Missing <sys/wait.h>.
echo "/* ignore */" > src/lib/savewd.c
# Missing <pwd.h> and <grp.h>.
echo "/* ignore */" > src/lib/idcache.c
echo "/* ignore */" > src/lib/userspec.c
cd build
echo "ac_cv_header_pthread_h=no" > config.site
export CONFIG_SITE=/c/temp/gcc/build/config.site
../src/configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 \
--prefix=/c/temp/gcc/dest
touch src/make-prime-list
make $X_MAKE_JOBS -k "CFLAGS=-O3" "LDFLAGS=-s" || true
cd src
mv sort.exe uniq.exe wc.exe ../../dest/bin
cd /c/temp/gcc
rm -rf build src
mv dest coreutils-8.30
cd coreutils-8.30
7z -mx0 a ../coreutils-8.30.7z *