anchor.diff:  	# gcc-cross-sdk get built :( (30/11/07)
   	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libgcc_s.so
   
  -	# Remove broken .la files
  -	rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la
  -
  -	# Generate link for sysroot use
  -	# /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr -> .
  -	cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
  -	ln -sf . usr 
  -
  -	# fix pkgconfig data files
  -	if [ -e ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/pkgconfig ]; then
  -		cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/pkgconfig
  -		for f in *.pc ; do
  -			sed -i 's%=/usr%=${prefix}/${TARGET_SYS}%g' "$f"
  -		done
  -		for f in *.pc ; do
  -			sed -i 's%${STAGING_DIR}%${prefix}%g' "$f"
  -		done
  -	fi
  -	
  +	# Fix or remove broken .la files
  +	for i in `find ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} -name \*.la`; do
  +		sed -i 	-e "/^dependency_libs=/s,\([[:space:]']\)${layout_base_libdir},\1${prefix}/${TARGET_SYS}${layout_base_libdir},g" \
  +			-e "/^dependency_libs=/s,\([[:space:]']\)${layout_libdir},\1${prefix}/${TARGET_SYS}${layout_libdir},g" \
  +			-e "/^dependency_libs=/s,\-\([LR]\)${layout_base_libdir},-\1${prefix}/${TARGET_SYS}${layout_base_libdir},g" \
  +			-e "/^dependency_libs=/s,\-\([LR]\)${layout_libdir},-\1${prefix}/${TARGET_SYS}${layout_libdir},g" \
  +			-e 's/^installed=yes$/installed=no/' $i
  +	done
  +	rm -f ${SDK_OUTPUT}/${prefix}/lib/*.la
   
   	# Setup site file for external use
   	siteconfig=${SDK_OUTPUT}/${prefix}/site-config
  
positive.code: 	touch $script
  	echo 'export PATH=${prefix}/bin:$PATH' >> $script
  	echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script
  	echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script
  	echo 'export CONFIG_SITE=${prefix}/site-config' >> $script
  
  	# Add version information
  	versionfile=${SDK_OUTPUT}/${prefix}/version
  
negative.code: 	${IPKG_TARGET} update
  	${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
  
  	install -d ${SDK_OUTPUT}/${prefix}/usr/lib/opkg
  	mv ${SDK_OUTPUT}/usr/lib/opkg/* ${SDK_OUTPUT}/${prefix}/usr/lib/opkg/
  	rm -Rf ${SDK_OUTPUT}/usr/lib
  
  	install -d ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/${layout_sysconfdir}
  	install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/${layout_sysconfdir}/
  
  	install -d ${SDK_OUTPUT}/${sysconfdir}
  	install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${sysconfdir}/
  
  	# extract and store ipks, pkgdata and shlibs data
  	target_pkgs=`cat ${SDK_OUTPUT}/${prefix}/package-status | grep Package: | cut -f 2 -d ' '`
  