summaryrefslogtreecommitdiff
path: root/extra/gcc-uClibc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-12-12 21:58:41 +0000
committerEric Andersen <andersen@codepoet.org>2002-12-12 21:58:41 +0000
commitddf02f5f8e4e5ad849af3b268fd318c40051fea5 (patch)
treef39104f9f8c1255b3e8120790c8c6c47084b3013 /extra/gcc-uClibc
parent3a4c2949e5e89093e0b53e17ea71f33252541c8b (diff)
When -shared is specified, meaning they wish to create a shared
library, we need to disable adding start files (i.e. crt0) since it isn't supposed to be creating an executable, just a shared lib. -Erik
Diffstat (limited to 'extra/gcc-uClibc')
-rw-r--r--extra/gcc-uClibc/gcc-uClibc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c
index 765521eae..d5eb08b99 100644
--- a/extra/gcc-uClibc/gcc-uClibc.c
+++ b/extra/gcc-uClibc/gcc-uClibc.c
@@ -289,6 +289,7 @@ int main(int argc, char **argv)
use_static_linking = 1;
}
if (strcmp("-shared",argv[i]) == 0) {
+ use_start = 0;
use_pic = 1;
}
break;
@@ -444,13 +445,15 @@ int main(int argc, char **argv)
//gcc_argv[i++] = "-Wl,--end-group";
}
#ifdef __UCLIBC_CTOR_DTOR__
- if (ctor_dtor) {
- if (use_pic) {
- gcc_argv[i++] = LIBGCC_DIR "crtendS.o" ;
- } else {
- gcc_argv[i++] = LIBGCC_DIR "crtend.o" ;
+ if (use_start) {
+ if (ctor_dtor) {
+ if (use_pic) {
+ gcc_argv[i++] = LIBGCC_DIR "crtendS.o" ;
+ } else {
+ gcc_argv[i++] = LIBGCC_DIR "crtend.o" ;
+ }
+ gcc_argv[i++] = crtn_path[use_build_dir];
}
- gcc_argv[i++] = crtn_path[use_build_dir];
}
#endif
} else {