comp.lang.ada
 help / color / mirror / Atom feed
From: hebisch@math.uni.wroc.pl (Waldek Hebisch)
Subject: Re: Compilation induced constants in Ada code?
Date: 4 Jan 2003 19:50:53 GMT
Date: 2003-01-04T19:50:53+00:00	[thread overview]
Message-ID: <av7dut$d7p$1@panorama.wcss.wroc.pl> (raw)
In-Reply-To: pan.2003.01.03.11.12.02.464825@nospam.org

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 



  parent reply	other threads:[~2003-01-04 19:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-03 11:12 Compilation induced constants in Ada code? Per Dalgas Jakobsen
2003-01-03 22:34 ` Stephen Leake
2003-01-07 14:20   ` Ted Dennison
2003-01-04 19:50 ` Waldek Hebisch [this message]
2003-01-04 20:22   ` Per Dalgas Jakobsen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox