5 # Make sure we're in our directory (i.e., where this shell script is)
9 # Default sed: whatever's in $PATH; set by the buildsystem to be the
10 # host-built sed tool we know supports the syntax we use
13 # Configure fetch method
14 URL
="http://www.minix3.org/pkgsrc/distfiles/minix/3.3.0/gcc-4.5.3.tar.bz2"
15 BACKUP_URL
="ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2"
17 if which curl
>/dev
/null
22 # Remove a few directories from the start, so we do not end up with a 165MB patch...
23 DELETEDIRS
="include/elf
24 libada libjava libffi libgfortran
26 gcc/ada gcc/fortran gcc/java
27 gcc/testsuite/ada gcc/testsuite/gnat gcc/testsuite/gnat.dg
28 gcc/testsuite/gfortran.dg gcc/testsuite/gfortran.fortran-torture
30 # Fetch sources if not available
33 if [ ! -f gcc-4.5
.3.
tar.bz2
];
41 tar -oxjf gcc-4.5
.3.
tar.bz2
45 for f
in gcc
/doc
/gccinstall.info gcc
/doc
/gccint.info
46 do # This is a hack to remove NUL characters in these .info
47 # files. They make some patch(1)es fail.
48 $SED 's/^..\[index..\]$/[index]/' <$f >k
&& mv k
$f
50 cat ..
/patches
/* |
patch -p1
51 cp ..
/files
/minix.h gcc
/config
/
52 cp ..
/files
/t-minix gcc
/config
/
53 cp ..
/files
/minix-spec.h gcc
/config
/
54 cp ..
/files
/arm-minix.h gcc
/config
/arm
/minix.h
55 cp ..
/files
/i386-minix.h gcc
/config
/i386
/minix.h
56 cp ..
/files
/gcov-minix-fs-wrapper.h gcc
/