diff options
author | David Carlier <devnexen@gmail.com> | 2020-12-19 11:07:09 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-01-20 11:04:50 +0000 |
commit | c3bd630df0c3630c66155fb8c4baf54810d24695 (patch) | |
tree | bb508cc22f4d94cb6e26a033f8961983a10c212f /Configurations | |
parent | c9466f38e0191aa86e0bd49267b0c4ef33e3a3d2 (diff) |
Adding a separated build settings for BSD flavors
to avoid inheriting Linux's linker flags (ie -Wl,-z,defs)
now targetting OpenBSD.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13393)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/10-main.conf | 75 | ||||
-rw-r--r-- | Configurations/shared-info.pl | 6 |
2 files changed, 81 insertions, 0 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 32ef7780fb..c42902cf39 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1168,6 +1168,81 @@ my %targets = ( shared_target => "bsd-gcc-shared", shared_cflag => "-fPIC", }, +#### *BSD-nodef + "BSD-nodef-generic32" => { + # As for thread cflag. Idea is to maintain "collective" set of + # flags, which would cover all BSD flavors. -pthread applies + # to them all, but is treated differently. OpenBSD expands is + # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x + # expands it as -lc_r, which has to be accompanied by explicit + # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x + # expands it as -lc_r, which seems to be sufficient? + inherit_from => [ "BASE_unix" ], + CC => "cc", + CFLAGS => picker(default => "-Wall", + debug => "-O0 -g", + release => "-O3"), + cflags => threads("-pthread"), + cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"), + ex_libs => add(threads("-pthread")), + enable => add("devcryptoeng"), + bn_ops => "BN_LLONG", + thread_scheme => "pthreads", + dso_scheme => "dlfcn", + shared_target => "bsd-gcc-nodef-shared", + shared_cflag => "-fPIC", + }, + "BSD-nodef-generic64" => { + inherit_from => [ "BSD-nodef-generic32" ], + bn_ops => "SIXTY_FOUR_BIT_LONG", + }, + + "BSD-nodef-x86" => { + inherit_from => [ "BSD-nodef-generic32" ], + CFLAGS => add(picker(release => "-fomit-frame-pointer")), + lib_cppflags => add("-DL_ENDIAN"), + bn_ops => "BN_LLONG", + asm_arch => 'x86', + perlasm_scheme => "a.out", + }, + "BSD-nodef-x86-elf" => { + inherit_from => [ "BSD-nodef-x86" ], + perlasm_scheme => "elf", + }, + + "BSD-nodef-sparcv8" => { + inherit_from => [ "BSD-nodef-generic32" ], + cflags => add("-mcpu=v8"), + lib_cppflags => add("-DB_ENDIAN"), + asm_arch => 'sparcv8', + perlasm_scheme => 'void', + }, + "BSD-nodef-sparc64" => { + # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it + # simply *happens* to work around a compiler bug in gcc 3.3.3, + # triggered by RIPEMD160 code. + inherit_from => [ "BSD-nodef-generic64" ], + lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"), + bn_ops => "BN_LLONG", + asm_arch => 'sparcv9', + perlasm_scheme => 'void', + }, + + "BSD-nodef-ia64" => { + inherit_from => [ "BSD-nodef-generic64" ], + lib_cppflags => add("-DL_ENDIAN"), + bn_ops => "SIXTY_FOUR_BIT_LONG", + asm_arch => 'ia64', + perlasm_scheme => 'void', + }, + + "BSD-nodef-x86_64" => { + inherit_from => [ "BSD-nodef-generic64" ], + lib_cppflags => add("-DL_ENDIAN"), + bn_ops => "SIXTY_FOUR_BIT_LONG", + asm_arch => 'x86_64', + perlasm_scheme => "elf", + }, #### SCO/Caldera targets. # diff --git a/Configurations/shared-info.pl b/Configurations/shared-info.pl index edd16f4055..0bded76d89 100644 --- a/Configurations/shared-info.pl +++ b/Configurations/shared-info.pl @@ -40,6 +40,12 @@ my %shared_info; }; }, 'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; }, + 'bsd-gcc-nodef-shared' => sub { + return { + %{$shared_info{'gnu-shared'}}, + shared_defflags => '-Wl,--version-script=', + }; + }, 'darwin-shared' => { module_ldflags => '-bundle', shared_ldflag => '-dynamiclib -current_version $(SHLIB_VERSION_NUMBER) -compatibility_version $(SHLIB_VERSION_NUMBER)', |