Changeset 225


Ignore:
Timestamp:
Nov 9, 2017, 11:25:56 PM (8 years ago)
Author:
Ben Rietbroek
Message:

Work around a weird code-generation issue [v1.1.3-testing]

Using the 'wcc386' '-ol' flag can result in the generation of different
code, depending on the length of the source-path.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.2-manual.pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/os2/setaboot/Makefile

    r182 r225  
    104104MM16=-ml
    105105CC16=wcc
    106 CC16_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) $(%CC_DEFINES) -w4 -e25 -zq -otexan -fo=$^. -fr=$^&.err
     106CC16_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) $(%CC_DEFINES) -w4 -e25 -zq -otebmieran -fo=$^. -fr=$^&.err
     107#~ CC16_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) $(%CC_DEFINES) -w4 -e25 -zq -otexan -fo=$^. -fr=$^&.err
    107108CC16_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) $(%CC_DEFINES) -d2 -w4 -e25 -zq -od -fo=$^. -fr=$^&.err
    108109CC16_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) $(%CC_DEFINES) -d3 -w4 -e25 -zq -od -fo=$^. -fr=$^&.err
     
    114115MM32=-mf
    115116CC32=wcc386
    116 CC32_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) $(%CC_DEFINES) -w4 -e25 -zq -otexan -6r -fo=$^. -fr=$^&.err
     117# rousseau.comment.201711092035 :: -ol optimization generates inconsistent code
     118# It was already observed that building on Linux could generate different code
     119# as when building on OS/2, so releases were always built on OS/2.
     120# Lately, however, different code generation was also observed between building
     121# on a local drive and on a network drive, both under OS/2. But is was not the
     122# local or remote nature of the drive, but it seemed like the length of the
     123# path to the sources played a role. Doing two builds on a local drive on OS/2,
     124# one with a short path and one with a longer path generated substantially
     125# different (prolog / indexing) code at specific locations. The one used a
     126# combination of 'mov' and 'add' while the other used 'lea'.
     127#
     128# This has been tracked down to the wcc386 -ol (enable loop optimizations)
     129# flag, which is part of -ox, which is short for -obmiler -s.
     130# So the new flags replace -ox with -obmier and since we actually do want
     131# stack overflow checking (-s), this flag is not re-added.
     132#
     133# Now MD5SUMS are the same again, even when building on Linux.
     134# This requires further investigation and a cross-check against v1.9+ versions
     135# of Open Watcom.
     136CC32_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) $(%CC_DEFINES) -w4 -e25 -zq -otebmieran -6r -fo=$^. -fr=$^&.err
     137#~ CC32_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) $(%CC_DEFINES) -w4 -e25 -zq -otexan -6r -fo=$^. -fr=$^&.err
    117138CC32_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) $(%CC_DEFINES) -d2 -w4 -e25 -zq -od -6r -fo=$^. -fr=$^&.err
    118139CC32_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) $(%CC_DEFINES) -d3 -w4 -e25 -zq -od -6r -fo=$^. -fr=$^&.err
Note: See TracChangeset for help on using the changeset viewer.