[AWS] AWS on Mac OS X
Pascal Obry
pascal at obry.net
Thu Oct 25 22:27:56 CEST 2007
John,
> I've made some progress in building shared libraries for AWS on Mac
> OS X 10.4.10 using GNAT 4.3. As expected, the typical (unstriped)
> binary went from nearly 4MB to under 70KB. Several problems arose,
> and the proposed solutions require further refinement. As the matter
> interests both groups, I have taken the liberty of cross-posting. I
> would welcome discussion:
>
> 0. Set SHARED = true in makefile.conf.
>
> 1. Set SOEXT = .dylib for Darwin in makefile. [diff below]
This is not integrated.
> 2. The gcc option -fno-common is required. I put it in the Compiler's
> Global_Options in shared.gpr. I don't yet understand .gpr well enough
> to special case Darwin; can anyone offer guidance? [diff below]
Integrated.
I have added a new OS type for Darwin.
type OS_Type is ("UNIX", "Windows_NT", "Darwin");
OS : OS_Type := external ("OS", "UNIX");
Then in package Compiler, I have added the -fno-common option for Darwin.
case OS is
when "Darwin" =>
for Default_Switches ("Ada")
use Compiler'Default_Switches ("Ada") & ("-fno-common");
when others =>
null;
end case;
It means that to build on Darwin you have to set OS to Darwin:
$ make OS=Darwin ...
> 3. At several points, I had to manually copy the shared libs from the
> obj directory (where they had been built) to the corresponding lib
> directory:
>
> cp .build/release/ssl/obj/libaws_ssl.dylib .build/release/ssl/lib/.
> cp .build/release/include/obj/libaws_include.dylib .build/release/
> include/lib/.
> cp .build/release/obj/libaws.dylib .build/release/lib/.
Probably worth a report to AdaCore. Looks like the .dylib are not
properly copied as it is done for .so and .dll!
> 5. Building the documentation depends on unicode.ads:
>
> export ADA_INCLUDE_PATH=/opt/gtk/include/gtkada
To build the documentation without building all of AWS you can do:
$ make -C docs build_doc
Thanks for your feedbacks on building AWS on Darwin.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
More information about the AWS
mailing list