Author Topic: open watcom support has been broken  (Read 3804 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5297
open watcom support has been broken
« on: March 12, 2007, 03:41:47 pm »
Dear all,

Just for your information. Due to some changes made in the last couple of weeks for Openwatcom, I have just noticed that the support is broken. Don't ask me how, no clue yet. What I have noticed is that the several commands have been altered (I have checked this on at least 2 machines).

An example :
Link command for static libraries :
Quote
$lib_linker option quiet $static_output $link_objects

Where this was and should still be :
Quote
$lib_linker -q $static_output $link_objects

next to this, some more things are wrong : I get for example (with fixing the -q)  :
Quote
wlib.exe -q ..\Deliv\OWDebug\libCodec.lib file ..\Deliv\OWDebug\src\CodecP.obj file ..\Deliv\OWDebug\src\Codec.obj
those words 'file' shouldn't be there !!

More information to follow. The first part I can easily fix, it seems it has been changed in the sources of the compiler plug-in, put those file words are inserted at another level. That will take some more time to find out.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: open watcom support has been broken
« Reply #1 on: March 12, 2007, 04:12:01 pm »
What I have noticed is that the several commands have been altered (I have checked this on at least 2 machines).

Remember, it was your suggestion to change the linker from wcl386.exe to wlink.exe. ;)

wlink.exe does not accept any command with a minus prefixed. So I had to alter a couple of things. I pointed at that time that it needs a couple of major changes and I did make a number of changes to support wlink.exe instead of wcl386.exe  :)

An example :
Link command for static libraries :
Quote
$lib_linker option quiet $static_output $link_objects

Where this was and should still be :
Quote
$lib_linker -q $static_output $link_objects

Sorry I forgot to test it with static library project. But the newer changes will work fine with other projects and I had posted a couple of test results to prove that it works.

I'll post a patch soon. Please test it because I don't have OpenWatcom installed in my laptop.

Regards,

Biplab
« Last Edit: March 12, 2007, 04:18:57 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: open watcom support has been broken
« Reply #2 on: March 12, 2007, 04:20:39 pm »
Here is the patch. Hopefully this will fix the issue. Please test it and post your result. :)

Code
Index: plugins/compilergcc/compilerOW.cpp
===================================================================
--- plugins/compilergcc/compilerOW.cpp (revision 3684)
+++ plugins/compilergcc/compilerOW.cpp (working copy)
@@ -329,7 +329,7 @@
     m_Commands[(int)ctLinkDynamicCmd]
         = wxT("$linker option quiet $link_options $libdirs name $exe_output $libs $link_objects");
     m_Commands[(int)ctLinkStaticCmd]
-        = wxT("$lib_linker option quiet $static_output $link_objects");
+        = wxT("$lib_linker -q $static_output $link_objects");
     m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
 
     LoadDefaultRegExArray();
Index: plugins/compilergcc/directcommands.cpp
===================================================================
--- plugins/compilergcc/directcommands.cpp (revision 3684)
+++ plugins/compilergcc/directcommands.cpp (working copy)
@@ -576,7 +576,7 @@
         {
             // -----------------------------------------
             // Following lines have been modified for OpenWatcom
-            if (compiler->GetID().IsSameAs(_T("ow")))
+            if (compiler->GetID().IsSameAs(_T("ow")) && (!compiler->GetPrograms().LIB.IsSameAs(_T("wlib.exe"))))
             {
                 linkfiles << _T("file ") << prependHack << Object << _T(" "); // see QUICK HACK above (prependHack)
                 FlatLinkFiles << _T("file ") << prependHack << pfd.object_file_flat << _T(" "); // see QUICK HACK above (prependHack)

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5297
Re: open watcom support has been broken
« Reply #3 on: March 12, 2007, 04:48:51 pm »
and we are back in bizznizz , committing the changes

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: open watcom support has been broken
« Reply #4 on: March 12, 2007, 05:01:07 pm »
and we are back in bizznizz , committing the changes

I'll try to have a closer look at it in this weekend to improve the support. If you find any more errors, please do inform me. :D

Regards,

Biplab
« Last Edit: March 12, 2007, 05:02:41 pm by Biplab »
Be a part of the solution, not a part of the problem.