[gccsdk] Nettle autobuilder patch

Alex Macfarlane Smith nospam at archifishal.co.uk
Sun Jun 3 05:37:49 PDT 2012


I've attached a patch for the nettle autobuilder, having firtled with 
the source upstream a bit :)

I couldn't work out how to make it create a package (I just got random 
errors about Nettle not being found and things), so I gave up :)

Alex.
-------------- next part --------------
Index: network/nettle/Run.p
===================================================================
--- network/nettle/Run.p	(revision 5848)
+++ network/nettle/Run.p	(working copy)
@@ -12,39 +12,3 @@
 -WimpSlot -min 256K -max 256K
 +WimpSlot -min 1600K -max 1600K
  Run <Nettle$Dir>.!RunImage %*0 ><Nettle$Dir>.stdout 2><Nettle$Dir>.stderr
-Index: c/sockwatch
-===================================================================
-RCS file: /cvsroot/nettle/nettle/c/sockwatch,v
-retrieving revision 1.8
-diff -u -r1.8 sockwatch
---- c/sockwatch	29 Aug 2010 19:45:29 -0000	1.8
-+++ c/sockwatch	31 May 2012 23:23:29 -0000
-@@ -19,7 +19,9 @@
- #include "sys/types.h"
- #include "sys/ioctl.h"
- #include "sys/socket.h"
--#ifndef __UNIXLIB_TYPES_H
-+#ifdef __UNIXLIB_TYPES_H
-+#include <unixlib/local.h>
-+#else
- #include "socklib.h"
- #include "sys/filio.h"
- #endif
-@@ -53,7 +55,7 @@
- 
- #ifdef __UNIXLIB_TYPES_H
-   /* get the underlying RISC OS socket handle from the Unixlib socket */
--  socket = __unixlib_getdev(socket);
-+  socket = __get_ro_socket(socket);
- #endif
- 
-   if ( newinternet )
-@@ -78,7 +80,7 @@
-     return;
- 
- #ifdef __UNIXLIB_TYPES_H
--  socket = __unixlib_getdev(socket);
-+  socket = __get_ro_socket(socket);
- #endif
- 
-   if ( newinternet )
Index: network/nettle/sockwatch.p
===================================================================
--- network/nettle/sockwatch.p	(revision 5848)
+++ network/nettle/sockwatch.p	(working copy)
@@ -1,36 +0,0 @@
-Index: c/sockwatch
-===================================================================
-RCS file: /cvsroot/nettle/nettle/c/sockwatch,v
-retrieving revision 1.8
-diff -u -r1.8 sockwatch
---- c/sockwatch	29 Aug 2010 19:45:29 -0000	1.8
-+++ c/sockwatch	31 May 2012 23:23:29 -0000
-@@ -19,7 +19,9 @@
- #include "sys/types.h"
- #include "sys/ioctl.h"
- #include "sys/socket.h"
--#ifndef __UNIXLIB_TYPES_H
-+#ifdef __UNIXLIB_TYPES_H
-+#include <unixlib/local.h>
-+#else
- #include "socklib.h"
- #include "sys/filio.h"
- #endif
-@@ -53,7 +55,7 @@
- 
- #ifdef __UNIXLIB_TYPES_H
-   /* get the underlying RISC OS socket handle from the Unixlib socket */
--  socket = __unixlib_getdev(socket);
-+  socket = __get_ro_socket(socket);
- #endif
- 
-   if ( newinternet )
-@@ -78,7 +80,7 @@
-     return;
- 
- #ifdef __UNIXLIB_TYPES_H
--  socket = __unixlib_getdev(socket);
-+  socket = __get_ro_socket(socket);
- #endif
- 
-   if ( newinternet )
Index: network/nettle/GNUmakefile.p
===================================================================
--- network/nettle/GNUmakefile.p	(revision 5848)
+++ network/nettle/GNUmakefile.p	(working copy)
@@ -1,40 +1,32 @@
 Index: GNUmakefile
 ===================================================================
 RCS file: /cvsroot/nettle/nettle/GNUmakefile,v
-retrieving revision 1.2
-diff -u -r1.2 GNUmakefile
---- GNUmakefile	21 Sep 2010 17:46:13 -0000	1.2
-+++ GNUmakefile	1 Jun 2012 09:44:00 -0000
-@@ -2,11 +2,11 @@
+retrieving revision 1.3
+diff -u -r1.3 GNUmakefile
+--- GNUmakefile	2 Jun 2012 17:20:34 -0000	1.3
++++ GNUmakefile	3 Jun 2012 12:24:11 -0000
+@@ -2,12 +2,12 @@
  # Makefile for cross-compiling Nettle
  #
  
--CC = /home/riscos/cross/bin/arm-unknown-riscos-gcc
--CFLAGS = -c -std=c9x -Wall -mpoke-function-name -I/home/riscos/env/include
+-CC = /home/riscos/gccsdk/cross/bin/arm-unknown-riscos-gcc
 +CC = gcc
-+CFLAGS = -c -std=c9x -Wall -mpoke-function-name
+ NATIVE_CC = /usr/bin/gcc
+-CFLAGS = -c -D_BSD_SOURCE -std=c9x -Wall -mpoke-function-name -I/home/riscos/gccsdk/env/include
++CFLAGS = -c -D_BSD_SOURCE -std=c9x -Wall -mpoke-function-name
  CONFIG = -DWITH_SSH
  
--LIBS = -L/home/riscos/env/lib -lssh2 -lgcrypt -lgpg-error
+-LIBS = -L/home/riscos/gccsdk/env/lib -lssh2 -lgcrypt -lgpg-error -lcrypto
 +LIBS = -lssh2 -lgcrypt -lgpg-error -lcrypto
  OBJS = chardefn.o choices.o dnslib.o globals.o init.o keyboard.o lineedit.o \
         main.o misc.o hotlist.o nettle.o process.o socket.o quit.o seln.o \
         wimp.o zapgen.o fortify.o sockwatch.o messages.o termlist.o url.o \
-@@ -23,7 +23,7 @@
+@@ -24,7 +24,7 @@
  
- !Nettle/!RunImage,ff8: RunImage,e1f
+ !Nettle/!RunImage,ff8: !Nettle/!RunImage,e1f
  	@echo " ELF2AIF:" $@
--	@/home/riscos/cross/bin/elf2aif $< $@
+-	@/home/riscos/gccsdk/cross/bin/elf2aif $< $@
 +	@elf2aif $< $@
+ 	@rm !Nettle/!RunImage,e1f
  
- RunImage,e1f: $(OBJS)
- 	@echo "    LINK:" $@
-@@ -37,7 +37,7 @@
- 
- # intentionally compiled using native compiler
- templheadr: templheadr.c
--	gcc -o $@ $(LINKFLAGS) $?
-+	/usr/bin/gcc -o $@ $(LINKFLAGS) $?
- 
- templ.h: templheadr $(TEMPLATES)
- 	./templheadr $(TEMPLATES) $@
+ !Nettle/!RunImage,e1f: $(OBJS)


More information about the gcc mailing list