summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-02-15 10:50:07 +0000
committerVincent Sanders <vince@kyllikki.org>2019-02-15 10:50:07 +0000
commitf2b2d9c670d55f1879948d97ca18fe087b724333 (patch)
treed7b7ea5179cbb6508c8a218adc41af8b1b62f26f
parent291a9eacae205da9f699e72550d152e016dc8a89 (diff)
downloadtoolchains-master.tar.gz
toolchains-master.tar.bz2
fix m68k amiga openssl patchesHEADmaster
-rw-r--r--m68k-unknown-amigaos/Makefile20
-rw-r--r--sdk/Makefile17
-rw-r--r--sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p12
3 files changed, 29 insertions, 20 deletions
diff --git a/m68k-unknown-amigaos/Makefile b/m68k-unknown-amigaos/Makefile
index 8597dcf..f7e1534 100644
--- a/m68k-unknown-amigaos/Makefile
+++ b/m68k-unknown-amigaos/Makefile
@@ -96,18 +96,26 @@ $(BUILDSTEPS)/stage2.d: $(BUILDSTEPS)/clib2.d
# Rules to build and install Clib2
###
-$(BUILDSTEPS)/clib2.d: $(BUILDSTEPS)/bootstrap-compiler.d $(BUILDSTEPS)/ndk.d $(SOURCESDIR)/$(UPSTREAM_CLIB2_TARBALL)
- tar xaf $(SOURCESDIR)/$(UPSTREAM_CLIB2_TARBALL)
- mv clib2-$(UPSTREAM_CLIB2_VERSION)/library $(BUILDDIR)/clib2
- for p in `ls $(RECIPES)/patches/clib2/*.p` ; do patch -d $(BUILDDIR)/clib2 -p0 <$$p ; done
- for dir in `find $(RECIPES)/files/clib2/ -type d | grep -v '\.svn' | sed 's#$(RECIPES)/files/clib2##'` ; do mkdir -p $(BUILDDIR)/clib2$$dir ; done
- for file in `find $(RECIPES)/files/clib2/ -type f | grep -v '\.svn' | sed 's#$(RECIPES)/files/clib2##'` ; do cp -p $(RECIPES)/files/clib2$$file $(BUILDDIR)/clib2$$file ; done
+$(BUILDSTEPS)/clib2.d: $(BUILDSTEPS)/bootstrap-compiler.d $(BUILDSTEPS)/ndk.d $(BUILDSTEPS)/clib2-src.d
cd $(BUILDDIR)/clib2 && PATH="$(PREFIX)/bin:$(PATH)" make -f GNUmakefile.68k
cp -r $(BUILDDIR)/clib2/include $(PREFIX)/$(TARGET_NAME)
cp -r $(BUILDDIR)/clib2/lib $(PREFIX)/$(TARGET_NAME)
ln -sf $(PREFIX)/$(TARGET_NAME)/lib/ncrt0.o $(PREFIX)/$(TARGET_NAME)/lib/crt0.o
touch $@
+
+$(BUILDSTEPS)/clib2-src.d: $(SOURCESDIR)/$(UPSTREAM_CLIB2_TARBALL)
+ $(RM) -rf $(SOURCESDIR)/clib2-$(UPSTREAM_CLIB2_VERSION)
+ $(RM) -rf $(BUILDDIR)/clib2
+ cd $(SOURCESDIR) && tar xaf $(SOURCESDIR)/$(UPSTREAM_CLIB2_TARBALL)
+ mv $(SOURCESDIR)/clib2-$(UPSTREAM_CLIB2_VERSION)/library $(BUILDDIR)/clib2
+ $(RM) -rf $(SOURCESDIR)/clib2-$(UPSTREAM_CLIB2_VERSION)
+ for p in `ls $(RECIPES)/patches/clib2/*.p` ; do patch -d $(BUILDDIR)/clib2 -p0 <$$p || exit $0 ; done
+ for dir in `find $(RECIPES)/files/clib2/ -type d | grep -v '\.svn' | sed 's#$(RECIPES)/files/clib2##'` ; do mkdir -p $(BUILDDIR)/clib2$$dir ; done
+ for file in `find $(RECIPES)/files/clib2/ -type f | grep -v '\.svn' | sed 's#$(RECIPES)/files/clib2##'` ; do cp -p $(RECIPES)/files/clib2$$file $(BUILDDIR)/clib2$$file ; done
+ touch $@
+
+
###
# Rules to install the NDK
###
diff --git a/sdk/Makefile b/sdk/Makefile
index 3827095..70e37d0 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -336,22 +336,25 @@ $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz:
# OpenSSL
$(BUILDSTEPS)/openssl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/openssl-src.d
+ cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared no-threads $(EXTRAARGS_OPENSSL)
+ cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) make install
+ touch $@
+
+# prepare the openssl source tree
+$(BUILDSTEPS)/openssl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz
+ $(RM) -rf $(BUILDDIR)/openssl
mkdir -p $(BUILDDIR)/openssl
cd $(BUILDDIR)/openssl && tar xaf $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz
- for p in `ls $(RECIPES)/patches/openssl/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p ; done
+ for p in `ls $(RECIPES)/patches/openssl/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p || exit $0 ; done
ifneq ($(realpath $(RECIPES)/patches/openssl/$(TARGET)),)
- for p in `ls $(RECIPES)/patches/openssl/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p ; done
+ for p in `ls $(RECIPES)/patches/openssl/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p || exit $0 ; done
endif
ifneq ($(realpath $(RECIPES)/files/openssl/$(TARGET)),)
cp -r $(RECIPES)/files/openssl/$(TARGET)/* $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL)
endif
- cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) ./Configure --prefix=$(GCCSDK_INSTALL_ENV) $(TARGET) no-shared no-threads $(EXTRAARGS_OPENSSL)
- cd $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) && $(env) make install
- touch $@
-
-$(BUILDSTEPS)/openssl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz
touch $@
+# get the openssl source tar
$(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz:
$(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://www.openssl.org/source/$(subst $(SOURCEDIR)/,,$@)" $@
diff --git a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
index 1d506af..4f6fa4b 100644
--- a/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
+++ b/sdk/recipes/patches/openssl/m68k-unknown-amigaos/crypto.bio.b_sock2.c.p
@@ -1,5 +1,5 @@
---- crypto/bio/b_sock2.c.orig 2017-11-23 12:39:17.912640213 +0000
-+++ crypto/bio/b_sock2.c 2017-11-23 12:41:56.350294762 +0000
+--- crypto/bio/b_sock2.c.orig 2019-02-15 10:07:24.181612545 +0000
++++ crypto/bio/b_sock2.c 2019-02-15 10:07:15.637654488 +0000
@@ -94,6 +94,7 @@
}
}
@@ -16,9 +16,7 @@
if (connect(sock, BIO_ADDR_sockaddr(addr),
BIO_ADDR_sockaddr_size(addr)) == -1) {
---- crypto/bio/b_sock2.c.orig 2017-11-23 12:43:56.318461652 +0000
-+++ crypto/bio/b_sock2.c 2017-11-23 12:44:36.139861658 +0000
-@@ -193,6 +193,7 @@
+@@ -193,6 +195,7 @@
}
}
@@ -26,11 +24,11 @@
if (options & BIO_SOCK_NODELAY) {
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) != 0) {
SYSerr(SYS_F_SETSOCKOPT, get_last_socket_error());
-@@ -200,6 +201,7 @@
+@@ -200,6 +203,7 @@
return 0;
}
}
+#endif
# ifdef IPV6_V6ONLY
- if ((options & BIO_SOCK_V6_ONLY) && BIO_ADDR_family(addr) == AF_INET6) {
+ if (BIO_ADDR_family(addr) == AF_INET6) {