Bug 367664: Miscellaneous RISC OS support
authornelson%bolyard.com
Tue, 11 Aug 2009 03:23:39 +0000
changeset 9360 a96679b39865810da7b977df8e57210c009f1c06
parent 9359 ca997d521f5a5f83a27c64ffceb241cb62baed1d
child 9365 cee18bc6fc927f9280feee4b1bc14a6c41ee5b75
push idunknown
push userunknown
push dateunknown
bugs367664
Bug 367664: Miscellaneous RISC OS support Patch contributed by Peter Naulls <peter@chocky.org>, r=nelson
security/coreconf/RISCOS.mk
security/coreconf/rules.mk
--- a/security/coreconf/RISCOS.mk
+++ b/security/coreconf/RISCOS.mk
@@ -15,16 +15,17 @@
 # The Original Code is the Netscape security libraries.
 #
 # The Initial Developer of the Original Code is
 # Netscape Communications Corporation.
 # Portions created by the Initial Developer are Copyright (C) 1994-2000
 # the Initial Developer. All Rights Reserved.
 #
 # Contributor(s):
+#   Peter Naulls
 #
 # Alternatively, the contents of this file may be used under the terms of
 # either the GNU General Public License Version 2 or later (the "GPL"), or
 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
@@ -32,17 +33,24 @@
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 include $(CORE_DEPTH)/coreconf/UNIX.mk
 
-DLL_SUFFIX  = a
-MKSHLIB     = $(GCCSDK_INSTALL_CROSSBIN)/arm-unknown-riscos-ar cr
+LIB_SUFFIX  = a
+DLL_SUFFIX  = so
+AR          = ar cr $@ 
+LDOPTS     += -L$(SOURCE_LIB_DIR)
+MKSHLIB     = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
 
 OS_RELEASE =
 OS_TARGET  = RISCOS
 
+DSO_CFLAGS              = -fPIC
+DSO_LDOPTS              = -shared
+DSO_LDFLAGS             =
+
 ifdef BUILD_OPT
-	OPTIMIZER = -O2 -mpoke-function-name
+	OPTIMIZER = -O3
 endif
--- a/security/coreconf/rules.mk
+++ b/security/coreconf/rules.mk
@@ -333,21 +333,17 @@ else
 ifdef MT
 	if test -f $@.manifest; then \
 		$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \
 		rm -f $@.manifest; \
 	fi
 endif	# MSVC with manifest tool
 endif
 else
-ifeq ($(OS_TARGET),RISCOS)
-	$(MKSHLIB) $@ $(OBJS) $(SUB_SHLOBJS)
-else
 	$(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
-endif
 	chmod +x $@
 ifeq ($(OS_TARGET),Darwin)
 ifdef MAPFILE
 	nmedit -s $(MAPFILE) $@
 endif
 endif
 endif
 endif