Hey,

In order to reasonably support this target, we need a volunteer who will faithfully test libtool on that target and work to resolve issues. Are you able to find a volunteer to support the cegcc compiler?

I am volunteer :-)

It seems that the cegcc compiler must work almost the same as the MinGW compiler. I think that the main issue will be that libtool has a very sophisticated test suite which may currently depend on some features which are not in Windows CE. The test suite would need to be adapted to work reasonably well for this target. Even now, there are still some test failures with the MinGW compiler.

Here are some patch for supporting the cegcc. I know that i should send them to [EMAIL PROTECTED] I put them here in case someone see something wrong in them, and also because i would like to ask some questions before:

1) how can I check libtool when doing cross compiling ? make check will check libtool on my platform (say linux), right ? So i don't know what to do to check libtool with cegcc

2) With those patches, libtool can now create dll's with cegcc. But I have that message when it tries to create the dll of my lib:

*** Warning: linker path does not have real file for library -lws2.

etc... saying it can not create the shared lib of my lib because the shared version of libws2 does not exist. Usually, there are 2 things to do:

 a) provide the dll associated to that static lib
b) pass -no-undefined (specific to Windows platform, not necessary on linux) to libtool (add it in *_la_LDFLAGS in Makefile.am's, for example).

Of course, i added -no-undefined but there is no dll for libws2.

The only exception i found was with mingw and those static libraries. From libtool version 1.5.24, it can create the dll of my lib, even if the dll of those libraries (lwsock2, libiberty, etc...) do not exist. I recall that with previous version (1.5.22 or maybe the one below), it can not.

Do you have some suggestions to fix this ?

thank you

Vincent Torri
--- libltdl/m4/ltoptions.m4     2008-04-01 20:23:20.000000000 +0200
+++ ../libtool-2.2.3a/libltdl/m4/ltoptions.m4   2008-04-12 08:38:20.000000000 
+0200
@@ -125,7 +125,7 @@
 [enable_win32_dll=yes
 
 case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
   AC_CHECK_TOOL(AS, as, false)
   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   AC_CHECK_TOOL(OBJDUMP, objdump, false)
--- libltdl/m4/libtool.m4       2008-04-10 23:18:02.000000000 +0200
+++ ../libtool-2.2.3a/libltdl/m4/libtool.m4     2008-04-12 08:52:40.000000000 
+0200
@@ -1503,7 +1503,7 @@
     lt_cv_sys_max_cmd_len=-1;
     ;;
 
-  cygwin* | mingw*)
+  cygwin* | mingw* | cegcc*)
     # On Win9x/ME, this test blows up -- it succeeds, but takes
     # about 5 minutes as the teststring grows exponentially.
     # Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1729,7 +1729,7 @@
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32*)
+  mingw* | pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
@@ -2190,14 +2190,14 @@
   # libtool to hard-code these into programs
   ;;
 
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
   shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
   case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -2220,7 +2220,7 @@
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | 
$SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
       ;;
-    mingw*)
+    mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 
's/[[.]]/-/g'`${versuffix}${shared_ext}'
       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | 
$SED -e "s/^libraries://" -e "s,=/,/,g"`
@@ -2997,6 +2997,13 @@
   fi
   ;;
 
+cegcc*)
+  # ?? shouldn't this be based no build_os, not host_os?
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format 
pei*-arm-little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
 darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3308,7 +3315,7 @@
 aix*)
   symcode='[[BCDT]]'
   ;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
 hpux*)
@@ -3554,7 +3561,7 @@
     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
-    mingw* | cygwin* | os2* | pw32*)
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -3853,7 +3860,7 @@
       # PIC is the default for these OSes.
       ;;
 
-    mingw* | cygwin* | pw32* | os2*)
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -3922,7 +3929,7 @@
       fi
       ;;
 
-    mingw* | cygwin* | pw32* | os2*)
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       m4_if([$1], [GCJ], [],
@@ -4139,7 +4146,7 @@
   pw32*)
     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
   ;;
-  cygwin* | mingw*)
+  cygwin* | mingw* | cegcc*)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 
DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ 
]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
   *)
@@ -4191,7 +4198,7 @@
   extract_expsyms_cmds=
 
   case $host_os in
-  cygwin* | mingw* | pw32*)
+  cygwin* | mingw* | pw32* | cegcc*)
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
@@ -4278,7 +4285,7 @@
       fi
       ;;
 
-    cygwin* | mingw* | pw32*)
+    cygwin* | mingw* | pw32* | cegcc*)
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -4629,7 +4636,7 @@
       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
       ;;
 
-    cygwin* | mingw* | pw32*)
+    cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -5576,7 +5583,7 @@
         esac
         ;;
 
-      cygwin* | mingw* | pw32*)
+      cygwin* | mingw* | pw32* | cegcc*)
         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
         # as there is no search path for DLLs.
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to