summaryrefslogtreecommitdiff
path: root/m68k-unknown-amigaos/recipes/files/gcc/gcc/config/m68k/x-amigaos
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-12-24 12:43:10 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-12-24 12:43:10 +0000
commitd4570b422e46cc8efbf9c51d112b9afb69b993df (patch)
tree64bec97fa29cb062a18ac94c5eac3581339d9bfd /m68k-unknown-amigaos/recipes/files/gcc/gcc/config/m68k/x-amigaos
parentdd3d652af7ca6ff66409e9c2510fbe6810d42c13 (diff)
downloadtoolchains-d4570b422e46cc8efbf9c51d112b9afb69b993df.tar.gz
toolchains-d4570b422e46cc8efbf9c51d112b9afb69b993df.tar.bz2
A motley selection of changes, which ultimately result in a toolchain that produces binaries:
* Makefile: Change to a two-stage build and build+install clib2 between stages Other, associated changes to reflect additional patches etc * recipes/files/gcc: Contents moved to recipes/files/gcc/gcc Various changes to the target configuration to reflect use of clib2 * recipes/files/ndk: Additional header files for the NDK to permit clib2 to build * recipes/files/clib2: Add sys/wait.h to clib2, and stub out wait(), vfork(), and pipe() for the benefit of libiberty * recipes/patches/gcc/(config.host.p,config.gcc.p): Renamed to gcc.\1 * recipes/patches/gcc/libgcc.config.host.p: Make libgcc aware of our target triple * recipes/patches/binutils/gas.app.c.p: Backport a 5-year old fix that prevents the GAS lexer dropping input on the floor * recipes/patches/ndk/ndk.inline.intuition.h.p: Hack around inline function needing access to a variable from the place it was inlined * recipes/patches/clib2/clib2.modern_gcc.p: Fix up clib2 to compile with modern GCC * recipes/patches/clib2/clib2.include.unistd.h.p: Export definitions of vfork() and pipe() * recipes/patches/clib2/clib2.include.fcntl.h.p: Define FD_CLOEXEC -- the clib2 fcntl() implementation will ignore F_GETFD/F_SETFD anyway * recipes/patches/clib2/clib2.GNUmakefile.68k.p: Reflect our use of a full target triple in the toolchain settings Add stubs.c to build Do not attempt to build resident/resident32 library variants svn path=/toolchains/; revision=11120
Diffstat (limited to 'm68k-unknown-amigaos/recipes/files/gcc/gcc/config/m68k/x-amigaos')
-rw-r--r--m68k-unknown-amigaos/recipes/files/gcc/gcc/config/m68k/x-amigaos104
1 files changed, 104 insertions, 0 deletions
diff --git a/m68k-unknown-amigaos/recipes/files/gcc/gcc/config/m68k/x-amigaos b/m68k-unknown-amigaos/recipes/files/gcc/gcc/config/m68k/x-amigaos
new file mode 100644
index 0000000..a8f60b8
--- /dev/null
+++ b/m68k-unknown-amigaos/recipes/files/gcc/gcc/config/m68k/x-amigaos
@@ -0,0 +1,104 @@
+# Makefile fragment for AmigaOS host
+
+# Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its
+# own equivalent of the UNIX /usr/include tree. For gcc, the standard headers
+# are in /gg/include and system specific headers are in /gg/os-include.
+# Use these paths for fixincludes.
+
+SYSTEM_HEADER_DIR = $(prefix)/include
+
+# Uncomment the following macro to get a resident GCC. We don't do it
+# by default, since we want to support users with mc68000.
+# WARNING! If you uncomment this, you MUST add the same flags to the
+# libiberty's Makefile (libiberty is now linked into GCC executables).
+
+#RESIDENT = -m68020 -resident32
+
+# Additional host flags that are not used when compiling with GCC_FOR_TARGET,
+# such as when compiling the libgcc* runtime archives. GCC uses stack
+# a lot, and since AmigaOS provides processes with a small, fixed size
+# stack, we have to generate code that will extend it whenever necessary.
+
+XCFLAGS = -mstackextend $(RESIDENT)
+
+# AmigaOS supports "AmigaGuide(R)" hypertext files. For GCC, these are
+# build with a custom "makeinfo".
+
+# Arrange for guides to be build with GCC, in the build directory.
+
+### begin-GG-local: gcc-amigaos
+#EXTRA_DOC_TARGETS = guide gcc-amigaos-doc
+### end-GG-local
+
+# Actually build guides
+
+guide:: doc/cpp.guide doc/gcc.guide doc/gccint.guide \
+ doc/gccinstall.guide doc/cppinternals.guide
+
+doc/cpp.guide: $(TEXI_CPP_FILES)
+doc/gcc.guide: $(TEXI_GCC_FILES)
+doc/gccint.guide: $(TEXI_GCCINT_FILES)
+doc/cppinternals.guide: $(TEXI_CPPINT_FILES)
+
+doc/%.guide: %.texi
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) --amiga $(MAKEINFOFLAGS) -I $(docdir) \
+ -I $(docdir)/include -o $@ $<; \
+ fi
+
+# Duplicate entry to handle renaming of gccinstall.guide
+doc/gccinstall.guide: $(TEXI_GCCINSTALL_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) --amiga $(MAKEINFOFLAGS) -I $(docdir) \
+ -I $(docdir)/include -o $@ install.texi; \
+ fi
+
+# Arrange for guides to be installed with GCC.
+
+### begin-GG-local: gcc-amigaos
+#EXTRA_INSTALL_TARGETS = install-guide install-gcc-amigaos-doc
+### end-GG-local
+
+# Where the guide files go
+
+guidedir = $(prefix)/guide
+
+# Actually install guides.
+
+installdirs-guide:
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(guidedir)
+
+install-guide: doc installdirs-guide \
+ $(DESTDIR)$(guidedir)/cpp.guide \
+ $(DESTDIR)$(guidedir)/gcc.guide \
+ $(DESTDIR)$(guidedir)/cppinternals.guide \
+ $(DESTDIR)$(guidedir)/gccinstall.guide \
+ $(DESTDIR)$(guidedir)/gccint.guide
+
+$(DESTDIR)$(guidedir)/%.guide: doc/%.guide installdirs-guide
+ rm -f $@
+ if [ -f $< ]; then \
+ for f in $(<)*; do \
+ realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
+ $(INSTALL_DATA) $$f $(DESTDIR)$(guidedir)/$$realfile; \
+ chmod a-x $(DESTDIR)$(guidedir)/$$realfile; \
+ done; \
+ else true; fi
+
+### begin-GG-local: gcc-amigaos
+# Build and install gcc-amigaos.guide - documentation specific to the
+# AmigaOS port of GCC.
+
+gcc-amigaos-doc:: doc/gcc-amigaos.info doc/gcc-amigaos.guide
+
+doc/gcc-amigaos.info doc/gcc-amigaos.guide: gcc-amigaos.texi
+
+install-gcc-amigaos-doc: doc installdirs installdirs-guide \
+ $(DESTDIR)$(infodir)/gcc-amigaos.info \
+ $(DESTDIR)$(guidedir)/gcc-amigaos.guide
+### end-GG-local
+
+host-amigaos.o : $(srcdir)/config/m68k/host-amigaos.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h hosthooks.h hosthooks-def.h toplev.h diagnostic.h
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ $(srcdir)/config/m68k/host-amigaos.c