Re: [3.2/3.3/HEAD] shared libobjc not built

"Timothy J. Wood" <[email protected]> Fri, 3 Jan 2003 19:28:44 -0800
Newsgroups gmane.comp.gcc.devel,gmane.comp.gnu.mingw.patches
Message-ID <[email protected]>
On Thursday, January 2, 2003, at 07:54  PM, Nicola Pero wrote:
> If you can get some time to get it working on MinGW, that would be 
> great
> :-)


   OK, I have it generating a dll file now.  I still need to test if 
ObjC *works* with the DLL, but I thought I'd run this diff out to see 
if anyone spots any problems this might cause (I can't imagine what, 
but...)

   This patch is against the gcc-3.2.1-20021201-3 MinGW tarball, but I 
wouldn't be surprised if it worked on the head too :)

--- ./ltcf-c.sh Fri Aug 31 17:47:19 2001
+++ ../../gcc-3.2.1-20021201-3/ltcf-c.sh        Fri Jan  3 19:18:51 2003
@@ -102,7 +102,7 @@
      # hardcode_libdir_flag_spec is actually meaningless, as there is
      # no search path for DLLs.
      hardcode_libdir_flag_spec='-L$libdir'
-    allow_undefined_flag=unsupported
+    allow_undefined_flag=
      always_export_symbols=yes

      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
@@ -160,9 +160,9 @@
          _lt_hint=1;
          cat $export_symbols | while read symbol; do
           set dummy \$symbol;
-         case \[$]# in
-           2) echo "   \[$]2 @ \$_lt_hint ; " >> 
$output_objdir/$soname-def;;
-           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> 
$output_objdir/$soname-def;;
+         case \$# in
+           2) echo "    \$2 @ \$_lt_hint ; " >> 
$output_objdir/$soname-def;;
+           *) echo "    \$2 @ \$_lt_hint \$3 ; " >> 
$output_objdir/$soname-def;;
           esac;
           _lt_hint=`expr 1 + \$_lt_hint`;
          done;


   This turns off the setting of 'allow_undefined_flag=unsupported' 
since the ObjC DLL doesn't *have* any undefined symbols, so there is no 
need to allow them!  Also, this changes the shell syntax to not bork 
the defs file -- It could well be that /bin/sh is busted on Mac OS X 
(from whence I'm cross compiling), but it is now bash:

% /bin/sh --version
GNU bash, version 2.05a.0(1)-release (powerpc-apple-darwin6.0)
Copyright 2001 Free Software Foundation, Inc.

   ... so I'd expect it to be reasonably close to what other folks have.

   I'll let you all know if I can get the DLL actually working in a bit. 
:)

-tim