Commit 8f0d8909 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Jumbo framework update.

parent c4a2cab0
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -503,8 +503,8 @@ my %table=(

##### MacOS X (a.k.a. Rhapsody or Darwin) setup
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
"darwin-ppc-cc","cc:-O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"darwin-ppc-cc","cc:-O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",

##### A/UX
@@ -1028,6 +1028,11 @@ my $shared_extension = $fields[$idx_shared_extension];
my $ranlib = $fields[$idx_ranlib];
my $arflags = $fields[$idx_arflags];

# '%' in $lflags is used to split flags to "pre-" and post-flags
my ($prelflags,$postlflags)=split('%',$lflags);
if (defined($postlflags))	{ $lflags=$postlflags;  }
else				{ $lflags=$prelflags; undef $prelflags; }

my $no_shared_warn=0;
my $no_user_cflags=0;

@@ -1361,6 +1366,7 @@ while (<IN>)
	s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
	s/^CFLAG=.*$/CFLAG= $cflags/;
	s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
	s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/;
	s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
	s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
	s/^CPUID_OBJ=.*$/CPUID_OBJ= $cpuid_obj/;
@@ -1399,7 +1405,7 @@ while (<IN>)
	s/^BASEADDR=.*/BASEADDR=$baseaddr/;
	s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
	s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/;
	s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL) \$(SHARED_FIPS)/ if (!$no_shared);
	s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_FIPS) \$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared);
	if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/)
		{
		my $sotmp = $1;
+18 −13
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
sub_all: build_all
build_all: build_libs build_apps build_tests build_tools

build_libs: build_crypto build_fips build_ssl build_engines
build_libs: build_crypto build_fips build_ssl build_shared build_engines

build_crypto:
	if [ -n "$(FIPSCANLIB)" ]; then \
@@ -330,7 +330,7 @@ build_crypto:
	fi ; export ARX ; \
		dir=crypto; target=all; $(BUILD_ONE_CMD)
build_fips:
	@dir=fips-1.0; target=all; $(BUILD_ONE_CMD)
	@dir=fips-1.0; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
build_ssl:
	@dir=ssl; target=all; $(BUILD_ONE_CMD)
build_engines:
@@ -346,43 +346,48 @@ all_testapps: build_libs build_testapps
build_testapps:
	@dir=crypto; target=testapps; $(BUILD_ONE_CMD)

build_shared:	$(SHARED_LIBS)
libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
	@if [ "$(SHLIB_TARGET)" != "" ]; then \
		if [ "$(FIPSCANLIB)" = "libfips" ]; then \
			( dir=fips-1.0; target=all; $(BUILD_ONE_CMD) ) ; \
			$(ARD) libcrypto.a fipscanister.o ; \
			$(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
			$(AR) libcrypto.a fips-1.0/fipscanister.o ; \
		else \
			if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
				FIPSLD_CC=$(CC); CC=fips-1.0/fipsld; \
				FIPSLD_NPT="y"; FIPSLD_LIBFIPS=y; \
				export CC FIPSLD_CC FIPSLD_NPT FIPSLD_LIBFIPS; \
				export CC FIPSLD_CC; \
			fi; \
			$(MAKE) -e SHLIBDIRS='crypto' build-shared; \
		fi \
	else \
		echo "There's no support for shared libraries on this platform" >&2; \
		exit 1; \
	fi

libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
	@if [ "$(SHLIB_TARGET)" != "" ]; then \
		$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
		shlibdeps=-lcrypto; \
		[ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
		$(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
	else \
		echo "There's no support for shared libraries on this platform" >&2 ; \
		exit 1; \
	fi

libfips$(SHLIB_EXT): libfips.a
fips-1.0/fipscanister.o:	build_fips
libfips$(SHLIB_EXT):		fips-1.0/fipscanister.o
	@if [ "$(SHLIB_TARGET)" != "" ]; then \
		if [ "$(FIPSCANLIB)" = "libfips" ]; then \
			FIPSLD_CC=$(CC); CC=fips-1.0/fipsld; FIPSLD_NPT="y"; \
			FIPSLD_LIBFIPS=y; \
			export CC FIPSLD_CC FIPSLD_NPT FIPSLD_LIBFIPS; \
		fi; \
		$(MAKE) -e SHLIBDIRS=fips build-shared; \
		FIPSLD_CC=$(CC); CC=fips-1.0/fipsld; export CC FIPSLD_CC; \
		$(MAKE) -f Makefile.shared -e $(BUILDENV) \
			CC=$${CC} LIBNAME=fips THIS=$@ \
			LIBEXTRAS=fips-1.0/fipscanister.o \
			LIBDEPS="$(EX_LIBS)" \
			LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
			link_o.$(SHLIB_TARGET) || { rm -f $@; exit 1; } \
	else \
		echo "There's no support for shared libraries on this platform" >&2; \
		exit 1; \
	fi

libfips.a:
+1 −3
Original line number Diff line number Diff line
@@ -101,15 +101,13 @@ LINK_SO= \
    LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
    SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
    SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
    nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
    LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
    LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
    LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
    $${SHAREDCMD} $${SHAREDFLAGS} \
	-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
	$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
  ) && $(SYMLINK_SO); \
  ( $(SET_X); rm -f lib$(LIBNAME).exp )
  ) && $(SYMLINK_SO)

SYMLINK_SO=	\
	if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \
+2 −2
Original line number Diff line number Diff line
@@ -951,7 +951,7 @@ $cflags = -O3 -fomit-frame-pointer -fno-common
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = MACOSX
$lflags       = 
$lflags       = -Wl,-search_paths_first%
$bn_ops       = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
$cpuid_obj    = 
$bn_obj       = 
@@ -978,7 +978,7 @@ $cflags = -O3 -DB_ENDIAN
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = MACOSX
$lflags       = -Wl,-search_paths_first
$lflags       = -Wl,-search_paths_first%
$bn_ops       = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
$cpuid_obj    = 
$bn_obj       = osx_ppc32.o
+2 −5
Original line number Diff line number Diff line
@@ -155,11 +155,8 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
	elif [ -n "$(FIPSCANLIB)" ]; then \
	  FIPSLD_CC=$(CC); CC=$(TOP)/fips-1.0/fipsld; export CC FIPSLD_CC; \
	fi; \
	if [ "$${shlib_target}" = "darwin-shared" ] ; then \
	  LIBRARIES="$(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO)" ; \
	else \
	LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
	fi; \
	[ "x$(FIPSCANLIB)" = "xlibfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
	$(MAKE) -f $(TOP)/Makefile.shared -e \
		CC=$${CC} APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
		LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
Loading