/
gcc6809-4.6.1.recipe
93 lines (83 loc) · 2.48 KB
/
gcc6809-4.6.1.recipe
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
SUMMARY="GCC compiler for Motorola 6809"
DESCRIPTION="This is a version of the GCC compiler for the Motorla 6809. It \
uses the lwtools as a backend. Note that there is no C library provided."
HOMEPAGE="http://lwtools.projects.l-w.ca"
SOURCE_URI="ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-$portVersion/gcc-$portVersion.tar.bz2"
CHECKSUM_SHA256="8eebf51c908151d1f1a3756c8899c5e71572e8469a547ad72a1ef16a08a31b59"
REVISION="2"
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
LICENSE="
GNU GPL v2
GNU LGPL v2
"
PATCHES="gcc6809-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
gcc6809$secondaryArchSuffix = $portVersion compat >= 4
cmd:m6809_unknown_c++$secondaryArchSuffix
cmd:m6809_unknown_cpp$secondaryArchSuffix
cmd:m6809_unknown_g++$secondaryArchSuffix
cmd:m6809_unknown_gcc_$portVersion$secondaryArchSuffix
cmd:m6809_unknown_gcc$secondaryArchSuffix
cmd:m6809_unknown_gcov$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libmpc$secondaryArchSuffix
lib:libmpfr$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
cmd:m6809_unknown_ld
cmd:lwasm
"
BUILD_REQUIRES="
devel:libgmp$secondaryArchSuffix
devel:libmpfr$secondaryArchSuffix
devel:libmpc$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:autoconf
cmd:awk
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:gperf
cmd:ld$secondaryArchSuffix
cmd:make
cmd:makeinfo
cmd:sed
cmd:strip
cmd:tar
cmd:which
cmd:xargs
cmd:m6809_unknown_ld
"
SOURCE_DIR="gcc-$portVersion"
sourceDir=$(pwd)
objectsDir=$(pwd)/../${portVersionedName}-obj
BUILD()
{
rm -rf $objectsDir
mkdir -p $objectsDir
cd $objectsDir
# Setting a quoted string in an environment variable is ugly (the quotes
# are removed at various stages and need an absurd amount of escaping), so
# let's use a file and --include instead.
echo '#define LIBRARY_PATH_ENV "M6809_LIBRARY_PATH"' > haiku_host.h
CXXFLAGS="-O2 -include $objectsDir/haiku_host.h" \
CFLAGS="-O2 -include $objectsDir/haiku_host.h" \
runConfigure $sourceDir/configure --enable-languages=c,c++ \
--target=m6809-unknown --program-prefix=m6809-unknown- \
--enable-obsolete --srcdir=$sourceDir --disable-threads --disable-nls \
--disable-libssp --with-as=$(which m6809-unknown-as) \
--with-ar=$(which m6809-unknown-ar) --with-ld=$(which m6809-unknown-ld)
make $jobArgs all-gcc
}
INSTALL()
{
cd $objectsDir
make install-gcc
# Remove buggy (empty) dir left over by install
rm -r $prefix/m6809-unknown
}