Fix build on Solaris non-sparc.

Closes #2136. Thanks to chuckunix.
This commit is contained in:
Roger A. Light 2021-04-03 11:15:13 +01:00
parent 6a4a547892
commit eead0d2943
2 changed files with 11 additions and 3 deletions

View File

@ -28,6 +28,7 @@ Build:
- A variety of minor build related fixes, like functions not having previous - A variety of minor build related fixes, like functions not having previous
declarations. declarations.
- Fix CMake cross compile builds not finding opensslconf.h. Closes #2160. - Fix CMake cross compile builds not finding opensslconf.h. Closes #2160.
- Fix build on Solaris non-sparc. Closes #2136.
2.0.9 - 2021-03-11 2.0.9 - 2021-03-11

View File

@ -140,6 +140,7 @@ DB_HTML_XSL=man/html.xsl
#MANCOUNTRIES=en_GB #MANCOUNTRIES=en_GB
UNAME:=$(shell uname -s) UNAME:=$(shell uname -s)
ARCH:=$(shell uname -p)
ifeq ($(UNAME),SunOS) ifeq ($(UNAME),SunOS)
ifeq ($(CC),cc) ifeq ($(CC),cc)
@ -199,9 +200,15 @@ ifeq ($(WITH_SHARED_LIBRARIES),yes)
endif endif
ifeq ($(UNAME),SunOS) ifeq ($(UNAME),SunOS)
ifeq ($(CC),cc) SEDINPLACE:=
LIB_CFLAGS:=$(LIB_CFLAGS) -xc99 -KPIC ifeq ($(ARCH),sparc)
else ifeq ($(CC),cc)
LIB_CFLAGS:=$(LIB_CFLAGS) -xc99 -KPIC
else
LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC
endif
endif
ifeq ($(ARCH),i386)
LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC LIB_CFLAGS:=$(LIB_CFLAGS) -fPIC
endif endif