diff options
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/10-main.conf | 6 | ||||
-rw-r--r-- | Configurations/99-personal-ben.conf | 2 | ||||
-rw-r--r-- | Configurations/README | 46 |
3 files changed, 38 insertions, 16 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index e1c25c0209..c5c1424bdc 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1345,7 +1345,7 @@ release_cflags => "-O3", thread_cflag => "-D_REENTRANT", sys_id => "MACOSX", - lflags => "-Wl,-search_paths_first", + plib_lflags => "-Wl,-search_paths_first", bn_ops => "BN_LLONG RC4_CHAR", perlasm_scheme => "osx32", dso_scheme => "dlfcn", @@ -1498,7 +1498,7 @@ cc => "$ENV{'CC'}", cflags => "\$(CFLAGS)", thread_cflag => "-D_REENTRANT", - lflags => "\$(LDFLAGS)", + plib_lflags => "\$(LDFLAGS)", ex_libs => "\$(LDLIBS)", bn_ops => "BN_LLONG", dso_scheme => "$ENV{'LIBSSL_dlfcn'}", @@ -1512,7 +1512,7 @@ cc => "$ENV{'CC'}", cflags => "\$(CFLAGS)", thread_cflag => "-D_REENTRANT", - lflags => "\$(LDFLAGS)", + plib_lflags => "\$(LDFLAGS)", ex_libs => "\$(LDLIBS)", bn_ops => "SIXTY_FOUR_BIT_LONG", dso_scheme => "$ENV{'LIBSSL_dlfcn'}", diff --git a/Configurations/99-personal-ben.conf b/Configurations/99-personal-ben.conf index c445199bc5..01d8a2dffa 100644 --- a/Configurations/99-personal-ben.conf +++ b/Configurations/99-personal-ben.conf @@ -83,7 +83,7 @@ cflags => "$gcc_devteam_warn -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall", thread_cflag => "-D_REENTRANT", sys_id => "MACOSX", - lflags => "-Wl,-search_paths_first", + plib_lflags => "-Wl,-search_paths_first", bn_ops => "SIXTY_FOUR_BIT_LONG", perlasm_scheme => "macosx", dso_scheme => "dlfcn", diff --git a/Configurations/README b/Configurations/README index ecf2b7908b..fb94aa723e 100644 --- a/Configurations/README +++ b/Configurations/README @@ -39,25 +39,22 @@ In each table entry, the following keys are significant: compiling for shared libraries, typically something like "-fPIC". - ld => the linker command, usually not defined + (linking is a complex thing, see [3] below) + ld => Linker command, usually not defined (meaning the compiler command is used instead). (NOTE: this is here for future use, it's not implemented yet) - lflags => the flags that are used at all times when - linking. These can have a % sign in them - showing where the OpenSSL libraries should - appear, otherwise these flags will come - last. So in a typical links situation, - this is a quick table of results: - - "-foo%-bar" > -foo -lssl -lcrypto -bar - "-foo%" > -foo -lssl -lcrypto - "-foo" > -lssl -lcrypto -foo + lflags => Flags that are used when linking apps. + shared_ldflag => Flags that are used when linking shared + or dynamic libraries. + plib_lflags => Extra linking flags to appear just before + the libraries on the command line. + ex_libs => Extra libraries that are needed when + linking. debug_lflags => Like debug_cflags, but used when linking. release_lflags => Like release_cflags, but used when linking. - shared_lflags => Like shared_cflags, but used when linking. ar => The library archive command, the default is "ar". @@ -253,6 +250,31 @@ In each table entry, the following keys are significant: be "(unknown)", in which case the user MUST give some compilation flags to Configure. +[3] OpenSSL has three types of things to link from object files or + static libraries: + + - shared libraries; that would be libcrypto and libssl. + - shared objects (sometimes called dynamic libraries); that would + be the engines. + - applications; those are apps/openssl and all the test apps. + + Very roughly speaking, linking is done like this (words in braces + represent the configuration settings documented at the beginning + of this file): + + shared libraries: + {ld} $(CFLAGS) {shared_ldflag} -shared -o libfoo.so \ + -Wl,--whole-archive libfoo.a -Wl,--no-whole-archive \ + {plib_lflags} -lcrypto {ex_libs} + + shared objects: + {ld} $(CFLAGS) {shared_ldflag} -shared -o libeng.so \ + blah1.o blah2.o {plib_lflags} -lcrypto {ex_libs} + + applications: + {ld} $(CFLAGS) {lflags} -o app \ + app1.o utils.o {plib_lflags} -lssl -lcrypto {ex_libs} + Historically, the target configurations came in form of a string with values separated by colons. This use is deprecated. The string form |