shebs 02/08/21 11:08:01
Modified: . GNUmakefile build_gcc
gcc cppdefault.c gcc.c
Log:
More tweaks to make build_gcc work, plus removal of the 8-bit chars in build_gcc.
Revision Changes Path
1.31 +8 -0 gcc3/GNUmakefile
Index: GNUmakefile
===================================================================
RCS file: /cvs/Darwin/gcc3/GNUmakefile,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- GNUmakefile 2002/08/21 04:09:47 1.30
+++ GNUmakefile 2002/08/21 18:07:59 1.31
@@ -281,15 +281,23 @@
--symlinks=$(DO_SYMLINKS)
mkdir -p $(gcc_man1_dir)
install -c -m 444 man-pages/gcc3.1 $(gcc_man1_dir)/gcc3.1
+ rm -f $(gcc_man1_dir)/g++3.1
ln -s gcc3.1 $(gcc_man1_dir)/g++3.1
+ rm -f $(gcc_man1_dir)/c++3.1
ln -s gcc3.1 $(gcc_man1_dir)/c++3.1
+ rm -f $(gcc_man1_dir)/cc.1
ln -s gcc3.1 $(gcc_man1_dir)/cc.1
+ rm -f $(gcc_man1_dir)/c++.1
ln -s gcc3.1 $(gcc_man1_dir)/c++.1
+ rm -f $(gcc_man1_dir)/gcc.1
ln -s gcc3.1 $(gcc_man1_dir)/gcc.1
+ rm -f $(gcc_man1_dir)/g++.1
ln -s gcc3.1 $(gcc_man1_dir)/g++.1
install -c -m 444 man-pages/cpp3.1 $(gcc_man1_dir)/cpp3.1
+ rm -f $(gcc_man1_dir)/cpp.1
ln -s cpp3.1 $(gcc_man1_dir)/cpp.1
install -c -m 444 man-pages/gcov3.1 $(gcc_man1_dir)/gcov3.1
+ rm -f $(gcc_man1_dir)/gcov.1
ln -s gcov3.1 $(gcc_man1_dir)/gcov.1
installsrc: SRCROOT
1.61 +24 -42 gcc3/build_gcc
Index: build_gcc
===================================================================
RCS file: /cvs/Darwin/gcc3/build_gcc,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- build_gcc 2002/08/21 04:09:47 1.60
+++ build_gcc 2002/08/21 18:07:59 1.61
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
#!/bin/sh
# APPLE LOCAL file build machinery
-# Note, lines marked with ��� need to be revisited and/or reworked.
#############################################################################
#############################################################################
#
@@ -77,10 +76,10 @@
LIBSTDCPP_DYLIB=libstdc++.dylib # formerly
libstdc++.${APPLE_CC}.dylib
LIBSTDCPP_DYLIB_VERSION=A
LIBRARIES="libgcc.a libcc_kext.a libgcc_static.a libsupc++.a $LIBSTDCPP_DYLIB
libstdc++.a libcc_noc++.a"
- TOOLS="gcc3 g++3 c++3 c++filt3 gcov3 cpp3" # c++3 must be afer g++3 in the list
+ TOOLS="gcc3 g++3 c++3 c++filt3 gcov3 cpp3" # c++3 must be after g++3 in the list
CRTS="crtbegin.o"
- #��� just to speed up testing
+ # uncomment to speed up testing
#ENABLE_LANGUAGES="c++,c"
#COMPILERS="cpp cc1 cc1plus"
@@ -90,7 +89,7 @@
#
# CPP_INCLUDE_DIR is where we want to install the C++ headers...
#
- CPP_INCLUDE_DIR="$DSTROOT/$PREFIX/include/gcc/darwin/$gcc_version"
+ CPP_INCLUDE_DIR="$DSTROOT/$PREFIX/include/gcc/darwin/$gcc_version/c++"
# Paddy McHackery
#box_title "WARNING -- HACK ALERT! Build & Install libstdc++ stuff"
@@ -250,7 +249,7 @@
ENABLE_CHECKING= # enable/disable tree and rtl access checks
- CFLAGS="-g" # flags to use when compiling the compiler ���
+ CFLAGS="-g" # flags to use when compiling the compiler
(FIXME?)
OPT_OVERRIDE= # build compiler with this opt level
ENABLE_THREADS=--enable-threads=posix # enable multi-threads!
@@ -499,7 +498,7 @@
true;
else
box_title -? "Host type $host should also be a target"
- #missing_cross=yes ��� why commented out?
+ #missing_cross=yes FIXME why commented out?
fi
done
@@ -552,7 +551,7 @@
"ENABLE_CHECKING = ${ENABLE_CHECKING:---enable-checking}"
$n rm -f make.id
$n echo $SRCROOT/gcc:$arch > make.id
- $n rm -f rtl.o # ��� ?
+ $n rm -f rtl.o # FIXME what is this for?
#
# The configure for the compiler from build_gcc specifies
@@ -877,26 +876,17 @@
# The "-darwin" is required to get the OS-specific ctype.h/os_defines.h stuff,
# and of course, <cpu> is required ;-) .
# Omiting "-apple" shortens the path to these files in the installed image
- # (e.g., "/usr/include/gcc/darwin/VERSION/g++-v3/ppc-darwin/bits/...").
+ # (e.g., "/usr/include/gcc/darwin/VERSION/c++/ppc-darwin/...").
#
$SET -x
$n $SRCROOT/configure --srcdir=$SRCROOT/libstdc++-v3 \
--host="$host-darwin" \
--target="$target-darwin" \
+ --with-gxx-include-dir="$CPP_INCLUDE_DIR" \
$ENABLE_THREADS
$SET +x
CFLAGS="$ORIG_CFLAGS"
-
- #
- # ��� Why are we doing this???
- #
- # Note, all these target dependent versions of libiberty are only
- # present to satisfy library Makefile requirements. They are not
- # actually used. So we can point them to the one we build for the
- # compiler (done by build_compiler below).
- #
- #$n ln -s $OBJROOT/libiberty $OBJROOT/$target/libiberty
done
}
@@ -933,7 +923,7 @@
#
# If the list of hosts does not include the machine we're
# building on then run the following.
- # ��� This probably needs to be removed, at the very least changed.
+ # FIXME This probably needs to be removed, at the very least changed.
# Example build ONLY for i386 on my ppc machine.
#
if [ -d /lib/$target ]; then
@@ -974,7 +964,7 @@
"cwd = `pwd`" \
"$v"
- # ���
+ # FIXME?
# We may be able to use the fact that a bootstrap build creates
# a (dynamic) libgcc.a as part of the build. But for now we'll
# rebuild it.
@@ -1055,7 +1045,7 @@
#
# If the list of hosts does not include the machine we're
# building on then run the following.
- # ��� This probably needs to be removed, at the very least changed.
+ # FIXME This probably needs to be removed, at the very least changed.
# Example build ONLY for i386 on my ppc machine.
#
if [ -d /lib/$target ]; then
@@ -1096,7 +1086,7 @@
"cwd = `pwd`" \
"$v"
- # ���
+ # FIXME?
# We may be able to use the fact that a bootstrap build creates
# a (dynamic) libgcc.a as part of the build. But for now we'll
# rebuild it.
@@ -1250,7 +1240,7 @@
$n mv libgcc libgcc-$kind
$n rm -f stmp-dirs
- # ���
+ # FIXME
# Note, the kludge to build the kext version of libgcc ends up already
# putting its objects in a dir called libcc_kext/. For some reason
# there is an empty libgcc/ dir laying around after that. Screw it!
@@ -1316,7 +1306,6 @@
#
# Reminder for future reference: May need
...ppc/libstdc++-v3/libsupc++/libsupc++convenience.a
- # ���
#
for host in $HOSTS; do
sym=$SYMROOT/$host
@@ -1395,11 +1384,11 @@
## /stdint.h -----------> gcc/darwin/default/stdint.h
## /varargs.h -----------> gcc/darwin/default/varargs.h
## /machine/limits.h ----> ../gcc/darwin/default/machine/limits.h
-## /g++-v3/backward/*.h
-## /bits/*.h
-## /ext/*.h
-## /<arch>-darwin/bits/*.h
-## /*.h
+## /c++/backward/*.h
+## /bits/*.h
+## /ext/*.h
+## /<arch>-darwin/*.h
+## /*.h
##
## Not every sym link is done here. Some are done in the GNUmakefile.
#
@@ -1643,9 +1632,8 @@
## Note that we can install these headers any time but of course since we
## need the configured makefiles it must be done after libstdc++-v3 is
## configured. For that reason we cannot do it as part of the buildit
-## installhdrs phase. This may or may not be a problem with B&I. We
-## think nothing needs the C++ headers until at least after the compilers
-## are built.
+## installhdrs phase. This causes sequencing problems for B&I if the
+## headers change, and should be fixed someday.
#
install_cpp_headers()
{
@@ -1658,20 +1646,14 @@
"cwd = `pwd`"
$SET -x
- $n gnumake install prefix="$CPP_INCLUDE_DIR" \
- SUBDIRS="include libsupc++"
+ $n gnumake install prefix="$CPP_INCLUDE_DIR" SUBDIRS="include libsupc++"
status=$?
$SET +x
check_status $status "*** gnumake failed installing c++ headers ***"
done
-
- #
- # The install actually installs the g++-v3 directory in
- # $CPP_INCLUDE_DIR/include/g++v3. We want them "one up".
- #
- $n mv $CPP_INCLUDE_DIR/include/g++-v3 $CPP_INCLUDE_DIR
- $n rm -rf $CPP_INCLUDE_DIR/include
-
+
+ # FIXME A bizarre hack necessitated by the prefix setting above,
+ # which itself seems to be needed to prevent other failures...
#
# A byproduct of installing libsupc++ us that it creates a lib
# directory containing a libsupc++.la and libsupc++.a. I don't
1.7 +1 -1 gcc3/gcc/cppdefault.c
Index: cppdefault.c
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/cppdefault.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cppdefault.c 2002/02/23 00:29:16 1.6
+++ cppdefault.c 2002/08/21 18:08:00 1.7
@@ -29,7 +29,7 @@
/* APPLE LOCAL begin fat builds ilr */
#ifdef PHAT
#undef GPLUSPLUS_INCLUDE_DIR
-#define GPLUSPLUS_INCLUDE_DIR "/usr/include/gcc/darwin/" VERSION "/g++-v3"
+#define GPLUSPLUS_INCLUDE_DIR "/usr/include/gcc/darwin/" VERSION "/c++"
#undef GPLUSPLUS_TOOL_INCLUDE_DIR
#define GPLUSPLUS_TOOL_INCLUDE_DIR GPLUSPLUS_INCLUDE_DIR "/" DEFAULT_TARGET_ARCH
"-darwin"
1.137 +6 -6 gcc3/gcc/gcc.c
Index: gcc.c
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/gcc.c,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- gcc.c 2002/08/16 17:06:54 1.136
+++ gcc.c 2002/08/21 18:08:00 1.137
@@ -5327,24 +5327,24 @@
if (c1 == '1')
{
- /* Add -isystem ...include.../g++-v3 */
+ /* Add -isystem ...include.../c++ */
do_spec_1 ("-isystem", 1, NULL);
do_spec_1 (" ", 0, NULL);
- sprintf (tmpstr, "%s/g++-v3", header_path);
+ sprintf (tmpstr, "%s/c++", header_path);
do_spec_1 (tmpstr, 1, NULL);
do_spec_1 (" ", 0, NULL); /* fh */
- /* Add -isystem ...include.../g++-v3/backward */
+ /* Add -isystem ...include.../c++/backward */
do_spec_1 ("-isystem", 1, NULL);
do_spec_1 (" ", 0, NULL);
- sprintf (tmpstr, "%s/g++-v3/backward", header_path);
+ sprintf (tmpstr, "%s/c++/backward", header_path);
do_spec_1 (tmpstr, 1, NULL);
do_spec_1 (" ", 0, NULL); /* fh */
- /* Add -isystem ...include.../g++-v3/ppc-darwin */
+ /* Add -isystem ...include.../c++/ppc-darwin */
do_spec_1 ("-isystem", 1, NULL);
do_spec_1 (" ", 0, NULL);
- sprintf (tmpstr, "%s/g++-v3/%s-darwin",
header_path,arches[current_arch].name);
+ sprintf (tmpstr, "%s/c++/%s-darwin",
header_path,arches[current_arch].name);
do_spec_1 (tmpstr, 1, NULL);
do_spec_1 (" ", 0, NULL); /* fh */
}