https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79171
Bug ID: 79171 Summary: I can't able to create static link of dynamic object. Product: gcc Version: 4.9.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: snbraj at sasken dot com Target Milestone: --- Hi , I am trying to create static link of dynamic objects & archives. Below is the commands & flags used,getting below errors. /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc --sysroot=/local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto --disable-shared -Wundef -Wstrict-prototypes -Wno-trigraphs -g -O0 -fno-inline -fno-short-enums -fpic -D_GNU_SOURCE -I.. -O2 -pipe -g -feliminate-unused-debug-types -fstack-protector-all -pie -fpie -D_FORTIFY_SOURCE=2 -static -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o applypatch applypatch-applypatch.o applypatch-bspatch.o applypatch-bsdiff.o applypatch-imgpatch.o applypatch-freecache.o applypatch-utils.o applypatch-main.o -lz /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto/usr/lib64/libbz2.a /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto/usr/lib64/libmincrypt.a /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto/usr/lib64/libcutils.so /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto/usr/lib64/liblog.so /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto/usr/lib64/libglib-2.0.so /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto/usr/lib64/libstdc++.a ../mtdutils/.libs/libmtdutils.a ../edify/.libs/libedify.a ../minzip/.libs/libminzip.a -lm -lpthread /local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/4.9.3/ld: attempted static link of dynamic object `/local/mnt/workspace/bharath/AGL/poky/build/tmp-glibc/sysroots/auto/usr/lib64/libcutils.so' collect2: error: ld returned 1 exit status Is there any switch to override this? Regards Bharath