Issue 127664 - move $CCNUMVER from dmake to configure
Summary: move $CCNUMVER from dmake to configure
Status: RESOLVED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: configure (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-18 07:16 UTC by Don Lewis
Modified: 2018-03-21 20:23 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch to move $CCNUMVER from dmake to configure (17.95 KB, patch)
2018-01-18 07:16 UTC, Don Lewis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Don Lewis 2018-01-18 07:16:07 UTC
Created attachment 86325 [details]
patch to move $CCNUMVER from dmake to configure

The attached patch moves the calculation of $CCNUMVER and some other
variables from main/solenv/inc/tg_compv.mk, where it is only usable by
dmake, to configure, where it can be used by both dmake and gbuild. This
is a requirement for me upstream some compiler bug workaround patches
from the FreeBSD port.

A bit of logic from set_soenv is also moved into configure.  A bunch
more should probably be moved so that the configuration logic is not
spread across so many different places, but that can wait.  Something
else to consider is that it would be nice to use a different value of
$COM for Apple's clang, maybe "ACLANG" or "APPLECLANG" since it  has a
different version numbering scheme that the open-source version of clang
and having a unique identifier would simplify version checking when
applying compiler bug workarounds.

I've tested this patch on Windows, CentOS 6, and FreeBSD.  It really
needs some testing on Mac and OS/2.

If you have an existing, populated build tree, then the most important
tests can be done without even doing a build.  Start off by copying the
*env.set.sh script and solver/420/*/inc/comp_ver.mk to a safe location.
Next apply the patch below, run autoconf, and then run configure.
Compare the values of $COMNAME, $COMID, $CCNUMVER, and $CCVER from the
new *.env.set.sh with the values of those variables from the saved copy
of comp_ver.mk.  Also compare the values of $COM in the new and saved
versions of *.env.set.sh.

Note: I think the old value of $CCNUMVER on the Mac is wrong.  It should
look something like 000800010000 or 000700030000, depending on the
installed version.

Note that I changed -DCPPU_ENV on the Mac from $(COMID) to $(COMNAME)
for consistency with the dmake side.  It shouldn't make a difference in
practice since both have the same value on the Mac.

If things look good, then please try a build with this patch.
Comment 1 Kay 2018-01-19 15:57:01 UTC
Applied patch to r1821262 on CentOS6.9-32 bit. Rebuilt after applying with no issues so far. Not tested on the targeted platforms of MacOS or OS/2.

A couple of warnings from svn patch when patching at r1821262 --

U         main/configure.ac
U         main/set_soenv.in
U         main/solenv/gbuild/platform/freebsd.mk
U         main/solenv/gbuild/platform/linux.mk
U         main/solenv/gbuild/platform/macosx.mk
U         main/solenv/gbuild/platform/os2.mk
U         main/solenv/gbuild/platform/solaris.mk
U         main/solenv/gbuild/platform/windows.mk
U         main/solenv/gbuild/platform/winmingw.mk
G         main/solenv/inc/settings.mk
>         hunk @@ -878,7 +878,7 @@ already applied
>         hunk @@ -1068,11 +1068,6 @@ already applied
D         main/solenv/inc/tg_compv.mk

but other than that, all OK.
Comment 2 SVN Robot 2018-03-09 04:22:20 UTC
"truckman" committed SVN revision 1826296 into trunk:
#127664# $CCNUMVER from dmake to configure
Comment 3 Don Lewis 2018-03-09 04:25:36 UTC
Patch committed.