Date: Thu, 04 Jul 2002 17:00:17 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Jan Lentfer <Jan.Lentfer@web.de> Cc: freebsd-alpha@freebsd.org Subject: [PATCH] Re: List of ports that can be compiled with compaq-cc Message-ID: <3D24E191.7E4864B1@mindspring.com> References: <3D21F1C8.2010708@web.de> <15650.6127.427432.57976@grasshopper.cs.duke.edu> <3D22188C.2000603@web.de> <3D222E25.62D5E4D0@mindspring.com> <3D222EF3.8070700@web.de> <3D223E91.A71CC743@mindspring.com> <3D224716.901@web.de> <3D2256E7.596D91F9@mindspring.com> <3D225B13.7000004@web.de> <3D22635F.A01A6ED8@mindspring.com> <1025781382.2848.25.camel@jan-linnb.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------2841EAEF1E40F193604034D9 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jan Lentfer wrote: > Hi Terry, > > first off, I think I'll have to excuse for the last mail I sent, it was > mostly based on a fundamental misunderstanding on my site (and being a > little stressed out because of diploma exams ahead), I think. I'm known to exhibit excess enthusiasm. 8-). I jumped in so forcefully because I really liked your base idea -- getting everything (that could be) compiled with the Compaq compiler. > What you wrote above actually is what I would like to have and what I > would like to contribute to. I didn't mean to have "a list just for me" > - at the time of posting my email, in my thoughts was an interactive, > public accessible list where people can write down what ports they > successfully build using the compaq-cc. Of course, integrating such a > thing into the ports system is by far the better approach. But from my > hazy formulation you can guess that I do understand by far too little > about the ports-system and how this could be integrated into it. Thus, I > came up with the idea of such a list, because from my knowledge at that > time it was the only obvious way in my eyes. Not knowing fundamentals > makes you choose the wrong way, I guess. The BSD ports system has a pretty serious barrier to entry, particularly if you are trying to wire something into an area as fundamental as compiler choice. Which version of FreeBSD are you running? Here are baseline patches for your /usr/ports/Mk/bsd.port.mk, taken against the RELEASE_4_5_0 ports collection. I don't think there are significant changes vs. 4.6. They only modify the C compiler, not the C++ or FORTRAN, etc.; if that's included with the Compaq compiler (too big for my poor modem for me to check, at this time), then you may also need to set the CXX and uncomment the two lines in the patch. -- In order for this to work, you can set things in the Makefile for the specific port, globally (good only for testing, mostly), etc.. Here are the knobs: PREFER_COMPAQ_CC= yes This prefers the Compaq C compiler, only if it's installed. If it's not installed, then it falls back to the default compiler; otherwise it sets USE_COMPAQ_CC. I don't know if this will actually work; see the patch for the test for where the compiler is supposedly installed. If it's actually installed there, then this will work; otherwise, the patch will need to be tweaked USE_COMPAQ_CC= yes This forces the use of the Compaq C compiler. If it's not installed, it will install it for you. The port will not proceed without the Compaq C compiler installed successfully. This doesn't reference any paths I'm not sure of for your version of FreeBSD, and will *always* work (but the compiler might not, for a particular port ;^)). -- My recommendation would be to verify that the knobs work by setting them globally in the /etc/make.conf, and try rebuilding a port (e.g. your "bash"). If they work, then we should probably ask someone to commit the changes (I am only unsure of the "PREFER"). For individual ports, I think that things should start with the port Makefile having only: PREFER_COMPAQ_CC= yes People might get upset when they try to install some small program, and end up having to install the entire Compaq C compiler. For really complex ports that just won't work well (or at all) without the Compaq compiler, then putting: USE_COMPAQ_CC= yes in the port Makefile is probably OK. Let me know if you have any problems with the patch working as advertised. -- Terry --------------2841EAEF1E40F193604034D9 Content-Type: text/plain; charset=us-ascii; name="compaq.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="compaq.diff" Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v retrieving revision 1.397 diff -c -r1.397 bsd.port.mk *** bsd.port.mk 24 Jan 2002 01:15:03 -0000 1.397 --- bsd.port.mk 4 Jul 2002 23:56:01 -0000 *************** *** 140,145 **** --- 140,149 ---- # the system or installed from a port. # USE_GCC30 - Says that the port requires this version of gcc, either in # the system or installed from a port. + # PREFER_COMPAQ_CC - Set USE_COMPAQ_CC if it is installed, otherwise + # use the default compiler instead. + # USE_COMPAQ_CC - Says that the port requires the Compaq C compiler, + # either in the system or installed from a port. # USE_GMAKE - Says that the port uses gmake. # GMAKE - Set to path of GNU make if not in $PATH (default: gmake). # USE_AUTOMAKE - Says that the port uses automake. Implies *************** *** 915,920 **** --- 919,934 ---- CXX= g++30 BUILD_DEPENDS+= gcc30:${PORTSDIR}/lang/gcc30 MAKE_ENV+= CC=${CC} CXX=${CXX} + .endif + .if exists((${LOCALBASE}/bin/ccc( && defined(PREFER_COMPAQ_CC) + USE_COMPAQ_CC= yes + .endif + .if defined(USE_COMPAQ_CC) && (${MACHINE_ARCH} == "alpha") + CC= ccc + # CXX= ccc + BUILD_DEPENDS+= ccc:${PORTSDIR}/lang/compaq-cc + MAKE_ENV+= CC=${CC} + # MAKE_ENV+= CXX=${CXX} .endif .if defined(USE_LINUX) --------------2841EAEF1E40F193604034D9-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D24E191.7E4864B1>