gcc6809-4.6.4.recipe revision 309ccdde
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"
6#CHECKSUM_SHA256="e8f5853d4eec2f5ebaf8a72ae4d53c436aacf98153b2499f8635b48c4718a093"
7REVISION="1"
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:ld$secondaryArchSuffix
48	cmd:make
49	cmd:makeinfo
50	cmd:sed
51	cmd:strip
52	cmd:tar
53	cmd:which
54	cmd:xargs
55	cmd:m6809_unknown_ld
56	"
57
58SOURCE_DIR="gcc-$portVersion"
59
60sourceDir=$(pwd)
61objectsDir=$(pwd)/../${portVersionedName}-obj
62
63BUILD()
64{
65	rm -rf $objectsDir
66
67	mkdir -p $objectsDir
68	cd $objectsDir
69
70	# Setting a quoted string in an environment variable is ugly (the quotes
71	# are removed at various stages and need an absurd amount of escaping), so
72	# let's use a file and --include instead.
73	echo '#define LIBRARY_PATH_ENV "M6809_LIBRARY_PATH"' > haiku_host.h
74
75	CXXFLAGS="-O2 -include $objectsDir/haiku_host.h" \
76	CFLAGS="-O2 -include $objectsDir/haiku_host.h" \
77	runConfigure $sourceDir/configure --enable-languages=c,c++ \
78		--target=m6809-unknown --program-prefix=m6809-unknown- \
79		--enable-obsolete --srcdir=$sourceDir --disable-threads --disable-nls \
80		--disable-libssp --disable-multilib --with-as=$(which m6809-unknown-as) \
81		--with-ar=$(which m6809-unknown-ar) --with-ld=$(which m6809-unknown-ld) \
82		MAKEINFO=missing
83
84	make $jobArgs all-gcc all-target-libgcc
85}
86
87INSTALL()
88{
89	cd $objectsDir
90	make install-gcc install-target-libgcc
91	# Remove buggy (empty) dir left over by install
92	rm -r $prefix/m6809-unknown
93}
94