Permalink
Browse files

Update STLPort and compile the library

Turn on most features of stl and compile the source for streams.
  • Loading branch information...
1 parent e64e7c8 commit e46c9386c4f79aa40185f79a19fc5b2a7ef528b3 Patrick Scott committed Feb 8, 2010
Showing 968 changed files with 132,996 additions and 65,962 deletions.
View
@@ -0,0 +1,53 @@
+# We cannot use stlport on the simulator because it conficts with the host stl
+# library. Android's port also relies on bionic which is not built for the
+# simulator either.
+ifneq ($(TARGET_SIMULATOR),true)
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES += \
+ src/dll_main.cpp \
+ src/fstream.cpp \
+ src/strstream.cpp \
+ src/sstream.cpp \
+ src/ios.cpp \
+ src/stdio_streambuf.cpp \
+ src/istream.cpp \
+ src/ostream.cpp \
+ src/iostream.cpp \
+ src/codecvt.cpp \
+ src/collate.cpp \
+ src/ctype.cpp \
+ src/monetary.cpp \
+ src/num_get.cpp \
+ src/num_put.cpp \
+ src/num_get_float.cpp \
+ src/num_put_float.cpp \
+ src/numpunct.cpp \
+ src/time_facets.cpp \
+ src/messages.cpp \
+ src/locale.cpp \
+ src/locale_impl.cpp \
+ src/locale_catalog.cpp \
+ src/facets_byname.cpp \
+ src/complex.cpp \
+ src/complex_io.cpp \
+ src/complex_trig.cpp \
+ src/string.cpp \
+ src/bitset.cpp \
+ src/allocators.cpp \
+ src/c_locale.c \
+ src/cxa.c \
+
+LOCAL_MODULE := libstlport
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_CFLAGS := -D_GNU_SOURCE
+LOCAL_CPPFLAGS := -fuse-cxa-atexit
+
+include $(LOCAL_PATH)/libstlport.mk
+
+include $(BUILD_SHARED_LIBRARY)
+endif
View
166 INSTALL
@@ -0,0 +1,166 @@
+**********************************************************************
+* INSTALL file for STLport *
+* *
+**********************************************************************
+
+STLport is a full ANSI C++ Standard library.
+
+This distribution contains STLport sources only, no binaries.
+To use STLport iostreams, locale and complex numbers, you have to build STLport
+library from sources in "build/lib" directory and link your programs with it.
+
+Starting with 5.0 the 'wrapper' mode is not supported anymore. You cannot use native
+compiler iostreams implementation with STLport STL (see doc/FAQ for explanations).
+Now you have to choose between STLport iostreams or no iostreams.
+
+==== Unpacking and installing STLport ==========
+
+1) Unpack STLport archive to a directory accessible during compilation.
+ NOTE: DO NOT overwrite header files coming with the compiler, even if you made
+ a backup - this won't work! Most probably, you've already unpacked the archive before
+ reading this file though ;)
+
+2) Make sure "stlport" directory of this distribution comes before compiler's one
+ in your include paths when you compile the project.
+
+ Note: for SunPro CC 5.0 and higher, there used to be special directory "stlport/SC5"
+ this is now obsolete, please make sure you do not use it anymore.
+
+3) Make sure you do not rename this "stlport" subdirectory -
+ that may result in compilation errors.
+
+ NOTE: Your compiler should be recognized by STLport source code with no configuring.
+ Please edit appropriate configuration header for your compiler
+ directly if you have to make compiler-specific configuration changes
+ (see stlport/stl/config).
+
+4) Run:
+
+ configure --help
+
+ Depending on your environment, Windows command shell or Unix like shell,
+ configure.bat or configure script will be run respectively. For Windows users
+ running configure script is mandatory in order to declare the compiler you are
+ going to use.
+
+5) Go to "build/lib" subdirectory. It contains various makefiles for different
+ compilers and 'make' utilities (GNU Make and Microsoft's nmake supported).
+
+ Verify you can do command line compiles. IDE users may have to do something
+ special, like add environment variables (for Microsoft) or install
+ additional compiler components (for Metrowerks), before they can use their
+ command line compilers (see doc/README.xxxx for additionnal information).
+
+ configure script should have already created a Makefile file so that you only
+ have to call 'make' or 'nmake' (for some platforms GNU make might be hidden
+ behind 'gmake').
+
+ IMPORTANT:
+
+ If you DO NOT plan to use STLport iostreams and/or locale implementation but just
+ the STL, you do not have to build the library.
+
+ If you have decided to disable STLport iostreams and locale using _STLP_NO_IOSTREAMS
+ configuration macro in stlport/stl/config/user_config.h, you may stop reading here.
+
+
+==== Building STLport iostreams library ==========
+
+Below are step-by-step instructions to build STLport streams library. This is a general
+build process description, for a more detailed one check README files in the doc folder:
+
+5) Using appropriate make command (make or nmake), do
+
+ make clean install
+
+ to build the STLport libraries. Make files are set up to build several different
+ flavors - debug/nondebug, static/dynamic versions. But not all flavors will be build
+ by default. See build/lib/README for other make targets.
+
+ Note: 'install' target work slightly different than usual - it installs libraries into
+ <STLport root dir>/lib and bin catalogs, NOT IN SYSTEM CATALOG. You can do the system
+ install by just copying stlport and lib folder to the destination of your choise. For
+ example on UNIX-like platforms this can be done with the following commands:
+
+ su
+ tar cf - stlport | (cd /usr/local/include; tar xf -)
+ chmod -R a+r /usr/local/include/stlport
+ chown -R root:root /usr/local/include/stlport
+ (cd lib; tar cf - --exclude=CVS --exclude=.cvsignore .) | (cd /usr/local/lib; tar xf -)
+ chown -R root:root /usr/local/lib/libstlport*
+ exit
+
+ Note: System install is optional, most of compilers/linkers support searching for includes
+ and libs throught out the whole filesystem, just check your documentation on how to achieve
+ this.
+
+ If you use cross-compiler, you can find libraries in the <STLport root dir>/lib/<target platform>
+ catalog.
+
+6) If build fails, you may choose to :
+ - try fixing the build ;)
+ - wait until somebody else will submit corresponding changes to be incorporated in next STLport
+ release/snapshot.
+
+ In case you do patch STLport, please submit your patches to
+ https://sourceforge.net/tracker/?atid=766246&group_id=146814&func=browse
+
+==== Linking your application with STLport library ==========
+
+7) Check the build:
+
+ Example:
+
+ - under Linux and other Unixes:
+
+ cd build/test/unit
+ make install
+ ../../../bin/stl_unit_test
+ ../../../bin-g/stl_unit_test
+
+ - under Windows:
+
+ cd build\test\unit
+ nmake install
+ cd ..\..\..\bin
+ stl_unit_test
+ stl_unit_testd
+ stl_unit_teststld
+
+8) Supply the "lib" subdirectory to the library search path and add desired
+ library to the list of libraries to link with.
+ Examples (imagine you have mytest.cpp in the same directory as this file is):
+ With GCC : g++ -pthread -I./stlport mytest.cpp -L./lib/ -lstlport
+ With DEC CC : cxx -I./stlport mytest.cpp -L./lib/ -lstlport
+ With SUN CC : CC -mt -I./stlport mytest.cpp -L./lib/ -lstlport
+ .....
+ For several compilers supporting auto linking feature (VC++, Borland, DMC),
+ you do not have to specify "stlport.M.m.lib" explicitly, as it is being choosen
+ and forced to link automatically by "#pragma"'s in compiler config files
+ Appropriate version is being selected based on compiler options and _STLP_DEBUG
+ setting. All you have to do is to set library search path for the linker.
+
+ Example :
+ cl.exe /I.\stlport mytest.cpp /link /libpath:.\lib /MD
+
+9) If you linked your application with shared STLport library (.so or .dll), please
+ make suze that your .so or .dll can be found by the dynamic linker.
+ Under Windows, the paths searched depend on the particular flavor, see the MSDN
+ documentation for LoadLibrary at http://msdn.microsoft.com. The easiest ways are to
+ either modify the PATH environment variable or copy all .dll's next to the
+ executable like it is done per default when unit tests executable are put next
+ to dlls.
+ Under Linux, the environment variable LD_LIBRARY_PATH can be adjusted to point
+ to the dir containing .so. See the manpage for ld.so for more info.
+
+10) STLport builds only multithreaded libraries, so your application should be compiled
+ as multithreaded, too. Use -pthread (or -pthreads on Solaris) option for GCC, -mt for SunPro,
+ /MT for VC, and so on. Sometimes you should define _REENTRANT or something else, depends
+ upon platform/compiler. See compiler's and linker's options on command line when you build
+ unit tests (build/test/unit) for reference. The last is useful for ANY platform.
+
+11) Don't hesitate to read READMEs (doc/README*, build/lib/README*, build/test/unit/README*)
+ and doc/FAQ.
+
+12) Have fun!
+
View
@@ -0,0 +1,120 @@
+**********************************************************************
+* INSTALL file for STLport 5.2 *
+* *
+**********************************************************************
+
+STLport is a full ANSI C++ Standard library.
+
+This distribution contains STLport sources only, no binaries.
+To use STLport iostreams, locale and complex numbers, you have
+to build STLport library from sources and link your programs with it.
+
+Starting with 5.0 the 'wrapper' mode is not supported anymore.
+You cannot use native compiler iostreams implementation with STLport STL
+(see doc/FAQ for explanations).
+
+==== Installing STLport ==========
+
+0) DO NOT overwrite/move/rename header files coming with the compiler,
+ even if you made a backup---STLport need this headers and don't
+ override ones.
+
+1) Run
+
+ ./configure --help
+
+ read options description; if you use compiler
+ different from gcc, pay attention to --use-compiler-family= option.
+
+2) Run
+
+ ./configure <option>
+
+ Options here more-or-less traditional.
+
+ Note: ./configure give hints only for library build, it dosen't
+ create/edit any headers, check you system etc. This is simple way
+ to store custom options, not more. If you want to change default
+ behaviour of STLport, see stlport/stl/config/user_config.h and
+ stlport/stl/config/host.h; read the comments in this files!
+ Not all combinations of options healthy, you should understand
+ what you do. If not, keep all unchanged.
+
+ Note: you can find all recognised 'settings' in the file
+ build/Makefiles/gmake/config.mak
+
+ This is generated file, but only ./configure will rewrite one.
+
+3) Run
+
+ make && make check
+
+ Only GNU Make supported! Preferred verion of GNU Make >= 3.81;
+ never use GNU Make before 3.79 --- build not work properly;
+ GNU makes >= 3.79 and < 3.81 may fail to build library/tests
+ properly, due to bugs; but the real results depends upon
+ platform.
+
+4) If build fine, become superuser and run
+
+ make install
+
+ Note: you can use --prefix= to change installation path
+ (or macro DESTDIR, as usual), or even skip installation and use
+ STLport in-place.
+
+==== Usage STLport ==========
+
+1) The best way to understand how to use it, is to see on compilation,
+ linking, running unit tests, i.e. see on options when you do
+
+ (cd build/test/unit; make check)
+
+2) Make sure "stlport" directory of this distribution comes before
+ compiler's one in your include paths (something like
+ -I<base install path>/stlport); never rename 'stlport' part of path!
+
+ Compilation:
+
+ c++ -pthread -fexceptions -O2 -I/usr/local/include/stlport -c -o test.o test.cc
+
+ In case of gcc, libstlport replace libstdc++ (not in all cases!)
+
+ Link, variant 1:
+
+ c++ -pthread -fexceptions -O2 -I/usr/local/include/stlport -nostdlib -o mytest \
+ /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../crt1.o \
+ /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../crti.o \
+ /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/crtbegin.o \
+ test.o \
+ -lstlport \
+ -lgcc_s -lpthread -lc -lm \
+ /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/crtend.o \
+ /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../crtn.o
+
+ Of cause, names of start/stop files not hardcoded, you can locate it with
+
+ c++ -print-file-name=crt1.o
+
+ Link, variant 2:
+
+ gcc -pthread -fexceptions -O2 -I/usr/local/include/stlport -o mytest \
+ test.o -lstlport
+
+ If you use gcc before 3.3, you must link with libstdc++, because
+ language-support library (libsupc++.a) don't contain necessary
+ functions.
+
+3) STLport builds only multithreaded libraries (by default), so your
+ application should be compiled as multithreaded, too. Use -pthread
+ (or -pthreads on Solaris) option for GCC, -mt for SunPro and so on.
+ Sometimes you should define _REENTRANT or something else, depends
+ upon platform/compiler. See compiler's and linker's options
+ on command line when you build unit tests (build/test/unit)
+ for reference. The last is useful for ANY platform (special
+ attention for Windows users).
+
+4) Don't hesitate to read READMEs (doc/README*, build/lib/README*,
+ build/test/unit/README*) and doc/FAQ.
+
+5) Have fun!
View
27 LICENSE
@@ -0,0 +1,27 @@
+Boris Fomitchev grants Licensee a non-exclusive, non-transferable, royalty-free license to use STLport and its documentation without fee.
+
+By downloading, using, or copying STLport or any portion thereof, Licensee agrees to abide by the intellectual property laws and all other applicable laws of the United States of America, and to all of the terms and conditions of this Agreement.
+
+Licensee shall maintain the following copyright and permission notices on STLport sources and its documentation unchanged :
+
+Copyright 1999,2000 Boris Fomitchev
+
+This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk.
+Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice.
+The Licensee may distribute binaries compiled with STLport (whether original or modified) without any royalties or restrictions.
+
+The Licensee may distribute original or modified STLport sources, provided that:
+
+The conditions indicated in the above permission notice are met;
+The following copyright notices are retained when present, and conditions provided in accompanying permission notices are met :
+Copyright 1994 Hewlett-Packard Company
+
+Copyright 1996,97 Silicon Graphics Computer Systems, Inc.
+
+Copyright 1997 Moscow Center for SPARC Technology.
+
+Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Hewlett-Packard Company makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
+
+Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
+
+Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Moscow Center for SPARC Technology makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
View
No changes.
View
@@ -0,0 +1,26 @@
+# Time-stamp: <08/06/12 14:28:42 ptr>
+#
+# Copyright (c) 2004-2008
+# Petr Ovtchenkov
+#
+# Licensed under the Academic Free License version 3.0
+#
+
+SRCROOT := build
+SUBDIRS := build/lib
+
+include ${SRCROOT}/Makefiles/gmake/subdirs.mak
+
+all install depend clean clobber distclean check::
+ +$(call doinsubdirs,${SUBDIRS})
+
+distclean clean depend clobber::
+ +$(call doinsubdirs,build/test/unit)
+
+release-shared install-release-shared:
+ +$(call doinsubdirs,${SUBDIRS})
+
+install::
+ ${MAKE} -C build/lib install-headers
+
+.PHONY: all install depend clean clobber distclean check release-shared install-release-shared
Oops, something went wrong.

0 comments on commit e46c938

Please sign in to comment.