Browse Source
			
			
			
			
				
		Note: Because of the special "nature" of the bglibs build system this
      change also introduces 2 patches and a 'bg-config.in' to adjust
      build system settings while cross-compiling!
      Please take a look at the patches and conf files for further comments!
			
			
				cross
			
			
		
				 5 changed files with 241 additions and 1 deletions
			
			
		| @ -0,0 +1,26 @@ | ||||
| # --- SDE-COPYRIGHT-NOTE-BEGIN --- | ||||
| # This copyright note is auto-generated by ./scripts/Create-CopyPatch. | ||||
| # | ||||
| # Filename: package/.../bglibs/bg-config.in | ||||
| # Copyright (C) 2008 The OpenSDE Project | ||||
| # | ||||
| # More information can be found in the files COPYING and README. | ||||
| # | ||||
| # This program is free software; you can redistribute it and/or modify | ||||
| # it under the terms of the GNU General Public License as published by | ||||
| # the Free Software Foundation; version 2 of the License. A copy of the | ||||
| # GNU General Public License can be found in the file COPYING. | ||||
| # --- SDE-COPYRIGHT-NOTE-END --- | ||||
| 
 | ||||
| # adjust conf-cc and conf-ld files for using the cross-compiler | ||||
| pkg_bg_crosscc() { | ||||
| 	sed -i -e "s,gcc,$CC,g" conf-cc | ||||
| 	sed -i -e "s,gcc,$CC,g" conf-ld | ||||
| 	echo "$AR" > conf-ar | ||||
| 	echo "$RANLIB" > conf-ranlib | ||||
| 	echo "$root/usr/bin/libtool" > conf-libtool | ||||
| 	# use the native bg-installer and crc-gentab we built at stage 0 | ||||
| 	echo "$root/TOOLCHAIN/tools.cross/usr/bglibs/bin/bg-installer" > conf-installer | ||||
| 	echo "$root/TOOLCHAIN/tools.cross/usr/bglibs/bin/crc-gentab" > conf-crc-gentab-native | ||||
| } | ||||
| atstage cross && hook_add preconf 5 'pkg_bg_crosscc' | ||||
| @ -0,0 +1,106 @@ | ||||
| # --- SDE-COPYRIGHT-NOTE-BEGIN --- | ||||
| # This copyright note is auto-generated by ./scripts/Create-CopyPatch. | ||||
| # | ||||
| # Filename: package/.../bglibs/crc-gentab-native.patch.cross | ||||
| # Copyright (C) 2008 The OpenSDE Project | ||||
| # | ||||
| # More information can be found in the files COPYING and README. | ||||
| # | ||||
| # This patch file is dual-licensed. It is available under the license the | ||||
| # patched project is licensed under, as long as it is an OpenSource license | ||||
| # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms | ||||
| # of the GNU General Public License as published by the Free Software | ||||
| # Foundation; either version 2 of the License, or (at your option) any later | ||||
| # version. | ||||
| # --- SDE-COPYRIGHT-NOTE-END --- | ||||
| 
 | ||||
