[openssl-dev] [openssl.org #4056] 1.0.2d and Configure issue under X32 (ARFLAGS is architecture name?)

noloader@gmail.com via RT rt at openssl.org
Tue Sep 22 00:39:37 UTC 2015


I experienced this issue under X32. X32 provides 32-bit integers,
longs and pointers combined with the richness of x86_64 register set.
Debian has a chroot environment for X32 at
https://wiki.debian.org/X32Port.

It appears ARFLAGS is set to the architecture when using RPATH options
in Configure's $cflags and $ldflags. RPATHS are important (IMHO)
because OpenSSL can get into a situation where /usr/local/bin/openssl
uses /usr/local/lib/libssl.so, but libssl.so uses the system's
/usr/lib/libcrypto.so.

I added a Configure target that provides RPATH options to $cflags
(field 2) and $ldflags (field 6):

    # ./Configure LIST | grep x32
    linux-x32
    linux-x32-rpath
    linux32-s390x

Here's what it looks like (copy and paste from under emacs; ignore the
back slashes):

    "linux-x32-rpath",    "gcc:-mx32 -DL_ENDIAN -O3 -Wall
-Wl,-rpath=/usr/local/ssl\
    /lib::-D_REENTRANT::-Wl,-rpath=/usr/local/ssl/lib
-ldl:SIXTY_FOUR_BIT RC4_CHUNK\
    _LL DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC
-mx32:.so.\$(\
    SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",

And below is what it results in, which fails under `make` because `ARFLAGS=m32`.

Jeff

**********

# unset ARFLAGS
# ./Configure linux-x32-rpath shared enable-ec_nistp_64_gcc_128
Configuring for linux-x32-rpath
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
    no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5
    no-libunbound   [experimental] OPENSSL_NO_LIBUNBOUND (skip dir)
    no-md2          [default]  OPENSSL_NO_MD2 (skip dir)
    no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)
    no-rfc3779      [default]  OPENSSL_NO_RFC3779 (skip dir)
    no-sctp         [default]  OPENSSL_NO_SCTP (skip dir)
    no-ssl-trace    [default]  OPENSSL_NO_SSL_TRACE (skip dir)
    no-store        [experimental] OPENSSL_NO_STORE (skip dir)
    no-unit-test    [default]  OPENSSL_NO_UNIT_TEST (skip dir)
    no-zlib         [default]
    no-zlib-dynamic [default]
IsMK1MF=0
CC            =gcc
CFLAG         =-fPIC -mx32 -DOPENSSL_PIC -DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mx32 -DL_ENDIAN -O3 -Wall
-Wl,-rpath=/usr/local/ssl/lib -DOPENSSL_IA32_SSE2
-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM
-DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
EX_LIBS       =-Wl,-rpath=/usr/local/ssl/lib -ldl
CPUID_OBJ     =x86_64cpuid.o
BN_ASM        =x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o
rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o
EC_ASM        =ecp_nistz256.o ecp_nistz256-x86_64.o
DES_ENC       =des_enc.o fcrypt_b.o
AES_ENC       =aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o
aesni-x86_64.o aesni-sha1-x86_64.o aesni-sha256-x86_64.o
aesni-mb-x86_64.o
BF_ENC        =bf_enc.o
CAST_ENC      =c_enc.o
RC4_ENC       =rc4-x86_64.o rc4-md5-x86_64.o
RC5_ENC       =rc5_enc.o
MD5_OBJ_ASM   =md5-x86_64.o
SHA1_OBJ_ASM  =sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
sha1-mb-x86_64.o sha256-mb-x86_64.o
RMD160_OBJ_ASM=
CMLL_ENC      =cmll-x86_64.o cmll_misc.o
MODES_OBJ     =ghash-x86_64.o aesni-gcm-x86_64.o
ENGINES_OBJ   =
PROCESSOR     =
RANLIB        =/usr/bin/ranlib
ARFLAGS       =x32
PERL          =/usr/bin/perl
SIXTY_FOUR_BIT mode
DES_UNROLL used
DES_INT used
RC4_CHUNK is unsigned long long
created directory `include/openssl'
...

_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod



More information about the openssl-dev mailing list