summaryrefslogtreecommitdiff
path: root/libstdc++
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-16 02:59:31 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-16 02:59:31 +0000
commit76d1a13e7ee66d890030b027166dabead1a97860 (patch)
treeed17b01726b42e304b108b63265d95a47f788b45 /libstdc++
parent85096a02fc3d3232a81db27ba96948da13caef15 (diff)
downloadgcc-76d1a13e7ee66d890030b027166dabead1a97860.tar.gz
* Makefile.in: Change "pic" to depend on $(PICFLAG), not
on $(enable_shared). * aix.ml: Build AIX-style shared library. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33921 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++')
-rw-r--r--libstdc++/ChangeLog6
-rw-r--r--libstdc++/Makefile.in26
-rw-r--r--libstdc++/config/aix.ml35
3 files changed, 47 insertions, 20 deletions
diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog
index 903790672e6..fa59afe35a2 100644
--- a/libstdc++/ChangeLog
+++ b/libstdc++/ChangeLog
@@ -1,3 +1,9 @@
+2000-05-15 David Edelsohn <edelsohn@gnu.org>
+
+ * Makefile.in: Change "pic" to depend on $(PICFLAG), not
+ on $(enable_shared).
+ * aix.ml: Build AIX-style shared library.
+
2000-05-10 Jakub Jelinek <jakub@redhat.com>
* configure.in: Use mh-sparcpic for sparc*-*-*.
diff --git a/libstdc++/Makefile.in b/libstdc++/Makefile.in
index 28222cd7a4b..f2e1a8c58c2 100644
--- a/libstdc++/Makefile.in
+++ b/libstdc++/Makefile.in
@@ -84,7 +84,7 @@ stdlist: $(IO_DIR)/iostream.list $(OBJS) $(SUBLIBS) $(LIBIBERTY_DIR)/libiberty.a
piclist: stdlist
-rm -f tlist
cp stdlist tlist
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
sed 's,\([A-Za-z_]*\.o\),pic/\1,g' tlist > tlist2 ; \
mv tlist2 tlist ; \
else true ; fi
@@ -143,7 +143,7 @@ stmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
for name in $(STRFUNCS) $(STRIO); do \
echo c$${name}; \
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DC -D$${name} ${srcdir}/sinst.cc \
-o pic/c$${name}.o; \
else true ; fi; \
@@ -156,7 +156,7 @@ stmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
bigstmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
echo cstring
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DC \
`for N in $(STRFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/sinst.cc -o pic/cstrmain.o; \
@@ -164,7 +164,7 @@ bigstmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
$(COMPILE.cc) -DC `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/sinst.cc -o cstrmain.o
echo cstrio
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DC \
`for N in $(STRIO); do echo " -D$${N}"; done` \
$(srcdir)/sinst.cc -o pic/cstrio.o; \
@@ -183,7 +183,7 @@ stmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
${srcdir}/std/ldcomplex.h
for N in $(COMFUNCS) $(COMIO); do \
echo f$${N}; \
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DF -D$${N} $(srcdir)/cinst.cc \
-o pic/f$${N}.o; \
else true ; fi; \
@@ -191,7 +191,7 @@ stmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
$(COMPILE.cc) -DF -D$${N} ${srcdir}/cinst.cc -o f$${N}.o; \
if [ $$? -eq 0 ]; then true; else exit 1; fi; \
echo d$${N}; \
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DD -D$${N} $(srcdir)/cinst.cc \
-o pic/d$${N}.o; \
else true ; fi; \
@@ -199,7 +199,7 @@ stmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
$(COMPILE.cc) -DD -D$${N} ${srcdir}/cinst.cc -o d$${N}.o; \
if [ $$? -eq 0 ]; then true; else exit 1; fi; \
echo ld$${N}; \
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DLD -D$${N} $(srcdir)/cinst.cc \
-o pic/ld$${N}.o; \
else true ; fi; \
@@ -213,7 +213,7 @@ bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
${srcdir}/std/complext.cc ${srcdir}/std/dcomplex.h \
${srcdir}/std/ldcomplex.h
echo fcomplex
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DF \
`for N in $(COMFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o pic/fcomplex.o; \
@@ -221,7 +221,7 @@ bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
$(COMPILE.cc) -DF `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o fcomplex.o
echo fcomio
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DF \
`for N in $(COMIO); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o pic/fcomio.o; \
@@ -229,7 +229,7 @@ bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
$(COMPILE.cc) -DF `for N in $(COMIO); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o fcomio.o
echo dcomplex
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DD \
`for N in $(COMFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o pic/dcomplex.o; \
@@ -237,7 +237,7 @@ bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
$(COMPILE.cc) -DD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o dcomplex.o
echo dcomio
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DD \
`for N in $(COMIO); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o pic/dcomio.o; \
@@ -245,7 +245,7 @@ bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
$(COMPILE.cc) -DD `for N in $(COMIO); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o dcomio.o
echo ldcomplex
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DLD \
`for N in $(COMFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o pic/ldcomplex.o; \
@@ -253,7 +253,7 @@ bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
$(COMPILE.cc) -DLD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o ldcomplex.o
echo ldcomio
- if [ x"$(enable_shared)" = xyes ]; then \
+ if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.cc) $(PICFLAG) -DLD \
`for N in $(COMIO); do echo " -D$${N}"; done` \
$(srcdir)/cinst.cc -o pic/ldcomio.o; \
diff --git a/libstdc++/config/aix.ml b/libstdc++/config/aix.ml
index dec7a905a34..5d6b6b245eb 100644
--- a/libstdc++/config/aix.ml
+++ b/libstdc++/config/aix.ml
@@ -1,9 +1,30 @@
-# AIX has wierd shared/non-shared libraries.
+# AIX has weird shared/non-shared libraries.
-ARLIB = libstdc++-ar.a.$(VERSION)
-ARLINK = libstdc++-ar.a
-SHLINK = libstdc++.a
-LIBS = $(ARLIB) $(ARLINK) $(SHLIB) $(SHLINK)
-DEPLIBS = ../$(SHLIB)
+ARLIB =
+ARLINK =
+
+# Build shared object with interface versioning in name.
+# Archive resulting shared object in a library.
+AIXLINK = libstdc++.a
+AIXLIB = libstdc++-$(VERSION).a
+AIXSHLIB = shr$(LIBSTDCXX_INTERFACE)$(CXX_INTERFACE).o
+SHFLAGS = -Wl,-bexpall
SHDEPS = -lm
-SHFLAGS = -Wl,-unix
+SHOPT = -shared
+
+LIBS = $(AIXLIB) $(AIXLINK)
+
+$(AIXSHLIB): stdlist
+ $(CC) $(LIBCXXFLAGS) $(SHFLAGS) $(SHOPT) -o $(AIXSHLIB) `cat stdlist` $(SHDEPS)
+
+# Delete $(AIXSHLIB) so that it is not included in stdlist if rebuilding.
+$(AIXLIB): $(AIXSHLIB)
+ -rm -f t$(AIXLIB)
+ $(AR) $(AR_FLAGS) t$(AIXLIB) $(AIXSHLIB)
+ mv t$(AIXLIB) $(AIXLIB)
+ -rm -f $(AIXSHLIB)
+
+$(AIXLINK):
+ -rm -f $(AIXLINK)
+ $(LN_S) $(AIXLIB) $(AIXLINK) || cp $(AIXLIB) $(AIXLINK)
+