comp.lang.ada
 help / color / mirror / Atom feed
* Compilation induced constants in Ada code?
@ 2003-01-03 11:12 Per Dalgas Jakobsen
  2003-01-03 22:34 ` Stephen Leake
  2003-01-04 19:50 ` Waldek Hebisch
  0 siblings, 2 replies; 5+ messages in thread
From: Per Dalgas Jakobsen @ 2003-01-03 11:12 UTC (permalink / raw)


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.

Others?

Best regards
Per




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compilation induced constants in Ada code?
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Leake @ 2003-01-03 22:34 UTC (permalink / raw)


"Per Dalgas Jakobsen" <nospam@nospam.org> writes:

> 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.
> 
> Others?

There is a gnatmake command line switch to specify the compiler name;
you could turn usr/bin/gnatmake into a script, and set the command
line switch.

However, setting this kind of thing is what the Gnu configuration
process normally does in other Gnu tools. So I think the Right Thing
is to add a package gnat_names.ads, and have configure generate that,
and have make.adb use GNAT_Names.Gcc rather than a local variable.

That would require coordinating with ACT to get the change into their
releases.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compilation induced constants in Ada code?
  2003-01-03 11:12 Compilation induced constants in Ada code? Per Dalgas Jakobsen
  2003-01-03 22:34 ` Stephen Leake
@ 2003-01-04 19:50 ` Waldek Hebisch
  2003-01-04 20:22   ` Per Dalgas Jakobsen
  1 sibling, 1 reply; 5+ messages in thread
From: Waldek Hebisch @ 2003-01-04 19:50 UTC (permalink / raw)


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 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compilation induced constants in Ada code?
  2003-01-04 19:50 ` Waldek Hebisch
@ 2003-01-04 20:22   ` Per Dalgas Jakobsen
  0 siblings, 0 replies; 5+ messages in thread
From: Per Dalgas Jakobsen @ 2003-01-04 20:22 UTC (permalink / raw)


On Sat, 04 Jan 2003 19:50:53 +0000, Waldek Hebisch wrote:

>> 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. 

Yep, I came to that conclussion too - In fact I think I will try to extract
all the tool names to such a package, not just gcc. In that case, renaming
tools will not be that hard to do, if needed.


> 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.

That would be nice, but I'm not too keen to start fooling around to much
with the gcc build-scripts - Not just yet. Call me a wimp ;-)


> And most work will probably go into makefiles and configure scripts
> --- writing them is easy, but debugging is very time-consuming.

No kidding ;-)))
I have just had +3 days of very recent experience there :-)))

Thanks :)

Best regards
Per




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compilation induced constants in Ada code?
  2003-01-03 22:34 ` Stephen Leake
@ 2003-01-07 14:20   ` Ted Dennison
  0 siblings, 0 replies; 5+ messages in thread
From: Ted Dennison @ 2003-01-07 14:20 UTC (permalink / raw)


Stephen Leake <Stephen.A.Leake@nasa.gov> wrote in message news:<uy961981t.fsf@nasa.gov>...
> That would require coordinating with ACT to get the change into their
> releases.

These days I think the proper thing to do, unless you have an ACT
support agreement, would be to get your change put into the gcc
baseline.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-07 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2003-01-04 20:22   ` Per Dalgas Jakobsen

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