Skip to contentSkip to conversation

problem with cross compiling

DISCUSSION Yunus Yucel Altunbicak 2 participants 2 messages Nov 6, 2001 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi all,
i couldn't compile the util directory neither m68k-elf-gcc nor m68k-pic-coff-gcc.
if i try this
m68k-elf-gcc -I../include -O2 -m68000 -Wl,-elf2flt nftl_format.c -o nftl_format -lc

get below error message

/************************************/ nftl_format.elf2flt: In function `check_block_2':
nftl_format.elf2flt(.text+0xf6): undefined reference to pread' nftl_format.elf2flt(.text+0x14a): undefined reference to pwrite' nftl_format.elf2flt(.text+0x1ec): undefined reference to pwrite' nftl_format.elf2flt(.text+0x204): undefined reference to pread' nftl_format.elf2flt(.text+0x28c): undefined reference to pwrite' nftl_format.elf2flt(.text+0x2a4): undefined reference to pread' nftl_format.elf2flt: In function `main':
nftl_format.elf2flt(.text+0x6b0): undefined reference to `pwrite'
collect2: ld returned 1 exit status /*****************************************/

does anybody encounter same error and solve it ?

Sincerely,
yunus

#1 lore raw
Quoted 1 line · [email protected] said:

does anybody encounter same error and solve it ?

Your libc is ancient and doesn't seem to provide pread() and pwrite(). Replacing them with wrappers which just seek and read/write should work.

--
dwmw2