Below is a sample from Mac OS X. If this was run for Android, then
CC=arm-linuxeabi-gcc and RANLIB=arm-linuxeabi-ranlib. Neither would be
found when sudo drops the user's path.

$./config shared -no-comp -no-sslv2 -no-sslv3
…
$ make depend
…
$ make
...
$ sudo make install
Password:
making all in crypto...
making all in crypto/objects...
make[2]: Nothing to be done for `all'.
making all in crypto/md4...
make[2]: Nothing to be done for `all'.
making all in crypto/md5...
make[2]: Nothing to be done for `all'.
...
making all in crypto/srp...
make[2]: Nothing to be done for `all'.
making all in crypto/cmac...
make[2]: Nothing to be done for `all'.
if [ -n "libcrypto.1.0.0.dylib libssl.1.0.0.dylib" ]; then \
                (cd ..; make libcrypto.1.0.0.dylib); \
        fi
[ -z "" ] || cc -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch i386 -O3
-fomit-frame-pointer -DL_ENDIAN -DOPENSSL_BN_ASM_PART_WORDS
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
-DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -Iinclude \
                -DFINGERPRINT_PREMAIN_DSO_LOAD -o fips_premain_dso  \
                fips_premain.c fipscanister.o \
                libcrypto.a
making all in ssl...
if [ -n "libcrypto.1.0.0.dylib libssl.1.0.0.dylib" ]; then \
                (cd ..; make libssl.1.0.0.dylib); \
        fi
[ -z "" ] || cc -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch i386 -O3
-fomit-frame-pointer -DL_ENDIAN -DOPENSSL_BN_ASM_PART_WORDS
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
-DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -Iinclude \
                -DFINGERPRINT_PREMAIN_DSO_LOAD -o fips_premain_dso  \
                fips_premain.c fipscanister.o \
                libcrypto.a
making all in engines...
...

On Thu, Jun 20, 2013 at 2:22 PM, Jeffrey Walton <[email protected]> wrote:
> From OpenSSL 1.0.1e (https://www.openssl.org/source/openssl-1.0.1e.tar.gz).
>
> Makefile.org and Makefile's 'install' rule is:
>
>     install: all install_docs install_sw
>
> The 'all' rule is default and is:
>
>     all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
>
> This should not be a problem from a standard cycle:
>
>     ./config fips shared <...>
>     make depend
>     make
>     make install
>
> However, there are a few problems. First, Stallman states (in his GNU
> Make book) that the 'install' rule should copy the executable and
> axillary files, and not build objects [1]. This would be a harmless
> transgression except it breaks install during cross-compilation.
>
> Second, 'all' appears to have a dependency that is always out of date
> (perhaps due to a directory time somewhere). So even if you `make
> depend` and then `make` (with 'all' being default), targets will still
> be built during 'install'.
>
> Third, the cycle often includes `sudo make install`:
>
>     ./config fips shared <...>
>     make depend
>     make
>     sudo make install
>
> `sudo` drops a user's path so cross-compilation path changes are lost.
> When GCC is re-invoked, the required $(CC) (for example,
> arm-linuxeabi-gcc) cannot be found.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to