[gtkada] improvements to the GtkAda build system
Björn Persson
bjorn at xn--rombobjrn-67a.se
Mon Feb 28 03:24:14 CET 2011
Arnaud Charlet wrote:
> - please provide a changelog for each patch
You mean a log message to be provided to Subversion? OK. How about these?
· Add the Debuginfo build type, to build production libraries but include
debugging information.
· Link sublibraries to the main library.
· Add an option to disable building of static libraries.
· Improve the configuration help text to clarify what --enable-shared does.
> - only a patch that applies to the svn trunk can be integrated, so better
> to start from the trunk right away
Those patches did apply to the trunk when I sent them. An hour later, two of
them no longer did. :-) I'm attaching updated patches.
> I do not really like adding the Debuginfo mode which is pretty special
> cased for your own need.
It's not really my own need, it's the Fedora project's need. It is of course
your choice to add the Debuginfo mode or not. If you don't, I'll keep it as a
patch in the Fedora package or find another way to do this.
> I believe the same can be achieved on the command line already: use
> --enable-build=Debug at configure time
> and then use
> make GNATMAKE="gnatmake -O2 -gnatn"
>
> You'll get -g and no strip as you need, and -O2 -gnatn if you want full
> optimization, achieving basically the same effect, with no patch.
I'd also get -gnatwae -gnatay. If my memory serves me, it was -gnatwae that
caused the build to fail when GCC in Fedora was upgraded to 4.5 and some new
warning was introduced. That was what caused me to stop using the Debug mode
and implement the Debuginfo mode.
If I don't keep the Debuginfo mode, I think I prefer to configure as Production
and add -g on the command line.
> Can you remind me on which platform/context the GTKADA_LIBS changes are
> needed? These changes look OK on principle.
The Fedora project tries to ensure that each program and each shared library
packaged for Fedora is linked to all the shared libraries it uses directly,
and not to any libraries that it doesn't use directly. For example,
libgnomeada-2.14.so.0 references symbols that are defined in
libgtkada-2.14.so.0, so it should contain a DT_NEEDED entry stating that it
needs libgtkada-2.14.so.0, but it didn't. This missing dependency between
shared library files caused a similar missing dependency between RPM packages,
which caused the GtkAda packages to appear in this list:
http://lists.fedoraproject.org/pipermail/devel/2010-July/138487.html
The linking patch adds the missing DT_NEEDED entry to the sublibraries, which
in turn causes the RPM subpackages to depend on the main package as they
should.
On the other hand, both libgtkada and the sublibraries contain a lot of
unnecessary DT_NEEDED entries for libraries that they don't actually use.
Those are added by a long list of linker parameters emitted by the command
"pkg-config gtk+-2.0 --libs". This should probably also be addressed. I think
the linker option --as-needed could be used, but I don't have a patch for that
yet. This linking patch is at least a start.
> 'default installation default' is kind of redundant, would be good
> to find a better wording.
It's not really redundant but I agree that it sounds funny. How about writing
"preselected" instead of "installation default"? Something like this maybe:
"Build shared libraries if supported on the target and make them preselected
in project files. (By default static libraries are preselected when both kinds
are built.)"
Björn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GtkAda-trunk-linking2.patch
Type: text/x-patch
Size: 1134 bytes
Desc: not available
Url : /pipermail/gtkada/attachments/20110228/20f94900/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GtkAda-trunk-disable-static2.patch
Type: text/x-patch
Size: 4344 bytes
Desc: not available
Url : /pipermail/gtkada/attachments/20110228/20f94900/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : /pipermail/gtkada/attachments/20110228/20f94900/attachment.pgp
More information about the gtkada
mailing list