projects
/
openwrt
/
staging
/
dedeckeh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dropbear: fix double closing fd
[openwrt/staging/dedeckeh.git]
/
scripts
/
ext-toolchain.sh
diff --git
a/scripts/ext-toolchain.sh
b/scripts/ext-toolchain.sh
index a34ef0677335cc9e5a3bd52e011444fff9754292..ee7d9532f5de79588900920e73046221679541b7 100755
(executable)
--- a/
scripts/ext-toolchain.sh
+++ b/
scripts/ext-toolchain.sh
@@
-3,7
+3,7
@@
# Script for various external toolchain tasks, refer to
# the --help output for more information.
#
# Script for various external toolchain tasks, refer to
# the --help output for more information.
#
-# Copyright (C) 2012 Jo-Philipp Wich <jo
w@openwrt.org
>
+# Copyright (C) 2012 Jo-Philipp Wich <jo
@mein.io
>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@
-35,9
+35,11
@@
LIB_SPECS="
rt: librt-* librt
pthread: libpthread-* libpthread
stdcpp: libstdc++
rt: librt-* librt
pthread: libpthread-* libpthread
stdcpp: libstdc++
+ thread_db: libthread-db
gcc: libgcc_s
ssp: libssp
gfortran: libgfortran
gcc: libgcc_s
ssp: libssp
gfortran: libgfortran
+ gomp: libgomp
"
# Binary specs
"
# Binary specs
@@
-91,7
+93,7
@@
test_uclibc() {
local sysroot="$("$CC" $CFLAGS -print-sysroot 2>/dev/null)"
if [ -d "${sysroot:-$TOOLCHAIN}" ]; then
local lib
local sysroot="$("$CC" $CFLAGS -print-sysroot 2>/dev/null)"
if [ -d "${sysroot:-$TOOLCHAIN}" ]; then
local lib
- for lib in "${sysroot:-$TOOLCHAIN}"/{lib,usr/lib,usr/local/lib}/ld-uClibc*.so*; do
+ for lib in "${sysroot:-$TOOLCHAIN}"/{lib,usr/lib,usr/local/lib}/ld
*
-uClibc*.so*; do
if [ -f "$lib" ] && [ ! -h "$lib" ]; then
return 0
fi
if [ -f "$lib" ] && [ ! -h "$lib" ]; then
return 0
fi
@@
-221,7
+223,7
@@
wrap_bin_ld() {
local bin="$2"
echo '#!/bin/sh' > "$out"
local bin="$2"
echo '#!/bin/sh' > "$out"
- echo -n 'exec "'"$bin"'"
'"$CFLAGS"' ${STAGING_DIR:+'
>> "$out"
+ echo -n 'exec "'"$bin"'"
${STAGING_DIR:+'
>> "$out"
echo -n '-L "$STAGING_DIR/usr/lib" ' >> "$out"
echo '-rpath-link "$STAGING_DIR/usr/lib"} "$@"' >> "$out"
echo -n '-L "$STAGING_DIR/usr/lib" ' >> "$out"
echo '-rpath-link "$STAGING_DIR/usr/lib"} "$@"' >> "$out"
@@
-356,8
+358,12
@@
print_config() {
echo "CONFIG_TOOLCHAIN_PREFIX=\"$prefix\"" >> "$config"
echo "CONFIG_TARGET_NAME=\"$target\"" >> "$config"
echo "CONFIG_TOOLCHAIN_PREFIX=\"$prefix\"" >> "$config"
echo "CONFIG_TARGET_NAME=\"$target\"" >> "$config"
+ if [ "$LIBC_TYPE" != glibc ]; then
+ echo "CONFIG_TOOLCHAIN_LIBC=\"$LIBC_TYPE\"" >> "$config"
+ fi
+
local lib
local lib
- for lib in C RT PTHREAD GCC STDCPP SSP GFORTRAN; do
+ for lib in C RT PTHREAD GCC STDCPP SSP GFORTRAN
GOMP
; do
local file
local spec=""
local llib="$(echo "$lib" | sed -e 's#.*#\L&#')"
local file
local spec=""
local llib="$(echo "$lib" | sed -e 's#.*#\L&#')"