Add anything specifying a threads library to ex_libs
authorRichard Levitte <levitte@openssl.org>
Mon, 22 Jan 2018 15:50:54 +0000 (16:50 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 23 Jan 2018 12:57:58 +0000 (13:57 +0100)
Even -pthread gets treated that way.  The reason to do this is so it
ends up in 'Libs.private' in libcrypto.pc.

Fixes #3884

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5135)

Configurations/10-main.conf

index dcf3902a7d7ba4f8d36940fc89820ed46b33c704..2a944ebfdb1263e0bfd99f7c9c7c4bf6b6d6d0ea 100644 (file)
@@ -204,6 +204,7 @@ sub vms_info {
                                               debug   => "-O0 -g",
                                               release => "-O3 -fomit-frame-pointer"),
                                        threads("-pthread")),
                                               debug   => "-O0 -g",
                                               release => "-O3 -fomit-frame-pointer"),
                                        threads("-pthread")),
+        ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG",
         shared_cflag     => "-fPIC",
         shared_ldflag    => "-shared -static-libgcc",
         bn_ops           => "BN_LLONG",
         shared_cflag     => "-fPIC",
         shared_ldflag    => "-shared -static-libgcc",
@@ -223,6 +224,7 @@ sub vms_info {
                                               debug   => "-O0 -g",
                                               release => "-O3"),
                                        threads("-pthread")),
                                               debug   => "-O0 -g",
                                               release => "-O3"),
                                        threads("-pthread")),
+        ex_libs          => add(threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         shared_cflag     => "-fPIC",
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         shared_cflag     => "-fPIC",
@@ -268,6 +270,7 @@ sub vms_info {
                                               debug   => "-O0 -g",
                                               release => "-O3"),
                                        threads("-pthread")),
                                               debug   => "-O0 -g",
                                               release => "-O3"),
                                        threads("-pthread")),
+        ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-fPIC",
         shared_ldflag    => "-shared",
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-fPIC",
         shared_ldflag    => "-shared",
@@ -432,7 +435,7 @@ sub vms_info {
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
-        ex_libs          => add("-Wl,+s -ldld"),
+        ex_libs          => add("-Wl,+s -ldld", threads("-pthread")),
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dl",
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dl",
@@ -551,7 +554,7 @@ sub vms_info {
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
-        ex_libs          => add("-ldl"),
+        ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
         bn_ops           => "SIXTY_FOUR_BIT",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
@@ -568,7 +571,7 @@ sub vms_info {
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
-        ex_libs          => add("-ldl"),
+        ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
@@ -599,7 +602,7 @@ sub vms_info {
         cc               => "gcc",
         cflags           => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3",
                                     threads("-pthread")),
         cc               => "gcc",
         cflags           => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3",
                                     threads("-pthread")),
-        ex_libs          => "-lrt",    # for mlock(2)
+        ex_libs          => add("-lrt", threads("-pthread")), # for mlock(2)
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
@@ -611,7 +614,7 @@ sub vms_info {
         cc               => "cc",
         cflags           => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings",
                                     threads("-pthread")),
         cc               => "cc",
         cflags           => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings",
                                     threads("-pthread")),
-        ex_libs          => "-lrt",    # for mlock(2)
+        ex_libs          => add("-lrt", threads("-pthread")), # for mlock(2)
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
@@ -632,7 +635,7 @@ sub vms_info {
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
                                            debug   => "-O0 -g",
                                            release => "-O3"),
                                     threads("-pthread")),
-        ex_libs          => add("-ldl"),
+        ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
         bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
@@ -1177,6 +1180,7 @@ sub vms_info {
                                            debug   => "-O0 -g",
                                            release => "-O"),
                                     threads("-pthread")),
                                            debug   => "-O0 -g",
                                            release => "-O"),
                                     threads("-pthread")),
+        ex_libs          => add(threads("-pthread")),
         sys_id           => "AIX",
         bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
         sys_id           => "AIX",
         bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -1194,6 +1198,7 @@ sub vms_info {
                                            debug   => "-O0 -g",
                                            release => "-O"),
                                     threads("-pthread")),
                                            debug   => "-O0 -g",
                                            release => "-O"),
                                     threads("-pthread")),
+        ex_libs          => add(threads("-pthread")),
         sys_id           => "AIX",
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         thread_scheme    => "pthreads",
         sys_id           => "AIX",
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -1647,7 +1652,7 @@ sub vms_info {
         cc               => "gcc",
         cflags           => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
                                     threads("-pthread")),
         cc               => "gcc",
         cflags           => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
                                     threads("-pthread")),
-        ex_libs          => add("-ldl"),
+        ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",