ksh93 static linking fails (ksh93, 10.0-STABLE, amd64)

看板FB_questions作者時間11年前 (2014/06/23 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
hi, i need to link ksh statically, but don't get it done. i use ast-ksh-20120801 and INIT-20130524, as well as the 3 patches from the freebsd ksh93 port. CCFLAGS=CFLAGS=-O2 -pipe LDFLAGS=-lm dynamic linking successes with the follwing command: [cwd=/build/arch/freebsd10.amd64/src/cmd/ksh93] cc -O2 -pipe -lm -L. -L/build/arch/freebsd10.amd64/lib \ -o ksh pmain.o libshell.a \ /build/arch/freebsd10.amd64/lib/libdll.a \ /build/arch/freebsd10.amd64/lib/libast.a \ /build/arch/freebsd10.amd64/lib/libast.a \ /build/arch/freebsd10.amd64/lib/libcoshell.a \ /build/arch/freebsd10.amd64/lib/libast.a \ /build/arch/freebsd10.amd64/lib/libast.a \ /build/arch/freebsd10.amd64/lib/libcmd.a \ -lmd -lutil /build/arch/freebsd10.amd64/lib/libast.a \ -lmd -lutil /build/arch/freebsd10.amd64/lib/libast.a \ /build/arch/freebsd10.amd64/lib/libast.a \ /build/arch/freebsd10.amd64/lib/libast.a my "final" static command (after many others): cc -s -v -O2 -pipe -lm -static \ -L. -L./arch/freebsd10.amd64/lib \ -o ./ksh_static \ ../arch/freebsd10.amd64/src/cmd/ksh93/pmain.o \ ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a \ -lc -lm -lmd -lutil ./arch/freebsd10.amd64/lib/libdll.a \ ../arch/freebsd10.amd64/lib/libcoshell.a \ ../arch/freebsd10.amd64/lib/libcmd.a \ ../arch/freebsd10.amd64/lib/libast.a the errors from the command above are: ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x7c8): warning: powl has lower than advertised precision ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x3a8): warning: coshl has lower than advertised precision ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x3d8): warning: erfcl has lower than advertised precision ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x3c0): warning: erfl has lower than advertised precision ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x6f0): warning: lgammal has lower than advertised precision ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x888): warning: sinhl has lower than advertised precision ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x8d0): warning: tanhl has lower than advertised precision ../arch/freebsd10.amd64/src/cmd/ksh93/libshell.a(strdata.o):(.rodata+0x8e8): warning: tgammal has lower than advertised precision ../arch/freebsd10.amd64/lib/libast.a(malloc.o): In function `__calloc': /build/src/lib/libast/vmalloc/malloc.c:(.text+0xfe0): multiple definition of `__calloc' /usr/lib/libc.a(jemalloc_jemalloc.o):jemalloc_jemalloc.c:(.text+0x29a0): first defined here ../arch/freebsd10.amd64/lib/libast.a(malloc.o): In function `__free': /build/src/lib/libast/vmalloc/malloc.c:(.text+0x1000): multiple definition of `__free' /usr/lib/libc.a(jemalloc_jemalloc.o):jemalloc_jemalloc.c:(.text+0x54a0): first defined here ../arch/freebsd10.amd64/lib/libast.a(malloc.o): In function `__malloc': /build/src/lib/libast/vmalloc/malloc.c:(.text+0x1010): multiple definition of `__malloc' /usr/lib/libc.a(jemalloc_jemalloc.o):jemalloc_jemalloc.c:(.text+0x210): first defined here ../arch/freebsd10.amd64/lib/libast.a(malloc.o): In function `__realloc': /build/src/lib/libast/vmalloc/malloc.c:(.text+0x1020): multiple definition of `__realloc' /usr/lib/libc.a(jemalloc_jemalloc.o):jemalloc_jemalloc.c:(.text+0x3d00): first defined here cc: error: linker command failed with exit code 1 (use -v to see invocation) i tried re-arranging the -l<lib> stuff, changed the .a orders, but still without final success. i managed to statically link version 20120801, but the version is unstable and hangs itself. i know i'm doing smth completely wrong here, but don't get it. and please, i don't wanna discuss static linking at all ;-) any ideas welcome ;-) _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JfndV3g (FB_questions)