summaryrefslogtreecommitdiff
path: root/scripts/build/cc
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-08-31 19:13:51 (GMT)
committerAlexey Neyman <stilor@att.net>2017-09-03 19:12:14 (GMT)
commit1e4eeb5c3b0f9156ed679c4aed50ba5f97c3939b (patch)
treec29bd1a8c1f569b93b01f43f3607a5b30a828e75 /scripts/build/cc
parente83a2e233326f183766b78e579332880339cb5e7 (diff)
Workaround for static uClibc-ng issue with -lpthread
Also, preserve .config when running test-package.sh. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r--scripts/build/cc/gcc.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 6e9036f..5430341 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -233,7 +233,11 @@ do_cc_core_pass_2() {
# later, we need to build libgcc
case "${CT_THREADS}" in
nptl)
- core_opts+=( "mode=shared" )
+ if [ "${CT_SHARED_LIBS}" = "y" ]; then
+ core_opts+=( "mode=shared" )
+ else
+ core_opts+=( "mode=static" )
+ fi
core_opts+=( "build_libgcc=yes" )
;;
win32)
@@ -873,10 +877,13 @@ do_gcc_backend() {
fi
done
- [ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared")
[ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
+ if [ "${CT_SHARED_LIBS}" != "y" ]; then
+ extra_config+=("--disable-shared")
+ fi
+
case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in
y) extra_config+=("--enable-sjlj-exceptions");;
m) ;;