Make use of add() and add_before() in Configurations/
authorRichard Levitte <levitte@openssl.org>
Fri, 29 Jan 2016 16:35:17 +0000 (17:35 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 29 Jan 2016 17:17:30 +0000 (18:17 +0100)
A few more sub-joins could be replaced with calls to add() and add_before()

Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/00-base-templates.conf
Configurations/10-main.conf

index 2ff2c2a..68ad5a8 100644 (file)
     mips64_asm => {
        inherit_from    => [ "mips32_asm" ],
        template        => 1,
-       sha1_obj        => sub { join(" ", @_, "sha512-mips.o") }
+       sha1_obj        => add("sha512-mips.o")
     },
     s390x_asm => {
        template        => 1,
index 32e4e15..929e79e 100644 (file)
@@ -53,7 +53,7 @@
         # 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",
@@ -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",