Yup, this did exactly what I needed. -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Richard Way Sent: Friday, April 30, 2021 9:06 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to specify logical SYSLIB when linking with xclang++ under uss
Thanks! I believe this is exactly what I need to do, and in fact I had an edit session going on a config customization for syslib_x when I spotted your reply! Much appreciated. -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of David Crayford Sent: Thursday, April 29, 2021 5:46 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to specify logical SYSLIB when linking with xclang++ under uss I would use a configuration file. Copy /usr/lpp/cbclib/xlclang/etc/xlclang.cfg into one of your directories and either set the XL_CONFIG environment variable or include it with the -F compiler option. Add your data set to the syslib_x concatenation. VIEW /RZ204Y/usr/lpp/cbclib/xlclang/etc/xlclang.cfg Command ===> ****** ********************************************************************* Top of Data ****************************************** 000001 * 000002 * FUNCTION: z/OS V2.4.1 XL C/C++ Compiler Configuration file 000003 * 000004 * Licensed Materials - Property of IBM 000005 * 5650-ZOS Copyright IBM Corp. 2019. 000006 * US Government Users Restricted Rights - Use, duplication or 000007 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 000008 * 000009 000010 * Clang C compiler 000011 clang: use = DEFLT 000012 000013 * Clang C++ compiler 000014 clang++: use = DEFLT 000015 options = -D_XOPEN_SOURCE=600,-D__static_assert=static_assert,-Wno-parentheses,-Wno-unused-value 000016 000017 * common definitions 000018 DEFLT: cppcomp = /usr/lpp/cbclib/xlclang/exe/clcdrvr 000019 ccomp = /usr/lpp/cbclib/xlclang/exe/clcdrvr 000020 as = /bin/c89 000021 ld_c = /bin/c89 000022 ld_cpp = /bin/cxx 000023 xlC = /usr/lpp/cbclib/xlclang/bin/xlclang 000024 xlCcopt = -D_XOPEN_SOURCE 000025 sysobj = cee.sceeobj:cee.sceecpp 000026 syslib_x = cee.sceebnd2:sys1.csslib 000027 exportlist_c_x = cee.sceelib(celhs003,celhs001) 000028 exportlist_cpp_x = cee.sceelib(celhs003,celhs001,celhscpp) 000029 exportlist_c_64 = cee.sceelib(celqs003) 000030 exportlist_cpp_64 = cee.sceelib(celqs003,celqscpp,cxxrt64) 000031 cinc = -isystem/usr/include/le 000032 cppinc = -isystem/usr/include/c++ 000033 options = -D_UNIX03_WITHDRAWN,-L/usr/lpp/cbclib/lib 000034 libraries = -libmcmp 000035 steplib = cbc.sclccmp ****** ******************************************************************** Bottom of Data **************************************** On 29/04/2021 3:23 am, Richard Way wrote: > I don't know how the xclang++ line got mangled, but it's really just one line > - NOT three invocations of xclang++! > > Guessing it's something about the ++ and the listserv, let's try it again > substituting "FRED" for "xclang++" > > FRED -v -Wl,MAP,LIST=ALL,XREF -obin/zprotect > obj/zprotect/zprotect.cpp.o lib/libsapi.a lib/libvtk-core.a > /usr/lib/GSKCMS64.x /usr/lib/GSKSSL64.x > > Rich Way > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > On Behalf Of Richard Way > Sent: Wednesday, April 28, 2021 11:51 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: How to specify logical SYSLIB when linking with xclang++ > under uss > > I am having a problem using xlclang++ to link my program on uss. I have > unresolved references, but I actually know where the modules that are needed > are located - I am just unable to express that information to the binder. > As an example, CSNERNG is located in "CSF.SCSFMOD0", but isn't found because > the default SYSLIB is just the concatenation of CEE.SCEEBND2 with > SYS1.CSSLIB. I need to logically add CSF.SCSFMOD0 to that concatenation. > > I discovered that with the '-v' switch, I can get xlclang++ to emit > both the pseudo-JCL it would use and the "export"s of environment > variables, and, from that output, I discovered that the variable > _CXX_L6SYSLIB is what I supposedly need to set - but setting it and > exporting it prior to issuing my make command doesn't have any effect > - the unresolved reference still occurs, and the generated pseudo-JCL > does not include my addition to the concatenation. (BTW the Unix > System Services Command Reference confirms that _CXX_L6SYSLIB is the > correct variable for an lp64 invocation.) > > The command that I am using for the link is: > xlclang++ -v -Wl,MAP,LIST=ALL,XREF -obin/zprotect > xlclang++ obj/zprotect/zprotect.cpp.o lib/libsapi.a lib/libvtk-core.a > xlclang++ /usr/lib/GSKCMS64.x /usr/lib/GSKSSL64.x > > The export I am doing first is: > export _CXX_L6SYSLIB=CEE.SCEEBND2:SYS1.CSSLIB:CSF.SCSFMOD0 > > and yet my generated pseudo-JCL is still: > ... > //LINKEDIT EXEC PGM=LINKEDIT, > // PARM='AMODE=64,TERM=YES, > // DYNAM=DLL,ALIASES=NO,UPCASE=NO, > // LIST=OFF,MAP=NO,XREF=NO,INFO=NO,MSGLEVEL=4, > // REUS=RENT,EDIT=YES,AC=0,CALL=YES,CASE=MIXED > // ,MAP,LIST=ALL,XREF > // ,LP64' > //SYSLIB DD DSN='CEE.SCEEBND2',DISP=SHR,DCB=DSORG=DIR > // DD DSN='SYS1.CSSLIB',DISP=SHR,DCB=DSORG=DIR <==note missing > CSF.SCSFMOD0 concatenation attempt here. > ... > > Any thoughts or ideas on what I could try next? > > Thanks > > Rich Way, CISSP > Security Lead, Voltage Portfolio > Micro Focus > 4555 Great America Parkway > Santa Clara, CA 95054 > +1 408 857 0216 > richard....@microfocus.com<mailto:richard....@microfocus.com> > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN