Open jcmartins opened 8 years ago
Did you try using "-specs=nosys.specs"?
tks @mtl1979 !!! now I didn't have any error!!!
Using -none- compiler in the beginning was a bad idea, because each board uses different I/O logic and different implementations need different support libraries... "nosys" is generic implementation for barebone systems.
export TARGETMACH=arm-none-eabi export CROSS=arm-none-eabi export CFLAGS="-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16" export CC=${CROSS}-gcc export LD=${CROSS}-ld export AS=${CROSS}-as
make distclean rm -f .o .lo ~ \ example minigzip examplesh minigzipsh \ example64 minigzip64 \ infcover \ libz. foo.gz so_locations \ match.s maketree contrib/infback9/.o rm -rf objs rm -f .gcda .gcno *.gcov rm -f contrib/infback9/.gcda contrib/infback9/.gcno contrib/infback9/_.gcov cp -p zconf.h.in zconf.h rm -f Makefile zlib.pc configure.log [jmartins@pinguim zlib]$ [jmartins@pinguim zlib]$ ./configure --prefix=/home/jmartins/zlib/joao/ Checking for shared library support... Building shared library libz.so.1.2.8 with arm-none-eabi-gcc. Checking for off64_t... No. Checking for fseeko... No. Checking for strerror... No. Checking for unistd.h... Yes. Checking for stdarg.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf(). Checking for vsnprintf() in stdio.h... No. WARNING: vsnprintf() not found, falling back to vsprintf(). zlib can build but will be open to possible buffer-overflow security vulnerabilities. Checking for return value of vsprintf()... Yes. Checking for attribute(visibility) support... Yes. [jmartins@pinguim zlib]$ make test arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -c -o example.o test/example.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o adler32.o adler32.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o crc32.o crc32.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o deflate.o deflate.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o infback.o infback.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o inffast.o inffast.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o inflate.o inflate.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o inftrees.o inftrees.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o trees.o trees.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o zutil.o zutil.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o compress.o compress.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o uncompr.o uncompr.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o gzclose.o gzclose.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o gzlib.o gzlib.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o gzread.o gzread.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -c -o gzwrite.o gzwrite.c ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o example example.o -L. libz.a /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-exit.o): In function
exit': exit.c:(.text.exit+0x16): undefined reference to
_exit' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-sbrkr.o): In function_sbrk_r': sbrkr.c:(.text._sbrk_r+0xc): undefined reference to
_sbrk' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-writer.o): In function_write_r': writer.c:(.text._write_r+0x12): undefined reference to
_write' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-closer.o): In function_close_r': closer.c:(.text._close_r+0xc): undefined reference to
_close' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-lseekr.o): In function_lseek_r': lseekr.c:(.text._lseek_r+0x12): undefined reference to
_lseek' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-openr.o): In function_open_r': openr.c:(.text._open_r+0x12): undefined reference to
_open' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-readr.o): In function_read_r': readr.c:(.text._read_r+0x12): undefined reference to
_read' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-fstatr.o): In function_fstat_r': fstatr.c:(.text._fstat_r+0x10): undefined reference to
_fstat' /usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-isattyr.o): In function_isatty_r': isattyr.c:(.text._isatty_r+0xc): undefined reference to
_isatty' collect2: error: ld returned 1 exit status Makefile:170: recipe for target 'example' failed make: *\ [example] Error 1