This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[bfin] Define LIB_SPEC for bfin-elf
- From: "Jie Zhang" <jzhang918 at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Cc: "Bernd Schmidt" <bernds_cb1 at t-online dot de>
- Date: Sat, 1 Jul 2006 02:02:51 +0800
- Subject: [bfin] Define LIB_SPEC for bfin-elf
This patch defines LIB_SPEC for bfin-elf, such that -lc will be added
when linking with option -shared. With this patch, shared libpthread
in uClibc will be built successfully with bfin-elf-gcc. Otherwise,
there are many undefined references.
Is it OK?
Jie
* config/bfin/elf.h (LIB_SPEC): Define.
Index: config/bfin/elf.h
===================================================================
RCS file: /cvsroot/gcc3/gcc-4.1/gcc/config/bfin/elf.h,v
retrieving revision 1.3
diff -u -r1.3 elf.h
--- config/bfin/elf.h 25 Mar 2006 14:53:52 -0000 1.3
+++ config/bfin/elf.h 30 Jun 2006 10:27:55 -0000
@@ -12,6 +12,9 @@
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend%O%s crtn%O%s"
+#undef LIB_SPEC
+#define LIB_SPEC "-lc"
+
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX "_"