News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

open watcom support has been broken

Started by killerbot, March 12, 2007, 03:41:47 PM

Previous topic - Next topic

killerbot

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)  :
Quotewlib.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.

Biplab

#1
Quote from: killerbot on March 12, 2007, 03:41:47 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  :)

Quote from: killerbot on March 12, 2007, 03:41:47 PM
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
Be a part of the solution, not a part of the problem.

Biplab

Here is the patch. Hopefully this will fix the issue. Please test it and post your result. :)

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.

killerbot

and we are back in bizznizz , committing the changes

Biplab

#4
Quote from: killerbot on March 12, 2007, 04:48:51 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
Be a part of the solution, not a part of the problem.