From: Simon Wright <simon@pushface.org>
Subject: Re: Licensing Paranoia and Manual Compilation Issues
Date: Tue, 11 Dec 2018 16:11:48 +0000
Date: 2018-12-11T16:11:48+00:00 [thread overview]
Message-ID: <lytvjkkpq3.fsf@pushface.org> (raw)
In-Reply-To: 6bee0ed3-c298-45c9-81b0-92cc90a1f2c6@googlegroups.com
Let me start by saying that I'm not a lawyer.
alexander@junivörs.com writes:
> 1. ```As for the compiler build provided by (the GetAdaNow Mac OS X
> section's link to Sourceforge)[1]; which parts of that GCC build for
> compiling Ada can you safely use and still be covered by the "GCC
> Runtime Library Exception"? I can see it states you can use `GNATCOLL`
> and `XMLAda`. I'm assuming the standard library is included as
> well. Can you on the other hand use all console commands? `gnat
> <command>`? `gprbuild`? Or would these inject "non-runtime library
> exception'd" GPL code into the executable?```
They may (do) *generate* source code that gets included in the
executable (gnatbind does this). But that isn't code that's provided
with the compiler and might have a copyright issue; it's no different in
principle from object code generated directly by the compiler.
> 2. ```I've been attempting to compile and link some code through the
> use of the `gcc` command solely, but haven't been successful in doing
> so. I have, on the other hand, been able to successfully generate an
> executable by utilizing the `gnatbind` and `gnatlink` commands
> consecutively after compiling with `gcc -c <file>`. Is it possible to
> use only the `gcc` command for the matter, or do you need to also
> throw in a few calls to the `gnat` commands?
>
> When executing the following commands... $ gcc -c src/main.adb -o
> obj/main.o $ gcc -o main obj/main.o
>
> I wind up with the following error (on the second command, which
> should be a GCC link): Undefined symbols for architecture x86_64:
> "_main", referenced from: implicit entry/start for main executable
> (maybe you meant: __ada_main) ld: symbol(s) not found for architecture
> x86_64 collect2: error: ld returned 1 exit status
>
> A similar error occurs when I attempt to create `.so` libraries
> manually using the `-shared` compiler switch. With all that being
> said, is it simply not possible to do these things through solely
> `gcc`, or am I missing something?```
Building even hello_world* is sufficiently complex that you need
gnatbind, gnatlink. As you've seen, you can use gcc for the actual
compilation.
Building a dynamic library (do you mean .so? are you on a Mac or Linux?
You mention my darwin 8.1.0 release) is more so.
To see what gnatbind gets up to while doing its work, look at the b__*
(or b~*) files it generates. Not much fun or point in generating those
by hand.
* You can build a simple null program for an embedded system on an MCU
without gnatbind, gnatlink. But you have to bother about storage
mappings, prcessor startup, linker scripts etc instead.
next prev parent reply other threads:[~2018-12-11 16:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 11:46 Licensing Paranoia and Manual Compilation Issues alexander
2018-12-11 16:11 ` Simon Wright [this message]
2018-12-11 16:31 ` Lucretia
2018-12-11 19:21 ` Simon Wright
2018-12-11 20:50 ` alexander
2018-12-11 23:45 ` Simon Wright
2018-12-12 9:34 ` alexander
2018-12-12 17:44 ` Simon Wright
2018-12-13 9:21 ` Björn Lundin
2018-12-13 10:30 ` alexander
2018-12-13 10:32 ` alexander
2018-12-11 18:50 ` G. B.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox