This is a discussion on [openssl.org #1545] config script sets wrong CFLAGS, breaking build on linux-alpha - Openssl ; This is a multi-part message in MIME format... ------------=_1182255309-69867-1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! I tried to upgrade from 0.9.8d to 0.9.8e on my GNU/Linux Alpha box and go= t a straigt compiler error: shell$ ./config # some output... ...
This is a multi-part message in MIME format...
------------=_1182255309-69867-1
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Hi!
I tried to upgrade from 0.9.8d to 0.9.8e on my GNU/Linux Alpha box and go=
t a straigt compiler error:
shell$ ./config
# some output... among that:
Operating system: alpha-whatever-linux2
Configuring for linux-alpha+bwx-gcc
Configuring for linux-alpha+bwx-gcc
shell$ LANG=3DC make
making all in crypto...
make[1]: Entering directory `/spielwiese/smgl/grimoires/grimoire/openssl-=
0.9.8e/crypto'
gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHA=
VE_DLFCN_H -march=3Dev6 -O3 -DL_ENDIAN -DTERMIO -c -o cryptlib.o cryptl=
ib.c
cc1: error: unrecognized command line option "-march=3Dev6"
make[1]: *** [cryptlib.o] Error 1
make[1]: Leaving directory `/spielwiese/smgl/grimoires/grimoire/openssl-0=
..9.8e/crypto'
make: *** [build_crypto] Error 1
Now the gcc on alpha doesn't know -march, as Alphas are just a small set =
of successive CPUs and not a diversed family of many, many CPUs with vary=
ing degree of similarity like x86.
It needs -mcpu.
Well, 0.9.8d got this right, but for 0.9.8e, someone apparently did somet=
hing along
sed -i 's/mcpu/march/' config
which causes specifically this change:
@@ -527,9 +527,9 @@
esac
if [ "$CC" =3D "gcc" ]; then
case ${ISA:-generic} in
- EV5|EV45) options=3D"$options -mcpu=3Dev5";;
- EV56|PCA56) options=3D"$options -mcpu=3Dev56";;
- *) options=3D"$options -mcpu=3Dev6";;
+ EV5|EV45) options=3D"$options -march=3Dev5";;
+ EV56|PCA56) options=3D"$options -march=3Dev56";;
+ *) options=3D"$options -march=3Dev6";;
esac
fi
;;
Please revert this change for the next release to make the build work aga=
in.
Actually, I must say that I'd prefer omitting the -mcpu settings altogeth=
er and use CFLAGS instead.
The distro I'm using is a source code based one and has something called =
"archspecs" for the user to choose from.
There we set things like -mcpu or -march; and we already have to insert t=
hat to the openssl Makefile:
../config
sed -i "s/^CFLAG=3D/CFLAG=3D$CFLAGS /" Makefile
But still, if I have -mcpu=3Dev67 in my $CFLAGS, the -mcpu (or -march, cu=
rrently) of openssl will override it.
That can be a problem when I want to compile for a ev5 CPU on a ev67 box;=
openssl will build binaries that won't run on the older cpu.
Alrighty then,
Thomas.
------------=_1182255309-69867-1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Disposition: inline; filename="signature.asc"
Content-Transfer-Encoding: base64
RT-Attachment: 1545/16813/6835
LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbj ogR251UEcg
djEuNC43IChHTlUvTGludXgpCgppRDhEQlFGR2Q2M3NtMHhTdk 5SRzFTUVJB
ZzdVQUtDS2M3SFB4Vzd2VzNiYWl6VmsraGtDbzVSaTl3Q2ZVcT FWCmZ5YktE
NjNaYkdhQzhkd0M5aktyV3U0PQo9T3d3cwotLS0tLUVORCBQR1 AgU0lHTkFU
VVJFLS0tLS0K
------------=_1182255309-69867-1--
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org