Make use of add() and add_before() in Configurations/
[openssl.git] / Configurations / 10-main.conf
index ff115be33196929ef3a62b8154f91c315af7162a..929e79e8dac0cd3e0cd02b8848787cbc20b0228b 100644 (file)
         # with "Illegal mnemonic" error message.
         inherit_from     => [ "solaris-common", asm("x86_elf_asm") ],
         cc               => "gcc",
-        cflags           => sub { join(" ","-march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",@_) },
+        cflags           => add_before("-march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM"),
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3 -fomit-frame-pointer",
         thread_cflag     => "-pthread",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         shared_cflag     => "-fPIC",
         shared_ldflag    => "-shared",
     },
@@ -72,7 +72,7 @@
         #                                      <appro@fy.chalmers.se>
         inherit_from     => [ "solaris-common", asm("x86_64_asm") ],
         cc               => "gcc",
-        cflags           => sub { join(" ","-m64 -Wall -DL_ENDIAN",@_) },
+        cflags           => add_before("-m64 -Wall -DL_ENDIAN"),
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3",
         thread_cflag     => "-pthread",
     "solaris-x86-cc" => {
         inherit_from     => [ "solaris-common" ],
         cc               => "cc",
-        cflags           => sub { join(" ","-xarch=generic -xstrconst -Xa -DL_ENDIAN",@_) },
+        cflags           => add_before("-xarch=generic -xstrconst -Xa -DL_ENDIAN"),
         debug_cflags     => "-g",
         release_cflags   => "-xO5 -xregs=frameptr -xdepend -xbuiltin",
         thread_cflag     => "-D_REENTRANT",
-        lflags           => sub { join(" ",@_,"-mt -lpthread") },
+        lflags           => add("-mt -lpthread"),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-KPIC",
         shared_ldflag    => "-G -dy -z text",
     "solaris64-x86_64-cc" => {
         inherit_from     => [ "solaris-common", asm("x86_64_asm") ],
         cc               => "cc",
-        cflags           => sub { join(" ","-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",@_) },
+        cflags           => add_before("-xarch=generic64 -xstrconst -Xa -DL_ENDIAN"),
         debug_cflags     => "-g",
         release_cflags   => "-xO5 -xdepend -xbuiltin",
         thread_cflag     => "-D_REENTRANT",
-        lflags           => sub { join(" ",@_,"-mt -lpthread") },
+        lflags           => add("-mt -lpthread"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         shared_cflag     => "-KPIC",
     "solaris-sparcv7-gcc" => {
         inherit_from     => [ "solaris-common" ],
         cc               => "gcc",
-        cflags           => sub { join(" ","-Wall -DB_ENDIAN -DBN_DIV2W",@_) },
+        cflags           => add_before("-Wall -DB_ENDIAN -DBN_DIV2W"),
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3",
         thread_cflag     => "-pthread",
     "solaris-sparcv7-cc" => {
         inherit_from     => [ "solaris-common" ],
         cc               => "cc",
-        cflags           => sub { join(" ","-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",@_) },
+        cflags           => add_before("-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W"),
         debug_cflags     => "-g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG",
         release_cflags   => "-xO5 -xdepend",
         thread_cflag     => "-D_REENTRANT",
-        lflags           => sub { join(" ",@_,"-mt -lpthread") },
+        lflags           => add("-mt -lpthread"),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-KPIC",
         shared_ldflag    => "-G -dy -z text",
         debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG",
         release_cflags   => "-O3 -fomit-frame-pointer",
         debug_lflags     => "-lefence",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
     },
     "linux-aout" => {
         inherit_from     => [ asm("x86_asm") ],
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3 -fomit-frame-pointer",
         thread_cflag     => "(unknown)",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         perlasm_scheme   => "a.out",
     },
 
     "android-x86" => {
         inherit_from     => [ "android", asm("x86_asm") ],
         release_cflags   => "-O3 -fomit-frame-pointer",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         perlasm_scheme   => "android",
     },
     ################################################################
         inherit_from     => [ "BSD-generic32", asm("x86_asm") ],
         cflags           => "-DL_ENDIAN -Wall",
         release_cflags   => "-O3 -fomit-frame-pointer",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         shared_target    => "bsd-shared",
         perlasm_scheme   => "a.out",
     },
         cflags           => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall",
         thread_cflag     => "(unknown)",
         lflags           => "-ldl",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
         shared_target    => "bsd-gcc-shared",
         shared_cflag     => "-fPIC",
         cflags           => "-O -Wall",
         unistd           => "<libc.h>",
         thread_cflag     => "(unknown)",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
     },
     "nextstep3.3" => {
         cc               => "cc",
         cflags           => "-O3 -Wall",
         unistd           => "<libc.h>",
         thread_cflag     => "(unknown)",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
     },
 
 # QNX
         cc               => "cc",
         cflags           => "-DL_ENDIAN -DTERMIO",
         thread_cflag     => "(unknown)",
-        bn_ops           => "${x86_gcc_des} ${x86_gcc_opts}",
     },
     "QNX6" => {
         cc               => "gcc",
         cc               => "gcc",
         cflags           => "-DL_ENDIAN -O2 -Wall",
         lflags           => "-lsocket",
-        bn_ops           => "${x86_gcc_des} ${x86_gcc_opts}",
         dso_scheme       => "dlfcn",
         shared_target    => "bsd-gcc-shared",
         shared_cflag     => "-fPIC",
         cflags           => "-DFILIO_H -DNO_STRINGS_H",
         thread_cflag     => "-Kthread",
         lflags           => "-lsocket -lnsl -lresolv -lx",
-        bn_ops           => "${x86_gcc_des} ${x86_gcc_opts}",
     },
     "unixware-2.1" => {
         cc               => "cc",
         cflags           => "-O -DFILIO_H",
         thread_cflag     => "-Kthread",
         lflags           => "-lsocket -lnsl -lresolv -lx",
-        bn_ops           => "${x86_gcc_des} ${x86_gcc_opts}",
     },
     "unixware-7" => {
         inherit_from     => [ asm("x86_elf_asm") ],
         cflags           => "-O -DFILIO_H -Kalloca",
         thread_cflag     => "-Kthread",
         lflags           => "-lsocket -lnsl",
-        bn_ops           => "BN_LLONG ${x86_gcc_des}",
+        bn_ops           => "BN_LLONG",
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         shared_target    => "svr5-shared",
         cflags           => "-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=pentium -Wall",
         thread_cflag     => "-D_REENTRANT",
         lflags           => "-lsocket -lnsl",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         shared_target    => "gnu-shared",
         cflags           => "-belf",
         thread_cflag     => "(unknown)",
         lflags           => "-lsocket -lnsl",
-        bn_ops           => "${x86_gcc_des} ${x86_gcc_opts}",
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         shared_target    => "svr3-shared",
         cflags           => "-O3 -fomit-frame-pointer",
         thread_cflag     => "(unknown)",
         lflags           => "-lsocket -lnsl",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         shared_target    => "svr3-shared",
         # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
         inherit_from     => [ "VC-common", asm("x86_asm") ],
         sys_id           => "WIN32",
-        bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
         perlasm_scheme   => "win32n",
        build_scheme     => [ "mk1mf", "VC-W32" ],
     },
     "VC-CE" => {
         cc               => "cl",
         sys_id           => "WINCE",
-        bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
         dso_scheme       => "win32",
        build_scheme     => [ "mk1mf", "VC-WCE" ],
     },
         thread_cflag     => "-D_MT",
         sys_id           => "MINGW32",
         lflags           => "-lws2_32 -lgdi32 -lcrypt32",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN",
+        bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
         perlasm_scheme   => "coff",
         dso_scheme       => "win32",
         shared_target    => "cygwin-shared",
         cc               => "cc",
         cflags           => "-DTERMIOS -DL_ENDIAN -O -Wall",
         sys_id           => "UWIN",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         dso_scheme       => "win32",
     },
 
         debug_cflags     => "-g -O0",
         release_cflags   => "-O3 -fomit-frame-pointer",
         sys_id           => "CYGWIN",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         perlasm_scheme   => "coff",
         dso_scheme       => "dlfcn",
         shared_target    => "cygwin-shared",
 # netware-clib => legacy CLib c-runtime support
     "netware-clib" => {
         cc               => "mwccnlm",
-        bn_ops           => "${x86_gcc_opts}",
        build_scheme     => [ "mk1mf", "netware" ],
     },
     "netware-clib-bsdsock" => {
         cc               => "mwccnlm",
-        bn_ops           => "${x86_gcc_opts}",
        build_scheme     => [ "mk1mf", "netware" ],
     },
     "netware-clib-gcc" => {
         cc               => "i586-netware-gcc",
         cflags           => "-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
-        bn_ops           => "${x86_gcc_opts}",
     },
     "netware-clib-bsdsock-gcc" => {
         cc               => "i586-netware-gcc",
         cflags           => "-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
-        bn_ops           => "${x86_gcc_opts}",
     },
     # netware-libc => LibC/NKS support
     "netware-libc" => {
         cc               => "mwccnlm",
-        bn_ops           => "BN_LLONG ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
        build_scheme     => [ "mk1mf", "netware" ],
     },
     "netware-libc-bsdsock" => {
         cc               => "mwccnlm",
-        bn_ops           => "BN_LLONG ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
        build_scheme     => [ "mk1mf", "netware" ],
     },
     "netware-libc-gcc" => {
         cc               => "i586-netware-gcc",
         cflags           => "-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
-        bn_ops           => "BN_LLONG ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
     },
     "netware-libc-bsdsock-gcc" => {
         cc               => "i586-netware-gcc",
         cflags           => "-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
-        bn_ops           => "BN_LLONG ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
     },
 
 #### DJGPP
         cflags           => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
         sys_id           => "MSDOS",
         lflags           => "-L/dev/env/WATT_ROOT/lib -lwatt",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         perlasm_scheme   => "a.out",
     },
 
         cflags           => "-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall",
         thread_cflag     => "-pthread",
         lflags           => "-ldl",
-        bn_ops           => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
+        bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
         shared_cflag     => "-fPIC",