summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/gcc-uClibc/gcc-uClibc.c7
-rwxr-xr-xextra/scripts/get-needed-libgcc-objects.sh5
-rwxr-xr-xextra/scripts/initfini.pl2
3 files changed, 8 insertions, 6 deletions
diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c
index f260b5ec2..13049d17d 100644
--- a/extra/gcc-uClibc/gcc-uClibc.c
+++ b/extra/gcc-uClibc/gcc-uClibc.c
@@ -122,7 +122,7 @@ int main(int argc, char **argv)
int use_build_dir = 0, linking = 1, use_static_linking = 0;
int use_stdinc = 1, use_nostdinc_plus = 0, use_start = 1, use_stdlib = 1, use_pic = 0;
int source_count = 0, use_rpath = 0, verbose = 0;
- int ctor_dtor = 0, cplusplus = 0;
+ int ctor_dtor = 1, cplusplus = 0;
int i, j, k, l, m, n;
char ** gcc_argv;
char ** gcc_argument;
@@ -165,7 +165,6 @@ int main(int argc, char **argv)
GPLUSPLUS_BIN[len-1]='+';
GPLUSPLUS_BIN[len-2]='+';
}
- ctor_dtor = 1;
cplusplus = 1;
use_nostdinc_plus = 1;
}
@@ -307,8 +306,8 @@ int main(int argc, char **argv)
} else if (strcmp("--uclibc-use-rpath",argv[i]) == 0) {
use_rpath = 1;
argv[i]='\0';
- } else if (strcmp("--uclibc-ctors",argv[i]) == 0) {
- ctor_dtor = 1;
+ } else if (strcmp("--uclibc-no-ctors",argv[i]) == 0) {
+ ctor_dtor = 0;
argv[i]='\0';
}
break;
diff --git a/extra/scripts/get-needed-libgcc-objects.sh b/extra/scripts/get-needed-libgcc-objects.sh
index 5d81154b2..00cfab2a9 100755
--- a/extra/scripts/get-needed-libgcc-objects.sh
+++ b/extra/scripts/get-needed-libgcc-objects.sh
@@ -48,7 +48,9 @@ echo Extracting referenced libgcc.a objects ...
rm -f obj.need.0
touch obj.need.0
-while [ -s obj.need ] && ! cmp -s obj.need obj.need.0 ; do
+
+cmp -s obj.need obj.need.0 ; state=$?
+while [ -s obj.need ] && [ $state -ne 0 ] ; do
(cd tmp-gcc && cat ../obj.need | sort | uniq | xargs $LD -r -o ../libgcc.ldr)
cp obj.need obj.need.0
if $NM --undefined-only libgcc.ldr > sym.need ; then
@@ -58,6 +60,7 @@ while [ -s obj.need ] && ! cmp -s obj.need obj.need.0 ; do
fi
done
fi
+ cmp -s obj.need obj.need.0 ; state=$?
done
cat obj.need | sort | uniq > obj.need.0
diff --git a/extra/scripts/initfini.pl b/extra/scripts/initfini.pl
index 431b39396..41add5d88 100755
--- a/extra/scripts/initfini.pl
+++ b/extra/scripts/initfini.pl
@@ -84,7 +84,7 @@ while(<INITFINI>) {
$omitcrtn = 0;
next;
}
- if (/^i_am_not_a_leaf/) {
+ if (/i_am_not_a_leaf/) {
$discard = 1;
next;
}