Page 1 of 1
Makefile -lm
Posted: Mon Nov 03, 2008 10:20 am
by rcracer
Short question:
Where exactly in this makefile do i have to add the -lm to link the math libary
Code: Select all
CC=ee-gcc
AS=ee-as
LD=ee-elf-ld
OBJ_DIR = obj
CFLAGS = -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE
C_SRC = g2.c demo1.c
S_SRC = crt0.s ps2_asm.s dma_asm.s gs_asm.s
C_OBJ = $(addprefix $(OBJ_DIR)/, $(C_SRC:.c=.o))
S_OBJ = $(addprefix $(OBJ_DIR)/, $(S_SRC:.s=.o))
demo1.elf: $(C_OBJ) $(S_OBJ)
@echo "-------------------------------------------------"
$(CC) $(CFLAGS) -Tlinkfile -o demo1.elf $(C_OBJ) $(S_OBJ) -Wl,-Map,demo1.map
$(OBJ_DIR)/%.o: %.c
@echo "-------------------------------------------------"
$(CC) -c $(CFLAGS) $< -o $@
$(OBJ_DIR)/%.o: %.s
@echo "-------------------------------------------------"
$(CC) -xassembler-with-cpp -c $(CFLAGS) $< -o $@
clean:
rm -f $(C_OBJ) $(S_OBJ) *.map *.elf
thank you
Posted: Mon Nov 03, 2008 4:28 pm
by yoshi314
my guess is that here:
Code: Select all
$(CC) $(CFLAGS) -Tlinkfile -o demo1.elf $(C_OBJ) $(S_OBJ) -Wl,-Map,demo1.map
Posted: Mon Nov 03, 2008 9:47 pm
by rcracer
i have tried each position and with this:
Code: Select all
$(CC) $(CFLAGS) -Tlinkfile -o demo1.elf $(C_OBJ) $(S_OBJ) -lm -Wl,-Map,demo1.map
it seems math is linked but new errors:
Code: Select all
ee-gcc -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE -Tlinkfile -o demo1.elf obj/g2.o obj/demo1.o obj/crt0.o obj/ps2_asm.o obj/dma_asm.o obj/gs_asm.o -lm -Wl,-Map,demo1.map
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0xbc): In function `__ieee754_rem_pio2':
../../../../../newlib/libm/math/e_rem_pio2.c:104: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0xe8):../../../../../newlib/libm/math/e_rem_pio2.c:106: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0xfc):../../../../../newlib/libm/math/e_rem_pio2.c:111: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x10c):../../../../../newlib/libm/math/e_rem_pio2.c:111: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x134):../../../../../newlib/libm/math/e_rem_pio2.c:109: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x158):../../../../../newlib/libm/math/e_rem_pio2.c:115: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x184):../../../../../newlib/libm/math/e_rem_pio2.c:117: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x198):../../../../../newlib/libm/math/e_rem_pio2.c:122: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x1a8):../../../../../newlib/libm/math/e_rem_pio2.c:122: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x1d0):../../../../../newlib/libm/math/e_rem_pio2.c:120: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x214):../../../../../newlib/libm/math/e_rem_pio2.c:166: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x258):../../../../../newlib/libm/math/e_rem_pio2.c:174: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x260):../../../../../newlib/libm/math/e_rem_pio2.c:174: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x274):../../../../../newlib/libm/math/e_rem_pio2.c:175: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x288):../../../../../newlib/libm/math/e_rem_pio2.c:175: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x2b8):../../../../../newlib/libm/math/e_rem_pio2.c:177: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x304):../../../../../newlib/libm/math/e_rem_pio2.c:182: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x318):../../../../../newlib/libm/math/e_rem_pio2.c:182: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x340):../../../../../newlib/libm/math/e_rem_pio2.c:129: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x354):../../../../../newlib/libm/math/e_rem_pio2.c:129: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x360):../../../../../newlib/libm/math/e_rem_pio2.c:129: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x36c):../../../../../newlib/libm/math/e_rem_pio2.c:130: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x384):../../../../../newlib/libm/math/e_rem_pio2.c:131: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x394):../../../../../newlib/libm/math/e_rem_pio2.c:131: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x3ac):../../../../../newlib/libm/math/e_rem_pio2.c:132: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x3e4):../../../../../newlib/libm/math/e_rem_pio2.c:154: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x3fc):../../../../../newlib/libm/math/e_rem_pio2.c:158: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x40c):../../../../../newlib/libm/math/e_rem_pio2.c:158: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x430):../../../../../newlib/libm/math/e_rem_pio2.c:159: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x454):../../../../../newlib/libm/math/e_rem_pio2.c:138: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x488):../../../../../newlib/libm/math/e_rem_pio2.c:143: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x49c):../../../../../newlib/libm/math/e_rem_pio2.c:144: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x4b8):../../../../../newlib/libm/math/e_rem_pio2.c:145: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x4cc):../../../../../newlib/libm/math/e_rem_pio2.c:145: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x4dc):../../../../../newlib/libm/math/e_rem_pio2.c:145: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x4ec):../../../../../newlib/libm/math/e_rem_pio2.c:145: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x500):../../../../../newlib/libm/math/e_rem_pio2.c:146: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x530):../../../../../newlib/libm/math/e_rem_pio2.c:151: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x544):../../../../../newlib/libm/math/e_rem_pio2.c:152: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x55c):../../../../../newlib/libm/math/e_rem_pio2.c:153: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x570):../../../../../newlib/libm/math/e_rem_pio2.c:153: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x580):../../../../../newlib/libm/math/e_rem_pio2.c:153: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(e_rem_pio2.o)(.text+0x590):../../../../../newlib/libm/math/e_rem_pio2.c:153: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x4c): In function `__kernel_cos':
../../../../../newlib/libm/math/k_cos.c:78: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x6c):../../../../../newlib/libm/math/k_cos.c:80: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x84):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x98):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0xa8):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0xbc):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0xcc):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0xe0):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0xf0):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x104):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x114):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x128):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x138):../../../../../newlib/libm/math/k_cos.c:81: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x164):../../../../../newlib/libm/math/k_cos.c:83: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x178):../../../../../newlib/libm/math/k_cos.c:83: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x18c):../../../../../newlib/libm/math/k_cos.c:83: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x19c):../../../../../newlib/libm/math/k_cos.c:83: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x1ac):../../../../../newlib/libm/math/k_cos.c:83: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x1c0):../../../../../newlib/libm/math/k_cos.c:83: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x23c):../../../../../newlib/libm/math/k_cos.c:90: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x24c):../../../../../newlib/libm/math/k_cos.c:90: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x264):../../../../../newlib/libm/math/k_cos.c:91: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x278):../../../../../newlib/libm/math/k_cos.c:92: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x28c):../../../../../newlib/libm/math/k_cos.c:92: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x29c):../../../../../newlib/libm/math/k_cos.c:92: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_cos.o)(.text+0x2ac):../../../../../newlib/libm/math/k_cos.c:92: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xc0): In function `__kernel_rem_pio2':
../../../../../newlib/libm/math/k_rem_pio2.c:186: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x140):../../../../../newlib/libm/math/k_rem_pio2.c:190: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x150):../../../../../newlib/libm/math/k_rem_pio2.c:190: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x1ac):../../../../../newlib/libm/math/k_rem_pio2.c:197: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x1b8):../../../../../newlib/libm/math/k_rem_pio2.c:197: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x1c0):../../../../../newlib/libm/math/k_rem_pio2.c:197: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x1d8):../../../../../newlib/libm/math/k_rem_pio2.c:198: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x1e8):../../../../../newlib/libm/math/k_rem_pio2.c:198: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x1f4):../../../../../newlib/libm/math/k_rem_pio2.c:198: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x20c):../../../../../newlib/libm/math/k_rem_pio2.c:199: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x23c):../../../../../newlib/libm/math/k_rem_pio2.c:204: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x25c):../../../../../newlib/libm/math/k_rem_pio2.c:204: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x26c):../../../../../newlib/libm/math/k_rem_pio2.c:204: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x27c):../../../../../newlib/libm/math/k_rem_pio2.c:205: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x288):../../../../../newlib/libm/math/k_rem_pio2.c:206: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x298):../../../../../newlib/libm/math/k_rem_pio2.c:206: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x38c):../../../../../newlib/libm/math/k_rem_pio2.c:241: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x48c):../../../../../newlib/libm/math/k_rem_pio2.c:248: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x4c0):../../../../../newlib/libm/math/k_rem_pio2.c:249: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x4d0):../../../../../newlib/libm/math/k_rem_pio2.c:249: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x518):../../../../../newlib/libm/math/k_rem_pio2.c:258: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x5a0):../../../../../newlib/libm/math/k_rem_pio2.c:274: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x5b0):../../../../../newlib/libm/math/k_rem_pio2.c:274: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x5c8):../../../../../newlib/libm/math/k_rem_pio2.c:274: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x624):../../../../../newlib/libm/math/k_rem_pio2.c:279: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x634):../../../../../newlib/libm/math/k_rem_pio2.c:279: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x6ac):../../../../../newlib/libm/math/k_rem_pio2.c:293: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x6d8):../../../../../newlib/libm/math/k_rem_pio2.c:294: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x6f0):../../../../../newlib/libm/math/k_rem_pio2.c:295: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x714):../../../../../newlib/libm/math/k_rem_pio2.c:296: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x740):../../../../../newlib/libm/math/k_rem_pio2.c:297: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x7b4):../../../../../newlib/libm/math/k_rem_pio2.c:287: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x7e0):../../../../../newlib/libm/math/k_rem_pio2.c:288: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x824):../../../../../newlib/libm/math/k_rem_pio2.c:301: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x838):../../../../../newlib/libm/math/k_rem_pio2.c:302: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x848):../../../../../newlib/libm/math/k_rem_pio2.c:302: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x884):../../../../../newlib/libm/math/k_rem_pio2.c:306: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x898):../../../../../newlib/libm/math/k_rem_pio2.c:307: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x8a8):../../../../../newlib/libm/math/k_rem_pio2.c:307: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x8ec):../../../../../newlib/libm/math/k_rem_pio2.c:310: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x938):../../../../../newlib/libm/math/k_rem_pio2.c:314: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x950):../../../../../newlib/libm/math/k_rem_pio2.c:314: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x968):../../../../../newlib/libm/math/k_rem_pio2.c:314: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x9ac):../../../../../newlib/libm/math/k_rem_pio2.c:263: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x9d8):../../../../../newlib/libm/math/k_rem_pio2.c:264: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x9e4):../../../../../newlib/libm/math/k_rem_pio2.c:264: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0x9ec):../../../../../newlib/libm/math/k_rem_pio2.c:264: undefined reference to `litodp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xa00):../../../../../newlib/libm/math/k_rem_pio2.c:265: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xa10):../../../../../newlib/libm/math/k_rem_pio2.c:265: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xa1c):../../../../../newlib/libm/math/k_rem_pio2.c:265: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xa2c):../../../../../newlib/libm/math/k_rem_pio2.c:265: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xa58):../../../../../newlib/libm/math/k_rem_pio2.c:235: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xa80):../../../../../newlib/libm/math/k_rem_pio2.c:236: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_rem_pio2.o)(.text+0xae4):../../../../../newlib/libm/math/k_rem_pio2.c:214: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x4c): In function `__kernel_sin':
../../../../../newlib/libm/math/k_sin.c:71: undefined reference to `dptoli'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x68):../../../../../newlib/libm/math/k_sin.c:72: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x7c):../../../../../newlib/libm/math/k_sin.c:73: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x94):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0xa8):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0xb8):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0xcc):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0xdc):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0xf0):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x100):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x114):../../../../../newlib/libm/math/k_sin.c:74: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x130):../../../../../newlib/libm/math/k_sin.c:75: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x144):../../../../../newlib/libm/math/k_sin.c:75: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x154):../../../../../newlib/libm/math/k_sin.c:75: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x164):../../../../../newlib/libm/math/k_sin.c:75: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x1a4):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x1b8):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x1c8):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x1d8):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x1e8):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x200):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x210):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(k_sin.o)(.text+0x220):../../../../../newlib/libm/math/k_sin.c:76: undefined reference to `dpsub'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_floor.o)(.text+0x6c): In function `floor':
../../../../../newlib/libm/math/s_floor.c:107: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_floor.o)(.text+0x7c):../../../../../newlib/libm/math/s_floor.c:107: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_floor.o)(.text+0x108):../../../../../newlib/libm/math/s_floor.c:99: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_floor.o)(.text+0x118):../../../../../newlib/libm/math/s_floor.c:99: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_floor.o)(.text+0x184):../../../../../newlib/libm/math/s_floor.c:114: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_floor.o)(.text+0x1b8):../../../../../newlib/libm/math/s_floor.c:118: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_floor.o)(.text+0x1c8):../../../../../newlib/libm/math/s_floor.c:118: undefined reference to `dpcmp'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_scalbn.o)(.text+0x58): In function `scalbn':
../../../../../newlib/libm/common/s_scalbn.c:84: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_scalbn.o)(.text+0x90):../../../../../newlib/libm/common/s_scalbn.c:87: undefined reference to `dpmul'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_scalbn.o)(.text+0x198):../../../../../newlib/libm/common/s_scalbn.c:101: undefined reference to `dpadd'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libm.a(s_sin.o)(.text+0x48): In function `sin':
../../../../../newlib/libm/math/s_sin.c:117: undefined reference to `dpsub'
collect2: ld returned 1 exit status
"make": *** [demo1.elf] Error 1
any idea what is missing?
Posted: Tue Nov 04, 2008 7:36 am
by J.F.
You should use the "sdk" makefile. An example is like the NeoCD emulator:
Code: Select all
# _ ___ ___ ___ ___ ____ ___ ___
# |\ | |___ | | | | / ___| | ___|
# | \_| |___ |___| |___ ___| / | ___| |___ Neocd/Ps2 Project.
#----------------------------------------------------------------------
# Copyright 2004 - Olivier "evilo" Biot <[email protected]>
# Released under GNU license
# Review neocd/ps2 COPYING & LICENSE files for further details.
#----------------------------------------------------------------------
# Cygwin Env
# GCC 3.2.2
# PS2SDK 1.2
#----------------------------------------------------------------------
# Compilation Flags
# -DCPU68K_USE_MUSASHI use musashi 68k core (working core)
# -DCPU68K_USE_C68K use stef 68k core (wip, not working)
#
# -DCPUZ80_MAMEZ80_CORE use mame z80 core (working core)
# -DCPUZ80_CZ80_CORE use stef z80 core (wip, not working)
#
#----------------------------------------------------------------------
EE_BIN = neocd.elf
EE_OBJS = neocd.o pd4990a.o \
cpu_68k/cpu68k.o \
cpu_z80/z80intrf.o cpu_z80/cz80/cz80.o cpu_z80/mamez80/z80.o \
misc/misc.o misc/timer.o \
input/input.o \
memory/memory.o \
save/mc.o save/ngcdIcn.o \
gui/menu.o gui/ps2print.o \
sound/sound.o sound/2610intf.o sound/ay8910.o \
sound/fm.o sound/ymdeltat.o \
sound/timer.o static/isjpcmIrx.o sound/sjpcm_rpc.o \
video/video.o video/draw_fix.o \
cdrom/cdrom.o static/cdvdIrx.o cdrom/cdvd_rpc.o cdaudio/cdaudio.o \
gs/gfxpipe.o gs/hw.o gs/gs.o
EE_CFLAGS += -funroll-loops -finline-functions -freorder-blocks -funsigned-char \
-fno-exceptions -mhard-float -EL -ffast-math -DINLINE="inline" -DLSB_FIRST \
-DCPU68K_USE_MUSASHI -DCPUZ80_MAMEZ80_CORE
EE_INCS += -I. -I$(PS2SDK)/sbv/include/
EE_LDFLAGS += -L$(PS2SDK)/sbv/lib -L./cpu_68k -L./cdrom
EE_LIBS += -lpatches -lcpu_68k -lcdvdfs -lc -lm -lcdvd -lmc -lpad -lgcc
CP_CMD = cp
BIN_DIR =../bin
all: $(EE_BIN)
$(EE_STRIP) $(EE_BIN)
$(CP_CMD) $(EE_BIN) $(BIN_DIR)/$(EE_BIN)
clean:
rm -f -R $(EE_BIN) $(EE_OBJS)
reset :
ps2client -h 192.168.1.110 reset
run :
ps2client -h 192.168.1.110 execee host:$(EE_BIN)
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
Notice that it includes various sdk makefiles (pref and eeglobal). Notice that those then use the various EE_ variables, like EE_LIBS (which is where you put things like -lm).