libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add cegcc support


From: Ralf Wildenhues
Subject: Re: add cegcc support
Date: Fri, 1 Aug 2008 00:57:34 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

after some more hashing off-list (and lots of delays on my side, sorry
about that), I've applied this patch now.

Please post verbose output for any remaining test failures.

Thanks again,
Ralf

2008-08-01  Vincent Torri  <address@hidden>

        Add cegcc (Windows CE/PocketPC) support.
        * libltdl/config/ltmain.m4sh: Add 'cegcc' case where needed.
        * libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN, LT_SYS_DLOPEN_SELF)
        (_LT_SYS_DYNAMIC_LINKER, _LT_CHECK_MAGIC_METHOD)
        (_LT_CMD_GLOBAL_SYMBOLS, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
        (_LT_LANG_CXX_CONFIG): Likewise.
        * libltdl/m4/ltoptions.m4 (AC_LIBTOOL_DLOPEN): Likewise.
        * NEWS: Update.
        * THANKS: Update.

diff --git a/NEWS b/NEWS
index 2b113fb..a182371 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ New in 2.2.??: 2008-06-??: git version 2.2.5a, Libtool team:
 
   - None yet
 
+* Changes in supported systems or compilers:
+
+  - Initial support for cegcc (Windows CE/PocketPC) cross compilation.
+
 New in 2.2.4: 2008-05-04: git version 2.2.3a, Libtool team:
 
 * New features:
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index b176169..31ed2c7 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -363,7 +363,7 @@ func_enable_tag ()
 
 
   case $host in
-    *cygwin* | *mingw* | *pw32*)
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
       # don't eliminate duplications in $postdeps and $predeps
       opt_duplicate_compiler_generated_deps=:
       ;;
@@ -834,7 +834,7 @@ func_mode_compile ()
 
     # On Cygwin there's no "real" PIC flag so we must build both object types
     case $host_os in
-    cygwin* | mingw* | pw32* | os2*)
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
       pic_mode=default
       ;;
     esac
@@ -1605,7 +1605,7 @@ func_mode_install ()
              'exit $?'
          tstripme="$stripme"
          case $host_os in
-         cygwin* | mingw* | pw32*)
+         cygwin* | mingw* | pw32* | cegcc*)
            case $realname in
            *.dll.a)
              tstripme=""
@@ -1711,7 +1711,7 @@ func_mode_install ()
 
        # Do a test to see if this is really a libtool program.
        case $host in
-       *cygwin*|*mingw*)
+       *cygwin* | *mingw*)
            if func_ltwrapper_executable_p "$file"; then
              func_ltwrapper_scriptname "$file"
              wrapper=$func_ltwrapper_scriptname_result
@@ -1917,7 +1917,7 @@ extern \"C\" {
              $RM $export_symbols
              eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' 
"'< "$nlist" > "$export_symbols"'
              case $host in
-             *cygwin* | *mingw* )
+             *cygwin* | *mingw* | *cegcc* )
                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
                 eval 'cat "$export_symbols" >> 
"$output_objdir/$outputname.def"'
                ;;
@@ -1929,7 +1929,7 @@ extern \"C\" {
              eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > 
"$nlist"T'
              eval '$MV "$nlist"T "$nlist"'
              case $host in
-               *cygwin | *mingw* )
+               *cygwin | *mingw* | *cegcc* )
                  eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
                  eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
                  ;;
@@ -1985,7 +1985,7 @@ typedef struct {
 } lt_dlsymlist;
 "
          case $host in
-         *cygwin* | *mingw* )
+         *cygwin* | *mingw* | *cegcc* )
            $ECHO >> "$output_objdir/$my_dlsyms" "\
 /* DATA imports from DLLs on WIN32 con't be const, because
    runtime relocations are performed -- see ld's documentation
