Honor configure CC= CXX=

Issue #303 resolved
Dan Bonachea created an issue

On develop @ d2282f4

../upcxx/configure CC=icc CXX=icpc
Fetching https://gasnet-bugs.lbl.gov/nightly/unlisted/GASNet-stable.tar.gz
Unpacking /home/pcp1/bonachea/UPC/bxx-icc/bld/GASNet-stable.tar.gz

System: Linux pcp-d-5 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 15 08:36:44 CDT 2017 x86_64 x86_64 x86_64 GNU/Linux
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: Scientific
Description:    Scientific Linux release 7.3 (Nitrogen)
Release:        7.3
Codename:       Nitrogen

Date: Wed Jan 29 16:03:37 PST 2020
Current directory: /home/pcp1/bonachea/UPC/bxx-icc
Install directory: /usr/local/upcxx
Settings: GASNET='/home/pcp1/bonachea/UPC/bxx-icc/bld/GASNet-stable' GASNET_CONFIGURE_ARGS='"CC=icc" "CXX=icpc"'


/usr/local/pkg/gcc/9.2.0/bin/g++
g++ (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/usr/local/pkg/gcc/9.2.0/bin/gcc
gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Note the CC and CXX arguments are ignored by UPC++ configure, but will be passed to and honored by GASNet configure, resulting in surprising behavior (the diagnostic output does not match the compiler GEX will actually use) and possibly brokenness (because UPC++ has cached wildly incorrect values of CONFIG_CC/CXX).

CC and CXX should be honored as aliases for --with-cc and --with-cxx to prevent this problem

Comments (5)

  1. Paul Hargrove

    Do we believe there is any benefit to supporting on-command-line setting of the legacy UPC++ (non-GASNet) env vars such as CROSS, and GASNET?

    I have mixed feelings:
    PRO: more-consistent (thus less error-prone) behavior
    CON: broken behavior could be a "feature" to discourage use of the legacy env vars

  2. Dan Bonachea reporter

    CROSS and GASNET have never been accepted on any configure line for our software, so I don't see any reason to add them.

    I'm fine special casing just CC and CXX, because it is accepted by GASNet configure, and more importantly, by all autoconf configure scripts. Ie users accustomed to autoconf configure scripts will expect this to work. This is why I consider the current behavior a bug.

  3. Paul Hargrove

    The "by all autoconf configure scripts" is exactly why I fear our users could expect CROSS and GASNET to work on the command line. However, I am fine with recognizing only CC and CXX for now.

  4. Log in to comment