[Suzaku-en:00179] Fw: thread compile

이준현 email@hidden
Mon Apr 3 10:26:08 JST 2006


1. Environment
  - kernel : uClinux-dist-20040408-suzaku6 (Suzaku-S)
  - uClibc in uClinux-dist-20040408-suzaku6 (installed to /usr/local)
  - toolchain : microblaze-elf-tools-20040315 / microblaze-elf-tools-20051121

2. To do
  - compile test program including thread function

3. Probleam
  - When compile, there are some error messages listed below :

     hello.elf2flt : In function '__drand48_iterate':
     /home/project/suzaku/uClinux-dist/uClibc/libc/stdlib/drand48-iter.c:37: undefined reference to 'muldi3_hardproc'
     collect2: ld returned 1 exit status
     make: ***[hello] Error 1

  - This is Makefile
-------------------------------------------------------------------------------------------------------------
# ROOTDIR = /usr/src/uClinux-dist
ifndef ROOTDIR
ROOTDIR=/home/project/suzaku/uClinux-dist
endif

MB_DIR = /usr/local/microblaze-elf-tools

CROSS = mb-
#CC = $(MB_DIR)/bin/$(CROSS)gcc
CC = $(CROSS)gcc
LD = $(MB_DIR)/bin/$(CROSS)ld

CFLAGS = -Os -g -fomit-frame-pointer -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -Wall -fno-builtin -I$(ROOTDIR)/lib/uClibc/include -I$(ROOTDIR)/lib/libm -I$(ROOTDIR)/lib/libcrypt_old -I$(ROOTDIR) -I$(ROOTDIR)/linux-2.4.x/include
#CFLAGS  += -I$(MB_DIR)/include

LDFLAGS = -Os -g -fomit-frame-pointer -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -Wall -fno-builtin -Wl,-elf2flt -nostartfiles $(ROOTDIR)/lib/uClibc/lib/crt0.o -L$(ROOTDIR)/lib/uClibc/lib -L$(ROOTDIR)/lib/libm -L$(ROOTDIR)/lib/libnet -L$(ROOTDIR)/lib/libdes -L$(ROOTDIR)/lib/libaes -L$(ROOTDIR)/lib/libcap -L$(ROOTDIR)/lib/libssl -L$(ROOTDIR)/lib/libcrypt_old -L$(ROOTDIR)/lib/zlib
LDFLAGS += -L$(MB_DIR)/microblaze/lib
#LDFLAGS += -L$(MB_DIR)/lib

#LDLIBS = -lc $(MB_DIR)/lib/gcc-lib/microblaze/2.95.3-4/libgcc.a $(MB_DIR)/microblaze/lib/libc_soft.a -lc
#LDLIBS = -lc $(MB_DIR)/microblaze/lib/libc_soft.a
#LDLIBS = -lc $(MB_DIR)/lib/gcc/microblaze/3.4.1/libgcc.a
LDLIBS = -lc $(MB_DIR)/microblaze/lib/libc.a
#LDLIBS = -lc $(ROOTDIR)/lib/uClibc/libc/libc.a
LIBS = -lpthread

EXEC  = hello
OBJS  = hello.o

all: $(EXEC)

$(EXEC): $(OBJS)
 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) $(LIBS)

%.o: %.c
 $(CC) -c $(CFLAGS) -o $@ $<

clean:
 rm -f $(EXEC) *.elf *.gdb *.o
-------------------------------------------------------------------------------------------------------------

regards, 

joon hyun, lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.atmark-techno.com/pipermail/suzaku-en/attachments/20060403/8b496d72/attachment.html>


More information about the suzaku-en mailing list