Showing posts with label gcc. Show all posts
Showing posts with label gcc. Show all posts

Thursday, May 1, 2008

64 Core processors with Linux development tools


Was going through TILE64™ PROCESSOR FAMILY from Tilera Corp.

A 64 core architecture. I got impressed by reading because i think this is one way to future. everybody like to be back to RISC architecture and the RISC models getting more attention.

Read more on this :http://www.tilera.com/products/processors.php


© yankandpaste®

Saturday, March 29, 2008

TCL PCAP (tcap ) lib makefile for mac

$ cat Makefile
all: tcap.so

tcap.so: tcap.c pcaputil.c
gcc -O2 -Wall -pedantic -g -c -I/usr/local/include/tcl8.3/
tcap.c
gcc -O2 -Wall -g -c pcaputil.c
gcc -dynamiclib -g tcap.o pcaputil.o -lpcap -ltcl -o tcap.so

install: tcap.so
mkdir -p /System/Library/Tcl/tcap
cp pkgIndex.tcl /System/Library/Tcl/tcap/pkgIndex.tcl
cp tcap.so /System/Library/Tcl/tcap/tcap.so

clean:
rm -f *.core *.o *.so
$


© yankandpaste®

Saturday, January 26, 2008

Compile hello.c in steps

How ?

hello.c
=======

#include

int
main (void)
{
printf ("Hello, world!\n");
return 0;
}


one way to do : "gcc hello.c "

Lets do it step by step :

cpp hello.c > hello.i

hello.i will have all macros expanded.

gcc -Wall -S hello.i

check for hello.s - yep its assembly language code

as hello.s -o hello.o

Now Object file time, created object file using -o option

now ld time but LD need to have a lot options so lets go for

gcc hello.o

this links and create a.out

run a.out and see "Hello, world!".

too long ?? k just use --save-temps options in gcc, all temp files will be saved

'gcc --save-temps hello.c' and do an ls after :-)

tools for help:

file : identifies the file type and some of its characteristics
nm : shows symbol table
ldd : shows list of shared libraries an executable needs

© yankandpaste®