[watcom] correct some C compiler, Librarian and Linker options #1941
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
remove WATDIR variable as useless and correct use of WATCOM variable which must contain path to OpenWatcom installation not to binaries, it is used by OpenWatcom tools to locate some configuration files etc.
use neutral target for C compiler, option -bnone instead of target specific -bos2 it ensures that compiler don't define any target specific macros or use any other target specific setup, it uses header files with guards for standard DOS definition (more neutral) not for OS/2
use -bos2 target for linker only, it define output format as OS/2 New Executable, but for ELKS OpenWatcom use should be better to use wcc and wlink instead of owcc driver, wlinker can specify output format without need to specify OS as with owcc
enable wlinker message 1008 because disabling it mask unavailable libraries, the issue is correctly resolved by wlink option nodefaultlibs which ignore OpenWatcom standard libraries which can be defined in linking modules, it is suppresed by -fnostdlib for C compiler, now -fnostdlib can be removed but it is not necessary
suppress use of INCLUDE environment variable by C compiler option -x, it ensure that no other path then command line for headers are used
suppress all headers printing by removing -v option and adding -q option to wlib