BSD 4_4 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Wed, 21 Jul 1993 14:38:13 +0000 (06:38 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Wed, 21 Jul 1993 14:38:13 +0000 (06:38 -0800)
Work on file usr/libexec/gcc2/specs
Work on file usr/bin/gcc2
Work on file usr/bin/cc
Work on file usr/libexec/gcc2/c++-2.3.3
Work on file usr/bin/gcc-2.3.3
Work on file usr/bin/gcc
Work on file usr/libexec/gcc2/g++-2.3.3
Work on file usr/bin/g++

Synthesized-from: CSRG/cd3/4.4

usr/bin/cc [new symlink]
usr/bin/g++ [new symlink]
usr/bin/gcc [new symlink]
usr/bin/gcc-2.3.3 [new symlink]
usr/bin/gcc2 [new symlink]
usr/libexec/gcc2/c++-2.3.3 [new file with mode: 0755]
usr/libexec/gcc2/g++-2.3.3 [new file with mode: 0755]
usr/libexec/gcc2/specs [new file with mode: 0644]

diff --git a/usr/bin/cc b/usr/bin/cc
new file mode 120000 (symlink)
index 0000000..17da6da
--- /dev/null
@@ -0,0 +1 @@
+/usr/libexec/gcc2/gcc-2.3.3
\ No newline at end of file
diff --git a/usr/bin/g++ b/usr/bin/g++
new file mode 120000 (symlink)
index 0000000..f39049e
--- /dev/null
@@ -0,0 +1 @@
+/usr/libexec/gcc2/g++-2.3.3
\ No newline at end of file
diff --git a/usr/bin/gcc b/usr/bin/gcc
new file mode 120000 (symlink)
index 0000000..17da6da
--- /dev/null
@@ -0,0 +1 @@
+/usr/libexec/gcc2/gcc-2.3.3
\ No newline at end of file
diff --git a/usr/bin/gcc-2.3.3 b/usr/bin/gcc-2.3.3
new file mode 120000 (symlink)
index 0000000..17da6da
--- /dev/null
@@ -0,0 +1 @@
+/usr/libexec/gcc2/gcc-2.3.3
\ No newline at end of file
diff --git a/usr/bin/gcc2 b/usr/bin/gcc2
new file mode 120000 (symlink)
index 0000000..17da6da
--- /dev/null
@@ -0,0 +1 @@
+/usr/libexec/gcc2/gcc-2.3.3
\ No newline at end of file
diff --git a/usr/libexec/gcc2/c++-2.3.3 b/usr/libexec/gcc2/c++-2.3.3
new file mode 100755 (executable)
index 0000000..9d65c38
--- /dev/null
@@ -0,0 +1,107 @@
+#!/bin/sh
+# Compile programs, treating .c files as C++.
+: || exec /bin/sh -f $0 $argv:q
+
+# The compiler name might be different when doing cross-compilation
+# (this should be configured)
+gcc_name=gcc
+speclang=-xnone
+
+# replace the command name by the name of the new command
+progname=`basename $0`
+case "$0" in
+  */*)
+    gcc=`echo $0 | sed -e "s;/[^/]*$;;"`/$gcc_name
+    ;;
+  *)
+    gcc=$gcc_name
+    ;;
+esac
+
+# $first is yes for first arg, no afterwards.
+first=yes
+# If next arg is the argument of an option, $quote is non-empty.
+# More precisely, it is the option that wants an argument.
+quote=
+# $library is made empty to disable use of libg++.
+library=-lg++
+numargs=$#
+
+# ash requires the newline before `do'.
+for arg
+do
+  if [ $first = yes ]
+  then
+    # Need some 1st arg to `set' which does not begin with `-'.
+    # We get rid of it after the loop ends.
+    set gcc
+    first=no
+  fi
+  # If you have to ask what this does, you should not edit this file. :-)
+  # The ``S'' at the start is so that echo -nostdinc does not eat the
+  # -nostdinc.
+  arg=`echo "S$arg" | sed "s/^S//; s/'/'\\\\\\\\''/g"`
+  if [ x$quote != x ]
+  then
+    quote=
+  else
+    quote=
+    case $arg in
+      -nostdlib)
+       # Inhibit linking with -lg++.
+       library=
+       ;;
+      -lm)
+       # Because libg++ uses things from the math library, make sure it
+       # always comes before the math library.
+       set "$@" $library
+       library=""
+       ;;
+      -[bBVDUoeTuIYmLiA] | -Tdata)
+       # these switches take following word as argument,
+       # so don't treat it as a file name.
+       quote=$arg
+       ;;
+      -[cSEM] | -MM)
+       # Don't specify libraries if we won't link,
+       # since that would cause a warning.
+       library=
+       ;;
+      -x*)
+       speclang=$arg
+       ;;
+      -v)
+       # catch `g++ -v'
+       if [ $numargs = 1 ] ; then library="" ; fi
+       ;;
+      -*)
+       # Pass other options through; they don't need -x and aren't inputs.
+       ;;
+      *)
+       # If file ends in .c or .i, put options around it.
+       # But not if a specified -x option is currently active.
+       case "$speclang $arg" in -xnone\ *.[ci])
+         set "$@" -xc++ "'$arg'" -xnone
+         continue
+       esac
+       ;;
+    esac
+  fi
+  set "$@" "'$arg'"
+done
+
+# Get rid of that initial 1st arg
+if [ $first = no ]; then
+  shift
+else
+  echo "$0: No input files specified."
+  exit 1
+fi
+
+if [ x$quote != x ]
+then
+  echo "$0: argument to \`$quote' missing"
+  exit 1
+fi
+
+eval $gcc "$@" $library
diff --git a/usr/libexec/gcc2/g++-2.3.3 b/usr/libexec/gcc2/g++-2.3.3
new file mode 100755 (executable)
index 0000000..9d65c38
--- /dev/null
@@ -0,0 +1,107 @@
+#!/bin/sh
+# Compile programs, treating .c files as C++.
+: || exec /bin/sh -f $0 $argv:q
+
+# The compiler name might be different when doing cross-compilation
+# (this should be configured)
+gcc_name=gcc
+speclang=-xnone
+
+# replace the command name by the name of the new command
+progname=`basename $0`
+case "$0" in
+  */*)
+    gcc=`echo $0 | sed -e "s;/[^/]*$;;"`/$gcc_name
+    ;;
+  *)
+    gcc=$gcc_name
+    ;;
+esac
+
+# $first is yes for first arg, no afterwards.
+first=yes
+# If next arg is the argument of an option, $quote is non-empty.
+# More precisely, it is the option that wants an argument.
+quote=
+# $library is made empty to disable use of libg++.
+library=-lg++
+numargs=$#
+
+# ash requires the newline before `do'.
+for arg
+do
+  if [ $first = yes ]
+  then
+    # Need some 1st arg to `set' which does not begin with `-'.
+    # We get rid of it after the loop ends.
+    set gcc
+    first=no
+  fi
+  # If you have to ask what this does, you should not edit this file. :-)
+  # The ``S'' at the start is so that echo -nostdinc does not eat the
+  # -nostdinc.
+  arg=`echo "S$arg" | sed "s/^S//; s/'/'\\\\\\\\''/g"`
+  if [ x$quote != x ]
+  then
+    quote=
+  else
+    quote=
+    case $arg in
+      -nostdlib)
+       # Inhibit linking with -lg++.
+       library=
+       ;;
+      -lm)
+       # Because libg++ uses things from the math library, make sure it
+       # always comes before the math library.
+       set "$@" $library
+       library=""
+       ;;
+      -[bBVDUoeTuIYmLiA] | -Tdata)
+       # these switches take following word as argument,
+       # so don't treat it as a file name.
+       quote=$arg
+       ;;
+      -[cSEM] | -MM)
+       # Don't specify libraries if we won't link,
+       # since that would cause a warning.
+       library=
+       ;;
+      -x*)
+       speclang=$arg
+       ;;
+      -v)
+       # catch `g++ -v'
+       if [ $numargs = 1 ] ; then library="" ; fi
+       ;;
+      -*)
+       # Pass other options through; they don't need -x and aren't inputs.
+       ;;
+      *)
+       # If file ends in .c or .i, put options around it.
+       # But not if a specified -x option is currently active.
+       case "$speclang $arg" in -xnone\ *.[ci])
+         set "$@" -xc++ "'$arg'" -xnone
+         continue
+       esac
+       ;;
+    esac
+  fi
+  set "$@" "'$arg'"
+done
+
+# Get rid of that initial 1st arg
+if [ $first = no ]; then
+  shift
+else
+  echo "$0: No input files specified."
+  exit 1
+fi
+
+if [ x$quote != x ]
+then
+  echo "$0: argument to \`$quote' missing"
+  exit 1
+fi
+
+eval $gcc "$@" $library
diff --git a/usr/libexec/gcc2/specs b/usr/libexec/gcc2/specs
new file mode 100644 (file)
index 0000000..4d13f1d
--- /dev/null
@@ -0,0 +1,39 @@
+*asm:
+
+
+*asm_final:
+
+
+*cpp:
+%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__}
+
+*cc1:
+
+
+*cc1plus:
+
+
+*endfile:
+
+
+*link:
+
+
+*lib:
+%{g:-lgnulib} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}
+
+*startfile:
+%{pg:gcrt0.o%s}%{!pg:%{p:gcrt0.o%s}%{!p:crt0.o%s}}
+
+*switches_need_spaces:
+
+
+*signed_char:
+%{funsigned-char:-D__CHAR_UNSIGNED__}
+
+*predefines:
+-Dmc68000 -Dmc68020 -Dhp300 -Dhp9000 -Dunix
+
+*cross_compile:
+0
+