@@ -2071,7 +2071,7 @@ static const void *lt_preloaded_setup() {
        # Transform the symbol file into the correct name.
        symfileobj="$output_objdir/${my_outputname}S.$objext"
        case $host in
-       *cygwin* | *mingw* )
+       *cygwin* | *mingw* | *cegcc* )
          if test -f "$output_objdir/$my_outputname.def"; then
            compile_command=`$ECHO "X$compile_command" | $Xsed -e 
"address@hidden@%$output_objdir/$my_outputname.def $symfileobj%"`
            finalize_command=`$ECHO "X$finalize_command" | $Xsed -e 
"address@hidden@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -2455,7 +2455,7 @@ func_emit_wrapper_part2 ()
 "
        case $host in
        # Backslashes separate directories on plain windows
-       *-*-mingw | *-*-os2*)
+       *-*-mingw | *-*-os2* | *-cegcc*)
          $ECHO "\
       exec \"\$progdir\\\\\$program\" \${1+\"address@hidden"}
 "
@@ -3591,7 +3591,7 @@ func_mode_link ()
 {
     $opt_debug
     case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
       # which system we are compiling for in order to pass an extra
@@ -4053,7 +4053,7 @@ func_mode_link ()
          ;;
        esac
        case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
          testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
          case :$dllsearchpath: in
          *":$dir:"*) ;;
@@ -4071,7 +4071,7 @@ func_mode_link ()
       -l*)
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
          case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
            # These systems don't actually have a C or math library (as such)
            continue
            ;;
@@ -4148,7 +4148,7 @@ func_mode_link ()
 
       -no-install)
        case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | 
*-cegcc*)
          # The PATH hackery in wrapper scripts is required on Windows
          # and Darwin in order for the loader to find any dlls it needs.
          func_warning "\`-no-install' is ignored for $host"
@@ -5105,7 +5105,7 @@ func_mode_link ()
        if test -n "$library_names" &&
           { test "$use_static_libs" = no || test -z "$old_library"; }; then
          case $host in
-         *cygwin* | *mingw*)
+         *cygwin* | *mingw* | *cegcc*)
              # No point in relinking DLLs because paths are not encoded
              notinst_deplibs="$notinst_deplibs $lib"
              need_relink=no
@@ -5175,7 +5175,7 @@ func_mode_link ()
            elif test -n "$soname_spec"; then
              # bleh windows
              case $host in
-             *cygwin* | mingw*)
+             *cygwin* | mingw* | *cegcc*)
                func_arith $current - $age
                major=$func_arith_result
                versuffix="-$major"
@@ -6025,7 +6025,7 @@ func_mode_link ()
       if test "$build_libtool_libs" = yes; then
        if test -n "$rpath"; then
          case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | 
*-cegcc*)
            # these systems don't actually have a c library (as such)!
            ;;
          *-*-rhapsody* | *-*-darwin1.[012])
@@ -6524,7 +6524,7 @@ EOF
 
        orig_export_symbols=
        case $host_os in
-       cygwin* | mingw*)
+       cygwin* | mingw* | cegcc*)
          if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
            # exporting using user supplied symfile
            if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
@@ -7149,7 +7149,7 @@ EOF
          esac
        fi
        case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
          testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
          case :$dllsearchpath: in
          *":$libdir:"*) ;;
@@ -7226,6 +7226,10 @@ EOF
           wrappers_required=no
         fi
         ;;
+      *cegcc)
+        # Disable wrappers for cegcc, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
       *)
         if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
           wrappers_required=no
@@ -7666,7 +7670,7 @@ EOF
          # place dlname in correct position for cygwin
          tdlname=$dlname
          case $host,$output,$installed,$module,$dlname in
-           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) 
tdlname=../bin/$dlname ;;
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | 
*cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
          esac
          $ECHO > $output "\
 # $outputname - a libtool library file
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 04d95a3..d4891ca 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1516,7 +1516,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     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,
@@ -1742,7 +1742,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32*)
+  mingw* | pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
@@ -2204,14 +2204,14 @@ bsdi[[45]]*)
   # 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}`~
@@ -2234,7 +2234,7 @@ cygwin* | mingw* | pw32*)
       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"`
@@ -3012,6 +3012,12 @@ mingw* | pw32*)
   fi
   ;;
 
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format 
pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
 darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3323,7 +3329,7 @@ case $host_os in
 aix*)
   symcode='[[BCDT]]'
   ;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
 hpux*)
@@ -3569,7 +3575,7 @@ m4_if([$1], [CXX], [
     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
@@ -3875,7 +3881,7 @@ m4_if([$1], [CXX], [
       # 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
@@ -3944,7 +3950,7 @@ m4_if([$1], [CXX], [
       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], [],
@@ -4169,7 +4175,7 @@ m4_if([$1], [CXX], [
   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'
   ;;
   *)
@@ -4221,7 +4227,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
   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++.
@@ -4308,7 +4314,7 @@ _LT_EOF
       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'
@@ -4659,7 +4665,7 @@ _LT_EOF
       _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
@@ -5606,7 +5612,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         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'
diff --git a/libltdl/m4/ltoptions.m4 b/libltdl/m4/ltoptions.m4
index e970119..34151a3 100644
--- a/libltdl/m4/ltoptions.m4
+++ b/libltdl/m4/ltoptions.m4
@@ -125,7 +125,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 [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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]