summaryrefslogtreecommitdiffstats
path: root/rules/xchain-gccstage1.make
diff options
context:
space:
mode:
Diffstat (limited to 'rules/xchain-gccstage1.make')
-rw-r--r--rules/xchain-gccstage1.make270
1 files changed, 0 insertions, 270 deletions
diff --git a/rules/xchain-gccstage1.make b/rules/xchain-gccstage1.make
deleted file mode 100644
index 3cca156f2..000000000
--- a/rules/xchain-gccstage1.make
+++ /dev/null
@@ -1,270 +0,0 @@
-# -*-makefile-*-
-# $Id: xchain-gccstage1.make,v 1.18 2004/07/08 16:48:17 bsp Exp $
-#
-# Copyright (C) 2002, 2003 by Pengutronix e.K., Hildesheim, Germany
-#
-# See CREDITS for details about who has contributed to this project.
-#
-# For further information about the PTXdist project and license conditions
-# see the README file.
-#
-
-ifdef PTXCONF_BUILD_CROSSCHAIN
-XCHAIN += xchain-gccstage1
-endif
-
-#
-# Paths and names
-#
-# version stuff in now in rules/Version.make
-# NB: make s*cks
-#
-GCC = gcc-$(GCC_VERSION)
-GCC_URL = ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$(GCC_VERSION)/$(GCC).tar.gz
-GCC_SOURCE = $(SRCDIR)/$(GCC).tar.gz
-GCC_DIR = $(BUILDDIR)/$(GCC)
-GCC_STAGE1_DIR = $(BUILDDIR)/$(GCC)-$(PTXCONF_GNU_TARGET)-stage1
-
-# ----------------------------------------------------------------------------
-# Get
-# ----------------------------------------------------------------------------
-
-xchain-gccstage1_get: $(STATEDIR)/xchain-gccstage1.get
-
-xchain-gccstage1_get_deps = \
- $(GCC_SOURCE) \
- $(STATEDIR)/xchain-gccstage1-patches.get
-
-$(STATEDIR)/xchain-gccstage1.get: $(xchain-gccstage1_get_deps)
- @$(call targetinfo, $@)
- touch $@
-
-$(STATEDIR)/xchain-gccstage1-patches.get:
- @$(call targetinfo, $@)
- @$(call get_patches, $(GCC))
- touch $@
-
-$(GCC_SOURCE):
- @$(call targetinfo, $@)
- @$(call get, $(GCC_URL))
-
-# ----------------------------------------------------------------------------
-# Extract
-# ----------------------------------------------------------------------------
-
-xchain-gccstage1_extract: $(STATEDIR)/xchain-gccstage1.extract
-
-xchain-gccstage1_extract_deps = $(STATEDIR)/xchain-gccstage1.get
-
-$(STATEDIR)/xchain-gccstage1.extract: $(xchain-gccstage1_extract_deps)
- @$(call targetinfo, $@)
- @$(call clean, $(GCC_DIR))
- @$(call extract, $(GCC_SOURCE))
- @$(call patchin, $(GCC))
-
-#
-# sto^H^H^Hinspired by Erik Andersen's buildroot
-#
-
-#
-# Hack things to use the correct shared lib loader
-#
- cd $(GCC_DIR) && \
- export LIST=`grep -lr -- "-dynamic-linker.*\.so[\.0-9]*" *` && \
- if [ -n "$$LIST" ] ; then \
- perl -i -p -e "s,-dynamic-linker.*\.so[\.0-9]*},-dynamic-linker $(DYNAMIC_LINKER)},;" $$LIST; \
- fi;
-
-ifdef PTXCONF_UCLIBC
-ifdef PTXCONF_GCC_2
-#
-# Use atexit() directly, rather than cxa_atexit
-#
- perl -i -p -e "s,int flag_use_cxa_atexit = 1;,int flag_use_cxa_atexit = 0;,g;"\
- $(GCC_DIR)/gcc/cp/decl2.c;
-#
-# We do not wish to build the libstdc++ library provided with gcc,
-# since it doesn't seem to work at all with uClibc plus gcc 2.95...
-#
- mv $(GCC_DIR)/libstdc++ $(GCC_DIR)/libstdc++.orig
- mv $(GCC_DIR)/libio $(GCC_DIR)/libio.orig
-endif # PTXCONFIG_GCC_2
-endif # PTXCON_UCLIBC
- touch $@
-
-# ----------------------------------------------------------------------------
-# Prepare
-# ----------------------------------------------------------------------------
-
-xchain-gccstage1_prepare: $(STATEDIR)/xchain-gccstage1.prepare
-
-xchain-gccstage1_prepare_deps = \
- $(STATEDIR)/xchain-binutils.install \
- $(STATEDIR)/xchain-gccstage1.extract
-
-#
-# Dan Kegel says:
-#
-# Only need to install bootstrap glibc headers for gcc-3.0 and above?
-# Or maybe just gcc-3.3 and above? This will change for gcc-3.5, I
-# think (I hope). See also http://gcc.gnu.org/PR8180, which complains
-# about the need for this step. Don't install them if they're already
-# there (it's really slow)
-#
-# Comments:
-# gcc-3.2.3 for PPC needs some headers (or a patch that disables the
-# #include of the headers)
-#
-# you will get an error like this:
-#
-# /home/frogger/projects/ptxdist/ptxdist-ppc/build/gcc-3.2.3-powerpc-405-linux-gnu-stage1/gcc/xgcc
-# [...]
-# /home/frogger/projects/ptxdist/ptxdist-ppc/build/gcc-3.2.3/gcc/libgcc2.c
-# -o libgcc/./_muldi3.o
-#
-# In file included from tconfig.h:21, from
-# /home/frogger/projects/ptxdist/ptxdist-ppc/build/gcc-3.2.3/gcc/libgcc2.c:36:
-# /home/frogger/projects/ptxdist/ptxdist-ppc/build/gcc-3.2.3/gcc/config/rs6000/linux.h:82:20:
-# signal.h: No such file or directory
-# /home/frogger/projects/ptxdist/ptxdist-ppc/build/gcc-3.2.3/gcc/config/rs6000/linux.h:83:26:
-# sys/ucontext.h: No such file or directory
-# make[3]: *** [libgcc/./_muldi3.o] Error 1
-# [MKL]
-#
-
-#
-# the header thing is even more complicated:
-#
-# - we've learned so far that gcc > 3 need the libc headers
-# - uClibc installs the kernel headers,
-# so we don't need to do that here again
-# - so we need to install the kernel headers if gcc < 3 or
-# we are building a glibc based toolchain
-# [MKL]
-#
-ifeq (3,$(GCC_VERSION_MAJOR))
-ifdef PTXCONF_GLIBC
-xchain-gccstage1_prepare_deps += \
- $(STATEDIR)/xchain-glibc.install \
- $(STATEDIR)/xchain-kernel.install
-endif
-ifdef PTXCONF_UCLIBC
-xchain-gccstage1_prepare_deps += $(STATEDIR)/xchain-uclibc.install
-endif
-else
-xchain-gccstage1_prepare_deps += $(STATEDIR)/xchain-kernel.install
-endif
-
-GCC_STAGE1_PATH = PATH=$(CROSS_PATH)
-GCC_STAGE1_ENV = $(HOSTCC_ENV)
-
-GCC_STAGE1_AUTOCONF = \
- --target=$(PTXCONF_GNU_TARGET) \
- --host=$(GNU_HOST) \
- --build=$(GNU_HOST) \
- --prefix=$(PTXCONF_PREFIX) \
- --with-local-prefix=$(CROSS_LIB_DIR) \
- $(GCC_EXTRA_CONFIG) \
- --disable-nls \
- --disable-threads \
- --disable-shared \
- --disable-multilib \
- --enable-languages=c \
- --enable-symvers=gnu \
- --enable-target-optspace \
- --enable-version-specific-runtime-libs \
- --with-newlib \
- --without-headers \
- --with-gnu-ld
-
-# RSC: Where does --with-newlib come from ???
-
-ifdef PTXCONF_GLIBC
-GCC_STAGE1_AUTOCONF += --enable-__cxa_atexit
-endif
-
-ifdef PTXCONF_UCLIBC
-GCC_STAGE1_AUTOCONF += --disable-__cxa_atexit
-endif
-
-ifdef PTXCONF_SOFTFLOAT
-GCC_STAGE1_AUTOCONF += --enable-softfloat
-else
-GCC_STAGE1_AUTOCONF += --disable-softfloat
-endif
-
-#
-# FIXME: "configure: line 193: cd: no: No such file or directory"
-#
-# cd /home/frogger/ptxdist/ptxdist-i386/build/gcc-3.2.3-"i386-linux"-stage1 && \
-# PATH="/home/frogger/ptxdist/xchain/i386"/bin:$PATH CC=gcc \
-#
-# /home/frogger/ptxdist/ptxdist-i386/build/gcc-3.2.3/configure
-# --target="i386-linux" --host=powerpc-host-linux-gnu
-# --build=powerpc-host-linux-gnu
-# --prefix="/home/frogger/ptxdist/xchain/i386"
-# --with-local-prefix="/home/frogger/ptxdist/xchain/i386"/"i386-linux"
-# --disable-nls --disable-multilib --disable-threads --disable-shared
-# --enable-languages=c --enable-symvers=gnu --enable-target-optspace
-# --enable-version-specific-runtime-libs --with-newlib
-# --without-headers --with-gnu-ld --enable-__cxa_atexit Copying no to
-# /home/frogger/ptxdist/xchain/i386/i386-linux/sys-include
-# /home/frogger/ptxdist/ptxdist-i386/build/gcc-3.2.3/configure: line
-# 193: cd: no: No such file or directory
-#
-$(STATEDIR)/xchain-gccstage1.prepare: $(xchain-gccstage1_prepare_deps)
- @$(call targetinfo, $@)
- @$(call clean, $(GCC_STAGE1_DIR))
-
- mkdir -p $(GCC_STAGE1_DIR)
- cd $(GCC_STAGE1_DIR) && \
- $(GCC_STAGE1_PATH) $(GCC_STAGE1_ENV) \
- $(GCC_DIR)/configure $(GCC_STAGE1_AUTOCONF)
- touch $@
-
-# ----------------------------------------------------------------------------
-# Compile
-# ----------------------------------------------------------------------------
-
-xchain-gccstage1_compile: $(STATEDIR)/xchain-gccstage1.compile
-
-$(STATEDIR)/xchain-gccstage1.compile: $(STATEDIR)/xchain-gccstage1.prepare
- @$(call targetinfo, $@)
- cd $(GCC_STAGE1_DIR) && \
- $(GCC_STAGE1_PATH) \
- make all-gcc
- touch $@
-
-# ----------------------------------------------------------------------------
-# Install
-# ----------------------------------------------------------------------------
-
-xchain-gccstage1_install: $(STATEDIR)/xchain-gccstage1.install
-
-$(STATEDIR)/xchain-gccstage1.install: $(STATEDIR)/xchain-gccstage1.compile
- @$(call targetinfo, $@)
- cd $(GCC_STAGE1_DIR) && \
- $(GCC_STAGE1_PATH) $(GCC_STAGE1_ENV) \
- make install
- touch $@
-
-# ----------------------------------------------------------------------------
-# Target-Install
-# ----------------------------------------------------------------------------
-
-xchain-gccstage1_targetinstall: $(STATEDIR)/xchain-gccstage1.targetinstall
-
-$(STATEDIR)/xchain-gccstage1.targetinstall:
- @$(call targetinfo, $@)
- touch $@
-
-# ----------------------------------------------------------------------------
-# Clean
-# ----------------------------------------------------------------------------
-
-xchain-gccstage1_clean:
- rm -fr $(GCC_STAGE1_DIR)
- rm -fr $(STATEDIR)/xchain-gccstage1.*
- rm -fr $(GCC_DIR)
-
-# vim: syntax=make