| Author: Christian Wiese <[email protected]> | ||||
| Origin: OpenSDE (http://opensde.org) | ||||
| Description: While cross-compiling we have to use a 'native' crc-gentab | ||||
|              for being able to generate some source files. | ||||
|              For this purpuse we introduce 'conf-crc-gentab-native' where | ||||
|              the path to the natively built crc-gentab can be stored, to | ||||
|              generate the 'crc-gentab-native' wrapper script which is used | ||||
|              for generating the files. | ||||
| 
 | ||||
| --- bglibs-1.102/Makefile.orig	2008-03-13 04:10:16.000000000 +0200 | ||||
| +++ bglibs-1.102/Makefile	2008-03-13 04:16:24.000000000 +0200 | ||||
| @@ -241,14 +241,21 @@ | ||||
|  	) >compile | ||||
|  	chmod 755 compile | ||||
|   | ||||
| +crc-gentab-native: conf-crc-gentab-native | ||||
| +	(  \ | ||||
| +	  echo '#!/bin/sh';\ | ||||
| +	  echo exec `head -n 1 conf-crc-gentab-native` '"$$@"' ; \ | ||||
| +	) >crc-gentab-native | ||||
| +	chmod 755 crc-gentab-native | ||||
| + | ||||
|  crc-gentab: crc-gentab.o load libbg-msg.a libbg-iobuf.a libbg-sysdeps.a | ||||
|  	./load crc-gentab libbg-msg.a libbg-iobuf.a libbg-sysdeps.a   | ||||
|   | ||||
|  crc-gentab.o: compile crc-gentab.c sysdeps.h iobuf/iobuf.h iobuf/common.h iobuf/ibuf.h iobuf/common.h iobuf/obuf.h iobuf/common.h msg/msg.h | ||||
|  	./compile crc-gentab.c | ||||
|   | ||||
| -crc/crc16_arc_table.c: crc-gentab | ||||
| -	./crc-gentab crc16_arc 16 0x8005 reflected >$@ | ||||
| +crc/crc16_arc_table.c: crc-gentab crc-gentab-native | ||||
| +	./crc-gentab-native crc16_arc 16 0x8005 reflected >$@ | ||||
|   | ||||
|  crc/crc16_arc_table.lo: libcompile crc/crc16_arc_table.c crc/crc16_arc.h crc/gcrc.h sysdeps.h | ||||
|  	./libcompile crc/crc16_arc_table.c | ||||
| @@ -256,8 +263,8 @@ | ||||
|  crc/crc16_arc_table.o: compile crc/crc16_arc_table.c crc/crc16_arc.h crc/gcrc.h sysdeps.h | ||||
|  	./compile crc/crc16_arc_table.c | ||||
|   | ||||
| -crc/crc16_ccitt_table.c: crc-gentab | ||||
| -	./crc-gentab crc16_ccitt 16 0x1021 normal >$@ | ||||
| +crc/crc16_ccitt_table.c: crc-gentab crc-gentab-native | ||||
| +	./crc-gentab-native crc16_ccitt 16 0x1021 normal >$@ | ||||
|   | ||||
|  crc/crc16_ccitt_table.lo: libcompile crc/crc16_ccitt_table.c crc/crc16_ccitt.h crc/gcrc.h sysdeps.h | ||||
|  	./libcompile crc/crc16_ccitt_table.c | ||||
| @@ -265,8 +272,8 @@ | ||||
|  crc/crc16_ccitt_table.o: compile crc/crc16_ccitt_table.c crc/crc16_ccitt.h crc/gcrc.h sysdeps.h | ||||
|  	./compile crc/crc16_ccitt_table.c | ||||
|   | ||||
| -crc/crc16_xmodem_table.c: crc-gentab | ||||
| -	./crc-gentab crc16_xmodem 16 0x8408 reflected >$@ | ||||
| +crc/crc16_xmodem_table.c: crc-gentab crc-gentab-native | ||||
| +	./crc-gentab-native crc16_xmodem 16 0x8408 reflected >$@ | ||||
|   | ||||
|  crc/crc16_xmodem_table.lo: libcompile crc/crc16_xmodem_table.c crc/crc16_xmodem.h uint16.h sysdeps.h uintnn.h | ||||
|  	./libcompile crc/crc16_xmodem_table.c | ||||
| @@ -274,8 +281,8 @@ | ||||
|  crc/crc16_xmodem_table.o: compile crc/crc16_xmodem_table.c crc/crc16_xmodem.h uint16.h sysdeps.h uintnn.h | ||||
|  	./compile crc/crc16_xmodem_table.c | ||||
|   | ||||
| -crc/crc32_table.c: crc-gentab | ||||
| -	./crc-gentab crc32 32 0x04C11DB7 reflected >$@ | ||||
| +crc/crc32_table.c: crc-gentab crc-gentab-native | ||||
| +	./crc-gentab-native crc32 32 0x04C11DB7 reflected >$@ | ||||
|   | ||||
|  crc/crc32_table.lo: libcompile crc/crc32_table.c crc/crc32.h crc/gcrc.h sysdeps.h uint32.h sysdeps.h uintnn.h | ||||
|  	./libcompile crc/crc32_table.c | ||||
| @@ -283,8 +290,8 @@ | ||||
|  crc/crc32_table.o: compile crc/crc32_table.c crc/crc32.h crc/gcrc.h sysdeps.h uint32.h sysdeps.h uintnn.h | ||||
|  	./compile crc/crc32_table.c | ||||
|   | ||||
| -crc/crc32c_table.c: crc-gentab | ||||
| -	./crc-gentab crc32c 32 0x1EDC6F41 reflected >$@ | ||||
| +crc/crc32c_table.c: crc-gentab crc-gentab-native | ||||
| +	./crc-gentab-native crc32c 32 0x1EDC6F41 reflected >$@ | ||||
|   | ||||
|  crc/crc32c_table.lo: libcompile crc/crc32c_table.c crc/crc32c.h crc/gcrc.h sysdeps.h | ||||
|  	./libcompile crc/crc32c_table.c | ||||
| @@ -292,8 +299,8 @@ | ||||
|  crc/crc32c_table.o: compile crc/crc32c_table.c crc/crc32c.h crc/gcrc.h sysdeps.h | ||||
|  	./compile crc/crc32c_table.c | ||||
|   | ||||
| -crc/crc64_table.c: crc-gentab | ||||
| -	./crc-gentab crc64 64 0x42F0E1EBA9EA3693 normal >$@ | ||||
| +crc/crc64_table.c: crc-gentab crc-gentab-native | ||||
| +	./crc-gentab-native crc64 64 0x42F0E1EBA9EA3693 normal >$@ | ||||
|   | ||||
|  crc/crc64_table.lo: libcompile crc/crc64_table.c crc/crc64.h crc/gcrc.h sysdeps.h | ||||
|  	./libcompile crc/crc64_table.c | ||||
									
										
											File diff suppressed because one or more lines are too long
										
									
								
							
						
					Loading…
					
					
				
		Reference in new issue