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