AR = ar
AR_FLAGS = rc
CC = cc
+$(start-sanitize-chill)
CFLAGS = -g
+CHILLFLAGS = $(CFLAGS)
+CHILL_LIB = -lchill
+$(end-sanitize-chill)
CXX = gcc
CXXFLAGS = -g -O
-GCC_FOR_TARGET = ./gcc -B./
RANLIB = ranlib
NM = nm
CC_FOR_TARGET = ` \
if [ -f $${rootme}/gcc/Makefile ] ; then \
- echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
+ echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(CC); \
fi; \
fi`
+GCC_FOR_TARGET = ` \
+ if [ -f $${rootme}/gcc/Makefile ] ; then \
+ echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
+ else \
+ if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ echo $(CC); \
+ else \
+ t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+ fi; \
+ fi`
+
+$(start-sanitize-chill)
+CHILL_FOR_TARGET = ` \
+ if [ -f $${rootme}/gcc/Makefile ] ; then \
+ echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
+ else \
+ if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ echo $(CC); \
+ else \
+ t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+ fi; \
+ fi`
+$(end-sanitize-chill)
+
CXX_FOR_TARGET = ` \
if [ -f $${rootme}/gcc/Makefile ] ; then \
- echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
+ echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(CXX); \
"CC=$(CC)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS=$(CFLAGS)" \
+$(start-sanitize-chill)\
+ "CHILLFLAGS=$(CHILLFLAGS)" \
+ "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
+ "CHILL_LIB=$(CHILL_LIB)" \
+$(end-sanitize-chill)\
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)"
+# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
+# unfortunately needs the native compiler and the target ar and
+# ranlib. Keep these in alphabetical order, please.
+GCC_FLAGS_TO_PASS = \
+ "AR=$(AR_FOR_TARGET)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
+ "AS=$(AS)" \
+ "BISON=$(BISON)" \
+ "CXX=$(CXX)" \
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "CC=$(CC)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LEX=$(LEX)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "NM=$(NM)" \
+ "RANLIB=$(RANLIB_FOR_TARGET)" \
+ "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
+ "XTRAFLAGS=$(XTRAFLAGS)" \
+ "exec_prefix=$(exec_prefix)" \
+ "prefix=$(prefix)" \
+ "tooldir=$(tooldir)"
+
# The first rule in the file had better be this one. Don't put any above it.
all: $(ALL)
install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
install-textutils install-time install-wdiff
+#
+# Install the gcc headers files, but not the fixed include files,
+# which we are not allowed to distribute. This rule is very dependent
+# on the workings of the gcc Makefile.in.
+#
gcc-no-fixedincludes:
- @if [ -f ./gcc/Makefile ] ; then \
- rootme=`pwd` ; export rootme ; \
- (cd ./gcc; \
- $(MAKE) $(FLAGS_TO_PASS) install install-man \
- "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
- else \
- true ; \
- fi
+ @if [ -f ./gcc/Makefile ]; then \
+ rm -rf gcc/tmp-include; \
+ mv gcc/include gcc/tmp-include 2>/dev/null; \
+ mkdir gcc/include; \
+ touch gcc/stmp-fixincludes; \
+ rm -f gcc/stmp-headers; \
+ rootme=`pwd`; export rootme; \
+ srcroot=`cd $(srcdir); pwd` ; export srcroot; \
+ (cd ./gcc; \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+ rm -rf gcc/include; \
+ mv gcc/tmp-include gcc/include 2>/dev/null; \
+ else true; fi
install.cross: install-dirs install-libiberty install-mmalloc \
install-binutils install-opcodes install-byacc install-flex \
all-gcc: all-libiberty all-byacc all-binutils
@if [ -f ./gcc/Makefile ] ; then \
rootme=`pwd` ; export rootme ; \
+ srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
(cd ./gcc; \
- $(MAKE) $(FLAGS_TO_PASS) all) ; \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
else \
true ; \
fi
install-gcc: force
@if [ -f ./gcc/Makefile ] ; then \
rootme=`pwd` ; export rootme ; \
+ srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
(cd ./gcc; \
- $(MAKE) $(FLAGS_TO_PASS) install) ; \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \
else \
true ; \
fi
else exit 1 ; fi \
;; \
$(end-sanitize-chill) \
+ gcc) \
+ if (rootme=`pwd` ; export rootme ; \
+ srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
+ cd ./$$i ; \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) $(DO)) ; then true ; \
+ else exit 1 ; fi \
+ ;; \
*) \
if (rootme=`pwd` ; export rootme ; \
cd ./$$i ; \
#
# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
-DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
- config.sub config configure.man configure.texi move-if-change \
+DEVO_SUPPORT= README Makefile.in configure configure.in \
+ config.guess config.sub config etc move-if-change \
COPYING.LIB
GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
-GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
+GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
setup-dirs: force
./configure sun4