Currently, the nettle Makefile creates two object files for each source file, .o for inclusion in the static library, and .po ("pure object") for the shared library. By default, both are compiled as pic code, but --disable-pic drops the pic flags when compiling the .o files, to get non-pic code into the static library.
I'm considering dropping this complication. Just build a single .o file, which is pic by default, and non-pic if --disable-pic is given.
To build a non-pic static library, one would configure with "--disable-pic --disable-shared" (since just --disable-pic would produce a shared library with non-pic code, which is highly undesirable). And to produce a static non-pic library and a shared pic library, one would need to use separate build trees.
Does that make sense? It would make things simpler, shorten build time, and eliminate the problem of naming two types of object files.
One might also have --disable-pic imply --disable-shared (unless explicitly overridden by the user).
Regards, /Niels
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Aloha!
Niels Möller wrote:
Does that make sense? It would make things simpler, shorten build time, and eliminate the problem of naming two types of object files.
Yes, makes sense. One type by default. Good idea.
- -- Med vänlig hälsning, Yours
Joachim Strömbergson - Alltid i harmonisk svängning. ======================================================================== Joachim Strömbergson Secworks AB joachim@secworks.se ========================================================================
nisse@lysator.liu.se (Niels Möller) writes:
Currently, the nettle Makefile creates two object files for each source file, .o for inclusion in the static library, and .po ("pure object") for the shared library. By default, both are compiled as pic code, but --disable-pic drops the pic flags when compiling the .o files, to get non-pic code into the static library.
I'm considering dropping this complication. Just build a single .o file, which is pic by default, and non-pic if --disable-pic is given.
Done now. No more .po object files.
I also reverted some .asm-related changes (which were done one early 2013, to fix problems with parallel make when each .asm file was transformed first to a preprocessed .s file and then to two separate .o and .po object files). This makes the rules simpler, and it also happens to work better with Solaris' make.
Regards, /Niels
nettle-bugs@lists.lysator.liu.se