summaryrefslogtreecommitdiff
path: root/gcc/config/sparc/sol2.h
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-01-13 07:56:48 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-01-13 07:56:48 +0000
commitd266b5b5c2e965a686ea98a28a889eca40cac70f (patch)
tree8c3552b7a70db71867f48669887226275d796bff /gcc/config/sparc/sol2.h
parent5e4e1583b912dbec04ec93784f8ece945d60e03d (diff)
downloadgcc-d266b5b5c2e965a686ea98a28a889eca40cac70f.tar.gz
(CPP_SPEC, LIB_SPEC, LINK_SPEC): Add -compat-bsd conditionals.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3218 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sparc/sol2.h')
-rw-r--r--gcc/config/sparc/sol2.h48
1 files changed, 32 insertions, 16 deletions
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index b2db0928c18..90abc4cf6f8 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -26,6 +26,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define CPP_PREDEFINES \
"-Dsun -Dsparc -Dunix -D__svr4__ -Asystem(unix) -Acpu(sparc) -Amachine(sparc)"
+#undef CPP_SPEC
+#define CPP_SPEC "\
+ %{compat-bsd:-iwithprefix ucbinclude -idirafter /usr/ucbinclude}\
+ %{msparclite:-D__sparclite__} %{mv8:-D__sparc_v8__}"
+
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
It's safe to pass -s always, even if -g is not used. */
#undef ASM_SPEC
@@ -158,7 +163,7 @@ do { \
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/opt/SUNWspro/SC2.0/"
-#undef STARTFILE_SPEC
+#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared: \
%{!symbolic: \
%{pg:crt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \
@@ -170,25 +175,36 @@ do { \
%{!traditional:/usr/ccs/lib/values-Xa.o%s}}}} \
crtbegin.o%s"
-#undef LIB_SPEC
+/* ??? Note: in order for -compat-bsd to work fully,
+ we must somehow arrange to fixincludes /usr/ucbinclude
+ and put the result in $(libsubdir)/ucbinclude. */
+
+#undef LIB_SPEC
#define LIB_SPEC \
- "%{!shared:%{!symbolic:-lc}} \
- crtend.o%s \
- %{!shared:%{!symbolic:%{pg:crtn.o%s}%{!pg:crtn.o%s}}}"
+ "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
+ %{!shared:%{!symbolic:-lc}} \
+ crtend.o%s \
+ %{!shared:%{!symbolic:%{pg:crtn.o%s}%{!pg:crtn.o%s}}}"
/* This should be the same as in svr4.h, except with -R added. */
#undef LINK_SPEC
-#define LINK_SPEC "%{h*} %{V} %{v:%{!V:-V}} \
- %{b} %{Wl,*:%*} \
- %{static:-dn -Bstatic} \
- %{shared:-G -dy} \
- %{symbolic:-Bsymbolic -G -dy} \
- %{G:-G} \
- %{YP,*} \
- %{R*} \
- %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
- %{!p:-Y P,/usr/ccs/lib:/usr/lib}} \
- %{Qy:} %{!Qn:-Qy}"
+#define LINK_SPEC \
+ "%{h*} %{V} %{v:%{!V:-V}} \
+ %{b} %{Wl,*:%*} \
+ %{static:-dn -Bstatic} \
+ %{shared:-G -dy} \
+ %{symbolic:-Bsymbolic -G -dy} \
+ %{G:-G} \
+ %{YP,*} \
+ %{R*} \
+ %{compat-bsd: \
+ %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
+ -R /usr/ucblib} \
+ %{!compat-bsd: \
+ %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \
+ %{Qy:} %{!Qn:-Qy}"
/* This defines which switch letters take arguments.
It is as in svr4.h but with -R added. */