Make uplink auxiliary source separate from cpuid source
authorRichard Levitte <levitte@openssl.org>
Wed, 2 Mar 2016 08:34:26 +0000 (09:34 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 2 Mar 2016 13:45:02 +0000 (14:45 +0100)
There are cases, for example when configuring no-asm, that the added
uplink source files got in the way of the cpuid ones.  The best way to
solve this is to separate the two.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Configurations/00-base-templates.conf
Configure
Makefile.in
crypto/Makefile.in
crypto/build.info

index 7a208676eaabe78c958e4909306b8b35b1bfa81e..4251a6cfe20c612eba53e09530699189d018ca5f 100644 (file)
@@ -14,6 +14,7 @@
 
        apps_aux_src    => "",
        cpuid_asm_src   => "mem_clr.c",
 
        apps_aux_src    => "",
        cpuid_asm_src   => "mem_clr.c",
+       uplink_aux_src  => "",
        bn_asm_src      => "bn_asm.c",
        ec_asm_src      => "",
        des_asm_src     => "des_enc.c fcrypt_b.c",
        bn_asm_src      => "bn_asm.c",
        ec_asm_src      => "",
        des_asm_src     => "des_enc.c fcrypt_b.c",
     uplink_common => {
        template        => 1,
        apps_aux_src    => add("../ms/applink.c"),
     uplink_common => {
        template        => 1,
        apps_aux_src    => add("../ms/applink.c"),
-       cpuid_asm_src   => add("../ms/uplink.c"),
+       uplink_aux_src  => add("../ms/uplink.c"),
        shared_defines  => add("OPENSSL_USE_APPLINK", { separator => undef }),
     },
     x86_uplink => {
        inherit_from    => [ "uplink_common" ],
        template        => 1,
        shared_defines  => add("OPENSSL_USE_APPLINK", { separator => undef }),
     },
     x86_uplink => {
        inherit_from    => [ "uplink_common" ],
        template        => 1,
-       cpuid_asm_src   => add("uplink-x86.s"),
+       uplink_aux_src  => add("uplink-x86.s"),
     },
     x86_64_uplink => {
        inherit_from    => [ "uplink_common" ],
        template        => 1,
     },
     x86_64_uplink => {
        inherit_from    => [ "uplink_common" ],
        template        => 1,
-       cpuid_asm_src   => add("uplink-x86_64.s"),
+       uplink_aux_src  => add("uplink-x86_64.s"),
     },
     ia64_uplink => {
        inherit_from    => [ "uplink_common" ],
        template        => 1,
     },
     ia64_uplink => {
        inherit_from    => [ "uplink_common" ],
        template        => 1,
-       cpuid_asm_src   => add("uplink-ia64.s"),
+       uplink_aux_src  => add("uplink-ia64.s"),
     },
 
     x86_asm => {
     },
 
     x86_asm => {
index 080bc06fd4ec5d352d92531038f2bd9462953abd..8f5b1a140fa15a7c7708a81508760dcca5545d29 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1717,7 +1717,9 @@ print "DEFINES       =",join(" ", @{$config{defines}}),"\n";
 print "LFLAG         =$config{lflags}\n";
 print "PLIB_LFLAG    =$config{plib_lflags}\n";
 print "EX_LIBS       =$config{ex_libs}\n";
 print "LFLAG         =$config{lflags}\n";
 print "PLIB_LFLAG    =$config{plib_lflags}\n";
 print "EX_LIBS       =$config{ex_libs}\n";
+print "APPS_OBJ      =$target{apps_obj}\n";
 print "CPUID_OBJ     =$target{cpuid_obj}\n";
 print "CPUID_OBJ     =$target{cpuid_obj}\n";
+print "UPLINK_OBJ    =$target{uplink_obj}\n";
 print "BN_ASM        =$target{bn_obj}\n";
 print "EC_ASM        =$target{ec_obj}\n";
 print "DES_ENC       =$target{des_obj}\n";
 print "BN_ASM        =$target{bn_obj}\n";
 print "EC_ASM        =$target{ec_obj}\n";
 print "DES_ENC       =$target{des_obj}\n";
index 611130974a635d9ce0c74767760fb540dc2b2c02..bddbfdbce81094581470c9f6c3438503fbb7e47a 100644 (file)
@@ -125,6 +125,7 @@ PROCESSOR= {- $config{processor} -}
 # CPUID module collects small commonly used assembler snippets
 APPS_OBJ={- $target{apps_obj} -}
 CPUID_OBJ= {- $target{cpuid_obj} -}
 # CPUID module collects small commonly used assembler snippets
 APPS_OBJ={- $target{apps_obj} -}
 CPUID_OBJ= {- $target{cpuid_obj} -}
+UPLINK_OBJ= {- $target{uplink_obj} -}
 BN_ASM= {- $target{bn_obj} -}
 EC_ASM= {- $target{ec_obj} -}
 DES_ENC= {- $target{des_obj} -}
 BN_ASM= {- $target{bn_obj} -}
 EC_ASM= {- $target{ec_obj} -}
 DES_ENC= {- $target{des_obj} -}
@@ -268,7 +269,7 @@ BUILDENV=   LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
                SHLIB_TARGET='$(SHLIB_TARGET)'  \
                LDFLAG='$(LDFLAG)'                              \
                PLIB_LDFLAG='$(PLIB_LDFLAG)' EX_LIBS='$(EX_LIBS)'       \
                SHLIB_TARGET='$(SHLIB_TARGET)'  \
                LDFLAG='$(LDFLAG)'                              \
                PLIB_LDFLAG='$(PLIB_LDFLAG)' EX_LIBS='$(EX_LIBS)'       \
-               APPS_OBJ='$(APPS_OBJ)'                          \
+               APPS_OBJ='$(APPS_OBJ)' UPLINK_OBJ='$(UPLINK_OBJ)'       \
                CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)'     \
                EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)'         \
                AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)'     \
                CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)'     \
                EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)'         \
                AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)'     \
