[uClibc]Compiling for NetSilicon NET+40 under cross environment + uClibc-0.9.9
bem
b.mertke at bfad.de
Tue Feb 12 13:57:57 UTC 2002
Hello,
I am trying to compile program for NetSilicon under
cross development environment on my PC. The programm should
by linked against uClib-0.9.9. With the development kit from
NetSilicon is delivered also an example how to manage it.
The compiling phase is going through but when linker is started
there is an switch -lmf which is not accepted by linker. I have no
idea what this switch is doing.
If I am linking against glibc everything is working well.
BTW I am compiling only a simple "hello world".
Hier is my Makefile:
GCCLIB =
/usr/local/armtools_glibc/lib/gcc-lib/arm-uclinux/2.96/soft
UCLIB = /usr/local/NETLx/uClibc-0.9.9
UCLIBC = $(UCLIB)/lib
UCLIBM = $(UCLIB)/lib
UCLIBCI = $(UCLIB)/include
STARTUP = $(UCLIBC)/crt0.o
OBJFMT = elf
OBJFMTD = elfdebug
OBJFMT2FLT = ldelf2flt
LDFLAGS = -L$(UCLIBC) -L$(UCLIBM) -L$(GCCLIB) -L1 -lc -lmf -lgcc
-lc
LD = arm-uclinux-ld
LINK = ($(LD) -r -M -T $(UCLIBC)/user.ld $(STARTUP) $^
$(LDFLAGS) -o $@.$(OBJFMT) && $(OBJFMT2FLT) -o $@ $@.$(OBJFMT)) > $@.map
LINKD = $(LD) -T $(UCLIBC)/debug.ld $(STARTUP) $^ $(LDFLAGS) -o
$@.$(OBJFMTD)
CFLAGS = -g -O -I$(UCLIBCI) -I$(UCLIBM) -Wall -mapcs-32
-mcpu=arm7tdmi -fpic -msingle-pic-base -mno-got -fomit-frame-pointer
-D__linux__ -D__uclinux__CC = arm-uclinux-gcc
SRC = main.c
OBJ = $(SRC:.c=.o)
CC=arm-uclinux-gcc
AR=arm-uclinux-ar
RANLIB=arm-uclinux-ranlib
#AS=arm-uclinux-as
.S.s:
$(CC) $(CFLAGS) -D__ASSEMBLY__ -traditional -E -o $*.s $<
.S.o:
$(CC) $(CFLAGS) -c -o $*.o $<
.s.o:
$(CC) $(CFLAGS) -c -o $*.o $<
all: hello_uClibc
hello_uClibc: $(OBJ)
$(LINK)
# $(LINKD)
clean:
rm -f $(OBJ) hello_uClibc *.elf *.elfdebug *.map
Who have made any expirience with this stuff?
Thanks in advance.
Ben
--
__________________________
BFAD GmbH & Co.KG
Benjamin Mertke
Carl-Benz-Straße 19
D-78224 Singen
Tel. +49 7731 9057 730
Fax +49 7731 9057 655
E-Mail: b.mertke at bfad.de
Internet: www.GETembedded.de
___________________________
More information about the uClibc
mailing list