[uClibc] Re: uClibc++ update

Peter S. Mazinger ps.m at gmx.net
Tue Sep 7 19:49:42 UTC 2004


> Yay!!!  I fially managed to get a system working with gcc 3.4.  Unfortunately, 
> it is my (really slow) server machine, but I can live with that.
> 
> Since I have have manged to do this, I have compiled all of the latest code 
> with gcc 3.4 for the purpose of error checking.  2 hours later - I have fixed 
> everything.

Yes it builds for me too

> 
> The main feature of this release is the compile correctness on gcc 3.4.  I've 
> also started putting in some code for valarray, but it is a while away from 
> being finished.
> 
> http://garrett.dyndns.biz/uClibc++/download.html
> 
> Let me know if you run into any problems.

include/ios:219:error: invalid conversion from `int' to `void*'
probably * is superfluos

After this change tried to build asm5900-20020415-mfx5 (from 
http://upx.sf.net/download/tools ), assemble.cpp fails.

Now I took my favorite c++ test build, upx-1.92-cvs

If I do not import the libsupc++.a file, then it fails with many errors, 
but if I added it to the included libs at link time, it builds correctly.
For this case a libuClibc++.la file would be proper to have (so that 
libsupc++ is included all the time)

If I import the libsupc++.a file it should be fully added to the shared 
lib (why is it not added to the libuClibc++.a too?), it fails w/: 
msg.o undefined reference to __cxa_bad_typeid
work.o undefined reference to  vtable for __cxxabiv1::__pointer_type_info

if I add again libsupc++.a manually at link time, it builds correctly.

I have looked into libsupc++.a, these are there, but they are not in 
libuClibc++.so (although some parts from libsupc++.a where added).

libsupc++.a is only partly added to the lib for some reason, so it is no 
use to add it to the c++ lib, better using it separately for now (through 
an .la file or .so linker script), that could also add -lgcc_s -lc)

I am not sure if uClibc supports .la files, an so linker script is 
tested and works w/ uClibc (but this procedure will create bigger 
executables due to libsupc++.a usage)

Attached are the used patches.

Proposals:
1. if IMPORT_LIBSUP is set g++ -print-file-name=libsupc++.a could be 
used to set some default, it prints the full path of the file if found
2. LDFLAGS is not used at link time of the library
3. include/Makefile is superfluos (removed already the references in 
patch)

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2

____________________________________________________________________
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
-------------- next part --------------
--- uClibc++/Makefile.mps	Tue Sep  7 15:23:29 2004
+++ uClibc++/Makefile	Tue Sep  7 15:24:25 2004
@@ -14,6 +14,8 @@
 	$(MAKE) -C include all
 	$(MAKE) -C src all
 	$(MAKE) -C bin all
+
+test:	all
 	$(MAKE) -C tests all
 
 clean:
-------------- next part --------------
--- uClibc++/src/Makefile.mps	Tue Sep  7 16:11:54 2004
+++ uClibc++/src/Makefile	Tue Sep  7 16:23:30 2004
@@ -68,6 +68,9 @@
 ALLBIN	=	libuClibc++.so.$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) libuClibc++.a
 ALLTGT	=	libuClibc++
 
+SONAME  =	libuClibc++
+#SONAME  =	libstdc++
+
 ifeq ($(IMPORT_LIBSUP),y)
 _TEST_LIBSUP_EXISTANCE = $(shell ls $(LIBSUP_PATH))
 
@@ -89,7 +92,7 @@
 
 libuClibc++:	$(ALLOBJS)
 	ar rcs libuClibc++.a $(EXOBJS)
-	gcc -shared -o libuClibc++.so.$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) $(CFLAGS) $(LIBS) $(EXOBJS) $(SUPOBJS)
+	$(CC) -shared -Wl,-soname=$(SONAME).so.$(MAJOR_VERSION) -o libuClibc++.so.$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) $(CFLAGS) $(LIBS) $(EXOBJS) $(SUPOBJS)
 	ln -s -f libuClibc++.so.$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) libuClibc++.so.$(MAJOR_VERSION).$(MINOR_VERSION)
 	ln -s -f libuClibc++.so.$(MAJOR_VERSION).$(MINOR_VERSION) libuClibc++.so.$(MAJOR_VERSION)
 	ln -s -f libuClibc++.so.$(MAJOR_VERSION) libuClibc++.so
--- uClibc++/Makefile.mps	Tue Sep  7 16:17:38 2004
+++ uClibc++/Makefile	Tue Sep  7 16:17:48 2004
@@ -1,5 +1,5 @@
 MAKE	=	make
-SUBDIRS =	include src tests bin
+SUBDIRS =	src tests bin
 
 # User defines:
 
@@ -11,7 +11,6 @@
 include Rules.mak
 
 all:	headers
-	$(MAKE) -C include all
 	$(MAKE) -C src all
 	$(MAKE) -C bin all
 
-------------- next part --------------
--- include/ios.mps	Tue Sep  7 17:13:22 2004
+++ include/ios	Tue Sep  7 17:15:29 2004
@@ -212,7 +212,7 @@
 		typedef typename traits::off_type off_type;
 		typedef traits traits_type;
 
-		operator void*() const{
+		operator void() const{
 			if(fail() ){
 				return 0;
 			}


More information about the uClibc mailing list