воскресенье, 15 декабря 2013 г.

uClibc

Download last source code here http://buildroot.uclibc.org/download.html

use "mips-linux-gcc" from /home/smirnov/buildroot-2013.11/output/host/usr/bin
sysroot is /home/smirnov/buildroot-2013.11/output/staging

воскресенье, 17 ноября 2013 г.

Embedded development

Debian
https://wiki.debian.org/EmdebianToolchain
Common
http://www.linux-mips.org/wiki/Toolchains

Actually working for TP-LINK mips processor + DDWRT
http://www.uclibc.org/toolchains.html
For DLNA
http://xupnpd.org/

среда, 1 мая 2013 г.

ObjC messages to nil

It's wide known fact that in ObjC you can safely send any message to 'nil' object. Implementation turned out to be a bit more tricky than I supposed, here is code of 'libobjc': Message will go to another receiver if system finds some value in '__objc_nilReceiver'! Moreover I found private ad-hoc function to change value of this variable without a hassle. And here is code that prints "Some" Just interesting fact to know...

суббота, 23 февраля 2013 г.

How to compile 'otool'

As a personal note.

1. Get it here: http://www.opensource.apple.com/source/cctools
2. Modify 'libstuff' Makefile to avoid 'LTO'(link time optimization) support. '-DLTO...' and 'lto.o'
3. Run 'make' inside libstuff directory
4. Run 'make' inside otool directory (don't remember exactly, may be Makefile update required as well)

otool.NEW

Error I was getting:
../lto.c:8:10: fatal error: 'llvm-c/lto.h' file not found
#include <llvm-c/lto.h>

среда, 30 января 2013 г.

Avoiding "-load-all" linker flag

Found a nice solution on how to avoid "-load-all" linker flag.
https://github.com/square/KIF/blob/master/Additions/LoadableCategory.h
Just quoting here:
//
// LoadableCategory.h
// KIF
//
// Created by Karl Stenerud on 7/16/11.
// Licensed to Square, Inc. under one or more contributor license agreements.
// See the LICENSE file distributed with this work for the terms under
// which Square, Inc. licenses this file to you.
/** Make all categories in the current file loadable without using -load-all.
*
* Normally, compilers will skip linking files that contain only categories.
* Adding a call to this macro adds a dummy class, which causes the linker
* to add the file.
*
* @param UNIQUE_NAME A globally unique name.
*/

#define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME @end @implementation FORCELOAD_##UNIQUE_NAME @end