# 
#     Copyright (c) 2017-2018, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
# 

# Compiler Configurations for C++, GNU compatibility
#
set DEFLANGSTDLIB=stdc++;
set DEFCPPLIB=;
# no -lgcc or -lgcc_s for ZCLIBS : it comes later, and is regulated by -Bstatic
#--eh-frame-hdr regulated by EHFRAME
set ZCLIBS= $PGISTATICX $PGATM $PGIUNSTATICX ;
# set ZCLIBS=$PGATM ;
set NORMALSTDLIB=stdc++;
# can not debug with this: variable NEWPP2 is default(-x 123 0x400);
variable NEWPP2 is default();
append CPP2ARGS=$(NEWPP2);

append CPP2ARGS=-x 123 0x400;
set DEF_GNU_SOURCE=$ifn($DONT_USE_GNU_SOURCE,_GNU_SOURCE);
set DEF_PGCG_SOURCE=_PGCG_SOURCE;
set DEFCCOMPDIR=$COMPBIN;
set DEFCPPINCSUFF=;

##########################################################################
# Copied from ccllvmrc  (can't use ccllvmrc because of stdarg/vararg
##########################################################################


replace switch -c is
        help(Stop after assemble; output in object file)
        helpgroup(overall)
        set(KEEPOBJ=YES)
        set(ASMONLY=YES)
        set(DEFOUTFILE=)
        stopafter(Compile)
        ;
##########################################################################
# End Copied from pgccllvmrc 
##########################################################################

replace switch -S is
        help(Stop before assembling; output in .s file)
        helpgroup(overall)
        set(KEEPASM=YES)
        set(LLVMASMONLY=YES)
        set(DEFOUTFILE=)
        set(COMPILEONLY=YES)
        stopafter(Compile)
        ;

