From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8ff8a403110109d8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-04 11:50:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!news.nask.pl!news.man.poznan.pl!pwr.wroc.pl!panorama.wcss.wroc.pl!hebisch From: hebisch@math.uni.wroc.pl (Waldek Hebisch) Newsgroups: comp.lang.ada Subject: Re: Compilation induced constants in Ada code? Date: 4 Jan 2003 19:50:53 GMT Organization: Politechnika Wroclawska Message-ID: References: NNTP-Posting-Host: hera.math.uni.wroc.pl X-Trace: panorama.wcss.wroc.pl 1041709853 13561 156.17.86.1 (4 Jan 2003 19:50:53 GMT) X-Complaints-To: abuse@news.pwr.wroc.pl NNTP-Posting-Date: 4 Jan 2003 19:50:53 GMT X-Newsreader: TIN [version 1.2 PL2] Xref: archiver1.google.com comp.lang.ada:32541 Date: 2003-01-04T19:50:53+00:00 List-Id: Per Dalgas Jakobsen (nospam@nospam.org) wrote: : Hi, : I'm trying to get gcc to compile more robust with Ada support. : At the moment it breaks if -suffix is used in builds (gcc becomes gcc-3.2 : or similar). : In make.adb the following line is declared: : Gcc : String_Access := Program_Name ("gcc"); : This causes gnatmake to look for gcc, not the suffixed version. : What will be considered a good solution to get the compilation of gnatmake : depend on a compiler-switch? : An obvious one: Patch make.adb to change the name just before compilation. A slight variation, but (IMHO) much cleaner: make a sparate package which exports needed constants, keep a template with the souces but generate correct version in object directory. However, one have to do more (mostly in makefiles & configure) to have things play really nicely: the GNU standard is that utilites should still work even if given different name. So one should really install gnat tools into gcc instal direstory and the installed programs should just invoke the real ones in privete directory. Easy to do with symlinks or shell scrips on Unix, but limits portablity to non Unix systems. Binary wrappers are probably more portable (given that GNAT/GCC need to invoke other programs anyway) but require more work. And most work will probably go into makefiles and configure scripts --- writing them is easy, but debugging is very time-consuming. -- Waldek Hebisch hebisch@math.uni.wroc.pl or hebisch@hera.math.uni.wroc.pl