index c29d44c7d37695a44051efabe21f427c5d2938c5..9e407df3d0b242b38c6670d78a3fcfdfef95284d 100644 (file)
@@ -25,6 +25,7 @@ CFLAGS= $(INCLUDE) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDE) $(ASFLAG)
 AFLAGS=$(ASFLAGS)
 CPUID_OBJ=mem_clr.o
 ASFLAGS= $(INCLUDE) $(ASFLAG)
 AFLAGS=$(ASFLAGS)
 CPUID_OBJ=mem_clr.o
+UPLINK_OBJ=
 
 LIBS=
 
 
 LIBS=
 
@@ -39,7 +40,7 @@ LIBSRC=       cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
 LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
        ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o \
        threads_pthread.o threads_win.o threads_none.o \
 LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
        ebcdic.o uid.o o_time.o o_str.o o_dir.o thr_id.o lock.o \
        threads_pthread.o threads_win.o threads_none.o \
-       o_init.o o_fips.o mem_sec.o init.o $(CPUID_OBJ)
+       o_init.o o_fips.o mem_sec.o init.o $(CPUID_OBJ) $(UPLINK_OBJ)
 
 SRC= $(LIBSRC)
 
 
 SRC= $(LIBSRC)
 
index 24a009a475b46d7fc54810a583e416120559b32d..471a9fd2f808862ed9114511bc87979e7615c5f6 100644 (file)
@@ -4,7 +4,8 @@ SOURCE[../libcrypto]=\
         cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
         ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c \
         threads_pthread.c threads_win.c threads_none.c \
         cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
         ebcdic.c uid.c o_time.c o_str.c o_dir.c thr_id.c lock.c \
         threads_pthread.c threads_win.c threads_none.c \
-        o_init.c o_fips.c mem_sec.c init.c {- $target{cpuid_asm_src} -}
+        o_init.c o_fips.c mem_sec.c init.c {- $target{cpuid_asm_src} -} \
+        {- $target{uplink_aux_src} -}
 EXTRA=  ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
         x86cpuid.pl x86_64cpuid.pl ia64cpuid.S \
         ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
 EXTRA=  ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
         x86cpuid.pl x86_64cpuid.pl ia64cpuid.S \
         ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl